Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions docs/_includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,20 @@
(meta tags, seo tag, stylesheet, feed_meta, conditional Google Analytics)
so nothing else regresses; the JSON-LD block is the only addition.

This has to be a Liquid {% comment %} block, not an HTML <!-- --> comment:
Liquid tags are evaluated wherever they appear, even inside HTML comments,
and {% seo %} below renders its own "<!-- End Jekyll SEO tag -->" — whose
"-->" would close an HTML comment early and leak the rest of this text
(plus a duplicate <head>) straight into the rendered page.
Keep this a Liquid comment block, and never write Liquid tag syntax inside
it — not even as an example. Two separate outages came from ignoring that:

1. As an HTML comment, the seo tag named below still rendered (Liquid
evaluates tags anywhere, comments included). It emits its own HTML
end-comment marker, whose "--" + ">" closed this comment early and
leaked the remaining prose plus a duplicate head element into the page.
2. Rewritten as a Liquid comment, spelling out the opening comment tag in
prose opened a *nested* comment block, so the closing tag below matched
the inner one and the outer block was never closed. That's a hard build
failure: "Liquid syntax error: 'comment' tag was never closed".

Refer to tags by name only (seo tag, feed_meta, endcomment), never in
brace-percent form.
{% endcomment %}
<head>
<meta charset="utf-8">
Expand Down