Skip to content

Steps are displayed in the "on this page" menu, even though they are not titles or navigation items #288

Answered by imfing
vinnciane asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, thanks for this issue. It is by design that the Steps shortcode uses h3 instead of ordered/unordered lists.

You can override this behavior by:

  • create layouts/shortcodes/steps.html file to override the default steps shortcode template:
<div class="steps ml-4 mb-12 border-l border-gray-200 pl-6 dark:border-neutral-800 [counter-reset:step]">
    {{ .Inner | markdownify }}
</div>
  • use the steps shortcode with <> angle brackets:
{{< steps >}}

### Step 1

This is the first step.

### Step 2

This is the second step.

{{< /steps >}}

References:

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by vinnciane
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #286 on February 12, 2024 23:05.