diff --git a/content/en/templates/introduction.md b/content/en/templates/introduction.md index 87b7cab35b..5145b04be4 100644 --- a/content/en/templates/introduction.md +++ b/content/en/templates/introduction.md @@ -496,7 +496,17 @@ Will render `Bonsoir, Eliott.`, and not care about the syntax error (`add 0 + 2` ### HTML comments -If you need to produce HTML comments from your templates, take a look at the [Internet Explorer conditional comments]({{< relref "introduction.md#ie-conditional-comments" >}}) example. If you need variables to construct such HTML comments, just pipe `printf` to `safeHTML`. For example: +You can add html comments by piping a string HTML code comment to `safeHTML`. + +For example: + +```go-html-template +{{ "" | safeHTML }} +``` + +If you need variables to construct such HTML comments, just pipe `printf` to `safeHTML`. + +For example: ```go-html-template {{ printf "" .Site.Title | safeHTML }}