let numbered plugin count nested headings

This commit is contained in:
Alex Shpak 2024-10-04 15:35:02 +02:00
parent 15c85acfcd
commit a5fdf88017
5 changed files with 7 additions and 7 deletions

View File

@ -3,7 +3,7 @@ $endLevel: 6;
.book-page .markdown.book-article {
@for $currentLevel from $startLevel through $endLevel {
> h#{$currentLevel} {
h#{$currentLevel} {
counter-increment: h#{$currentLevel};
counter-reset: h#{$currentLevel + 1};

View File

@ -13,6 +13,7 @@ Tabs let you organize content by context, for example installation instructions
## Example
{{% tabs %}}
{{% tab "MacOS" %}}
# MacOS
@ -25,7 +26,6 @@ Miseratus fonte Ditis conubia.
{{% /tab %}}
{{% tab "Linux" %}}
# Linux
This is tab **Linux** content.
@ -37,7 +37,6 @@ Miseratus fonte Ditis conubia.
{{% /tab %}}
{{% tab "Windows" %}}
# Windows
This is tab **Windows** content.
@ -47,4 +46,5 @@ stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
Miseratus fonte Ditis conubia.
{{% /tab %}}
{{% /tabs %}}

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"Target":"book.min.3b63b9ecb24b01f1be0df5c6f361b3a2004ab96665227385e0196f67e7607b29.css","MediaType":"text/css","Data":{"Integrity":"sha256-O2O57LJLAfG+DfXG82GzogBKuWZlInOF4BlvZ+dgeyk="}}
{"Target":"book.min.360dff0f605402b28cf955dc41907e873918889abd9c647da51a49e12e6a242f.css","MediaType":"text/css","Data":{"Integrity":"sha256-Ng3/D2BUArKM+VXcQZB+hzkYiJq9nGR9pRpJ4S5qJC8="}}

View File

@ -1,5 +1,5 @@
{{ if .Inner }}{{ end }}
{{ $group := printf "tabs-%d" .Ordinal }}
{{- if .Inner }}{{ end -}}
{{- $group := printf "tabs-%d" .Ordinal -}}
<div class="book-tabs">
{{- range $index, $tab := .Scratch.Get $group -}}