We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Description
Hi @imfing,
I noticed this bug: nested steps breaks the counter, see code example below. I find it ideal that the counter don't show into nested steps.
Steps To Reproduce
## First subtitle Subtitle description. {{% steps %}} ### First step Step description. {{% steps %}} #### Nested step Nested step description. {{% steps %}} ##### Another nested step Another nested step description. {{% /steps %}} ### Second step Step description. {{% /steps %}} ## Second subtitle Subtitle description. {{% steps %}} ### First step Step description. ### Second step Step description. {{% /steps %}}
Proposed Fix
To fix the issue, I implemented this change into steps.html:
steps.html
{{- $nested := eq (.Get "nested") "true" | default false -}} <div class="steps hx-ml-4 hx-mb-12 ltr:hx-border-l rtl:hx-border-r hx-border-gray-200 ltr:hx-pl-6 rtl:hx-pr-6 dark:hx-border-neutral-800 {{ if not $nested }}[counter-reset:step]{{ end }}"> {{- .Inner -}} </div>
Code usage with {{% steps nested="true" %}}, required only on first nested step occurrence:
{{% steps nested="true" %}}
## First subtitle Subtitle description. {{% steps %}} ### First step Step description. {{% steps nested="true" %}} #### Nested step Nested step description. {{% steps %}} ##### Another nested step Another nested step description. {{% /steps %}} {{% /steps %}} ### Second step Step description. {{% /steps %}} ## Second subtitle Subtitle description. {{% steps %}} ### First step Step description. ### Second step Step description. {{% /steps %}}
Screenshots
Broken nested steps:
Fixed nested steps:
Environment
The text was updated successfully, but these errors were encountered:
Thank you. I might adopt your change if I couldn't figure out a better solution.
Note that personally I don't recommend using it in a nested way. Instead use Markdown syntax as much as possible.
Sorry, something went wrong.
I need it for my current site design, to organize the list of variables. It follows the yaml like format.
No branches or pull requests
Description
Hi @imfing,
I noticed this bug: nested steps breaks the counter, see code example below. I find it ideal that the counter don't show into nested steps.
Steps To Reproduce
Proposed Fix
To fix the issue, I implemented this change into
steps.html
:Code usage with
{{% steps nested="true" %}}
, required only on first nested step occurrence:Screenshots
Broken nested steps:
Fixed nested steps:
Environment
The text was updated successfully, but these errors were encountered: