fix: fix formatting issue while using nested toc shortcodes (#415)
This commit is contained in:
parent
6ab98d1da3
commit
6b464202c9
7 changed files with 47 additions and 34 deletions
|
@ -6,7 +6,7 @@ Hint shortcode can be used as hint/alerts/notification block.
|
|||
|
||||
Attributes:
|
||||
|
||||
| Name | Usage | default |
|
||||
| Name | Usage | Default |
|
||||
| ---------------- | --------------------------------------------------------------------------------- | --------------------- |
|
||||
| type | color types to choose from | note |
|
||||
| icon (optional) | custom icon to use | undefined (type name) |
|
||||
|
|
|
@ -43,7 +43,7 @@ If you need more flexibility for your embedded images, you could use the `img` s
|
|||
|
||||
**Attributes:**
|
||||
|
||||
| Name | Usage | default |
|
||||
| Name | Usage | Default |
|
||||
| ------------- | ------------------------------------------------------------------------------------------------------------- | ----------------- |
|
||||
| name (string) | Name of the image resource defined in your front matter. | empty |
|
||||
| alt (string) | Description for displayed image. | resource `.Title` |
|
||||
|
|
|
@ -14,7 +14,7 @@ Include shortcode can include files of different types. By specifying a language
|
|||
|
||||
Attributes:
|
||||
|
||||
| Name | Usage | default |
|
||||
| Name | Usage | Default |
|
||||
| -------- | ----------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
|
||||
| file | path to the included file relative to the Hugo root | undefined |
|
||||
| language | language for [syntax highlighting](https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages) | undefined |
|
||||
|
|
|
@ -4,12 +4,22 @@ title: ToC
|
|||
|
||||
Simple wrapper to generate a page Table of Content from a shortcode.
|
||||
|
||||
**Attributes:**
|
||||
|
||||
| Name | Usage | Default |
|
||||
| ------ | -------------------------- | ------------------------------------------------------------- |
|
||||
| format | format of the returned ToC | <!-- spellchecker-disable -->html<!-- spellchecker-enable --> |
|
||||
|
||||
**Syntax:**
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
```tpl
|
||||
{{</* toc */>}}
|
||||
{{</* toc (format=[html|raw]) */>}}
|
||||
```
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
**Example:**
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Level 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue