Adding things
less than a minute
page javascript
For a script needed by one page, list it in that page’s frontmatter:
| |
site-wide javascript
For a script needed by every page — jQuery, analytics, a widget loader —
don’t repeat the frontmatter on every page. Override the hook/body-end
hook in your own site instead:
| |
hook/body-end renders last inside <body>, after the theme’s own scripts, so
the DOM is complete by the time your code runs. See
the hooks reference
for the other five hook positions.
mermaid
download your css & update hook/head-end — see
the hooks reference