mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-10 11:34:38 -04:00
Document the comment shortcode
This commit is contained in:
parent
83d7d3005a
commit
109efe3ebb
@ -74,6 +74,26 @@ You can call shortcodes within other shortcodes by creating your own templates t
|
||||
|
||||
Use these embedded shortcodes as needed.
|
||||
|
||||
### comment
|
||||
|
||||
{{< new-in "0.137.1" >}}
|
||||
|
||||
{{% note %}}
|
||||
To override Hugo's embedded `comment` shortcode, copy the [source code] to a file with the same name in the layouts/shortcodes directory.
|
||||
|
||||
[source code]: {{% eturl comment %}}
|
||||
{{% /note %}}
|
||||
|
||||
Use the `comment` shortcode to include comments in your Markdown. Hugo excludes the encapsulated text when rendering your site.
|
||||
|
||||
Example usage:
|
||||
|
||||
```text
|
||||
{{%/* comment */%}} TODO: rewrite the paragraph below. {{%/* /comment */%}}
|
||||
```
|
||||
|
||||
Although you can call this shortcode using the `{{</* */>}}` notation, computationally it is more efficient to call it using the `{{%/* */%}}` notation as shown above.
|
||||
|
||||
### figure
|
||||
|
||||
{{% note %}}
|
||||
|
@ -24,6 +24,7 @@
|
||||
'render-codeblock-goat' = '_default/_markup/render-codeblock-goat.html'
|
||||
|
||||
# Shortcodes
|
||||
'comment' = 'shortcodes/comment.html'
|
||||
'figure' = 'shortcodes/figure.html'
|
||||
'gist' = 'shortcodes/gist.html'
|
||||
'highlight' = 'shortcodes/highlight.html'
|
||||
|
Loading…
x
Reference in New Issue
Block a user