Skip to content

Commit

Permalink
Remove reference to Internet Explorer conditional comments (#1975)
Browse files Browse the repository at this point in the history
The Internet Explorer conditional comments example was removed in 8e3f9ca
  • Loading branch information
jorisroovers committed Feb 19, 2023
1 parent 3e3458f commit c8070e5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion content/en/templates/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
{{ "<!-- This is an HTML comment -->" | safeHTML }}
```

If you need variables to construct such HTML comments, just pipe `printf` to `safeHTML`.

For example:

```go-html-template
{{ printf "<!-- Our website is named: %s -->" .Site.Title | safeHTML }}
Expand Down

0 comments on commit c8070e5

Please sign in to comment.