Files
hugo/docs/content/en/shortcodes/comment.md
2025-01-23 09:47:46 +01:00

1.0 KiB
Executable File

title, description, categories, keywords, menu, weight, expiryDate
title description categories keywords menu weight expiryDate
Comment Include hidden comments in your content with the comment shortcode.
shortcodes
docs
identifier parent weight
shortcodes-comment shortcodes
2025-01-22

{{% 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 %}}

{{< new-in "0.137.1" >}}

Use the comment shortcode to include comments in your content. Hugo will ignore the text within these comments when rendering your site.

Use it inline:

{{%/* comment */%}} rewrite the paragraph below {{%/* /comment */%}}

Or as a block comment:

{{%/* comment */%}}
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.