default.html| Commit | Message |
|---|---|
ac75fabf3 | 2021-08-10 Jekyll site migration |
layout: default in their front matter, meaning their output is injected into {{ content }} on line 14 of this file. This is the bottom of the inheritance chain — it outputs the actual HTML document.1. {% include head.html %} // <meta>, <title>, CSS, JS (in <head>)
2. {% include hero.html %} OR navbar // Conditional: hero section or plain navbar
3. {{ content }} // Page-specific content (from child layout)
4. {% include offcanvas-docs.html %} // Mobile documentation menu panel
5. {% include offcanvas.html %} // Mobile site menu panel
6. {% include footer.html %} // Conditional: only if NOT doc layout
7. {% include hook-pre-closing-body-doc.html %} // Conditional: only for doc layout
8. {% include hook-pre-closing-body.html %} // Always: global pre-</body> scripts| Condition | Line | When active | Why |
|---|---|---|---|
page.hero | 8-12 | Page has hero front matter | Hero includes its own navbar (line 14 of hero.html). If hero is present, the bare navbar would duplicate. Hero pages: index.adoc, search.adoc. |
page.layout != 'doc' | 20-22 | NOT a documentation page | Doc pages have their own prev/next navigation at the bottom — the site footer would compete visually. Non-doc pages (homepage, search, legal) get the footer. |
page.layout == 'doc' | 24-26 | Documentation pages only | Doc pages get special pre-closing-body scripts: prev/next navigation JavaScript, doc-specific analytics, table-of-contents scroll spy. Non-doc pages skip this. |
The three hook-*.html includes are Jekyll's version of WordPress hooks — injection points where plugins or page types can add scripts/styles without modifying the layout template:
| Hook | Injection point | Used by |
|---|---|---|
hook-head.html | Inside <head> (via head.html) | Page-specific CSS, meta tags |
hook-post-content-doc.html | After content, doc pages only | Doc-specific post-content scripts |
hook-pre-closing-body.html | Before </body>, always | Global JS: analytics, search init, UIkit init |
hook-pre-closing-body-doc.html | Before </body>, doc pages only | Doc-specific JS: TOC scroll spy, prev/next keyboard nav |
This is the same architectural pattern as UIkit's hook/mixin system in SCSS (#4061) — empty extension points that child layouts can implement without modifying the parent.
The order matters — offcanvas panels must be after content (they're position:fixed overlays), footer is conditionally suppressed for doc pages, and hook includes are injected just before
</body>for performance (scripts at end of body).