Skip to content

Commit

Permalink
let numbered plugin count nested headings
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-shpak committed Oct 4, 2024
1 parent 15c85ac commit a5fdf88
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion assets/plugins/_numbered.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
4 changes: 2 additions & 2 deletions exampleSite/content.en/docs/shortcodes/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Tabs let you organize content by context, for example installation instructions
## Example

{{% tabs %}}

{{% tab "MacOS" %}}
# MacOS

Expand All @@ -25,7 +26,6 @@ Miseratus fonte Ditis conubia.
{{% /tab %}}

{{% tab "Linux" %}}

# Linux

This is tab **Linux** content.
Expand All @@ -37,7 +37,6 @@ Miseratus fonte Ditis conubia.
{{% /tab %}}

{{% tab "Windows" %}}

# Windows

This is tab **Windows** content.
Expand All @@ -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 %}}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -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="}}
4 changes: 2 additions & 2 deletions layouts/shortcodes/tabs.html
Original file line number Diff line number Diff line change
@@ -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 -}}
Expand Down

0 comments on commit a5fdf88

Please sign in to comment.