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 { .book-page .markdown.book-article {
@for $currentLevel from $startLevel through $endLevel { @for $currentLevel from $startLevel through $endLevel {
> h#{$currentLevel} { h#{$currentLevel} {
counter-increment: h#{$currentLevel}; counter-increment: h#{$currentLevel};
counter-reset: h#{$currentLevel + 1}; counter-reset: h#{$currentLevel + 1};

View File

@ -13,6 +13,7 @@ Tabs let you organize content by context, for example installation instructions
## Example ## Example
{{% tabs %}} {{% tabs %}}
{{% tab "MacOS" %}} {{% tab "MacOS" %}}
# MacOS # MacOS
@ -25,7 +26,6 @@ Miseratus fonte Ditis conubia.
{{% /tab %}} {{% /tab %}}
{{% tab "Linux" %}} {{% tab "Linux" %}}
# Linux # Linux
This is tab **Linux** content. This is tab **Linux** content.
@ -37,7 +37,6 @@ Miseratus fonte Ditis conubia.
{{% /tab %}} {{% /tab %}}
{{% tab "Windows" %}} {{% tab "Windows" %}}
# Windows # Windows
This is tab **Windows** content. 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. protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
Miseratus fonte Ditis conubia. Miseratus fonte Ditis conubia.
{{% /tab %}} {{% /tab %}}
{{% /tabs %}} {{% /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 }} {{- if .Inner }}{{ end -}}
{{ $group := printf "tabs-%d" .Ordinal }} {{- $group := printf "tabs-%d" .Ordinal -}}
<div class="book-tabs"> <div class="book-tabs">
{{- range $index, $tab := .Scratch.Get $group -}} {{- range $index, $tab := .Scratch.Get $group -}}