mirror of
https://github.com/imfing/hextra.git
synced 2025-10-13 17:11:51 -04:00
feat(shortcode): added markdown attribute support for headers (#851)
docs: added "no-step-marker" example for steps
This commit is contained in:
@@ -4,6 +4,8 @@ title: Steps
|
|||||||
|
|
||||||
A built-in component to display a series of 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
|
## Example
|
||||||
|
|
||||||
{{% steps %}}
|
{{% steps %}}
|
||||||
@@ -16,6 +18,10 @@ This is the first step.
|
|||||||
|
|
||||||
This is the second step.
|
This is the second step.
|
||||||
|
|
||||||
|
#### Step subheading {class="no-step-marker"}
|
||||||
|
|
||||||
|
This will not be counted as a step.
|
||||||
|
|
||||||
### Step 3
|
### Step 3
|
||||||
|
|
||||||
This is the third step.
|
This is the third step.
|
||||||
@@ -43,5 +49,9 @@ This is the first step.
|
|||||||
|
|
||||||
This is the second step.
|
This is the second step.
|
||||||
|
|
||||||
|
#### Step subheading {class="no-step-marker"}
|
||||||
|
|
||||||
|
This will not be counted as a step.
|
||||||
|
|
||||||
{{%/* /steps */%}}
|
{{%/* /steps */%}}
|
||||||
```
|
```
|
||||||
|
@@ -715,6 +715,7 @@
|
|||||||
"msupsub",
|
"msupsub",
|
||||||
"mtable",
|
"mtable",
|
||||||
"mtight",
|
"mtight",
|
||||||
|
"no-step-marker",
|
||||||
"not-prose",
|
"not-prose",
|
||||||
"nulldelimiter",
|
"nulldelimiter",
|
||||||
"op-symbol",
|
"op-symbol",
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<h{{ .Level }}>
|
<h{{ .Level }} {{- with .Attributes.class }} class="{{ . }}" {{- end }}>
|
||||||
{{- .Text | safeHTML -}}
|
{{- .Text | safeHTML -}}
|
||||||
{{- if gt .Level 1 -}}
|
{{- if gt .Level 1 -}}
|
||||||
<span class="hx:absolute hx:-mt-20" id="{{ .Anchor | safeURL }}"></span>
|
<span class="hx:absolute hx:-mt-20" id="{{ .Anchor | safeURL }}"></span>
|
||||||
|
Reference in New Issue
Block a user