mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +02:00
Fix #263, document HTML comments & IE conditionals
This commit is contained in:
@@ -221,6 +221,13 @@ Could be rewritten as
|
|||||||
Stuff Here
|
Stuff Here
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
### Internet Explorer conditional comments using Pipes
|
||||||
|
|
||||||
|
By default Go Templates remove HTML comments from output. This has the unfortunate side effect of removing Internet Explorer conditional comments. As a workaround, use something like this:
|
||||||
|
|
||||||
|
{{ "<!--[if lt IE 9]>" | safeHtml }}
|
||||||
|
<script src="html5shiv.js"></script>
|
||||||
|
{{ "<![endif]-->" | safeHtml }}
|
||||||
|
|
||||||
## Context (aka. the dot)
|
## Context (aka. the dot)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user