From b7f4bffce6e39f1278fc9aeda1aea340eecc04ef Mon Sep 17 00:00:00 2001 From: Paul Marrapese Date: Sat, 11 Oct 2025 15:13:04 -0700 Subject: [PATCH] feat(shortcode): added markdown attribute support for headers (#851) docs: added "no-step-marker" example for steps --- docs/content/docs/guide/shortcodes/steps.md | 10 ++++++++++ docs/hugo_stats.json | 1 + layouts/_markup/render-heading.html | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/content/docs/guide/shortcodes/steps.md b/docs/content/docs/guide/shortcodes/steps.md index a4ffee3..bd0b88f 100644 --- a/docs/content/docs/guide/shortcodes/steps.md +++ b/docs/content/docs/guide/shortcodes/steps.md @@ -4,6 +4,8 @@ title: Steps A built-in component to display a series of steps. +You can use the Markdown attribute `{class="no-step-marker"}` to prevent a heading from being counted as a step. + ## Example {{% steps %}} @@ -16,6 +18,10 @@ This is the first step. This is the second step. +#### Step subheading {class="no-step-marker"} + +This will not be counted as a step. + ### Step 3 This is the third step. @@ -43,5 +49,9 @@ This is the first step. This is the second step. +#### Step subheading {class="no-step-marker"} + +This will not be counted as a step. + {{%/* /steps */%}} ``` diff --git a/docs/hugo_stats.json b/docs/hugo_stats.json index 71e05e2..a68570c 100644 --- a/docs/hugo_stats.json +++ b/docs/hugo_stats.json @@ -715,6 +715,7 @@ "msupsub", "mtable", "mtight", + "no-step-marker", "not-prose", "nulldelimiter", "op-symbol", diff --git a/layouts/_markup/render-heading.html b/layouts/_markup/render-heading.html index ca748b7..26d41d7 100644 --- a/layouts/_markup/render-heading.html +++ b/layouts/_markup/render-heading.html @@ -1,4 +1,4 @@ - + {{- .Text | safeHTML -}} {{- if gt .Level 1 -}}