v1.3.0 — custom markup engines and navigation trees
| 2 min read
Plug in your own template engine, generate sidebar navigation trees, plus a pagination tag, toc filter and base-url flag.
Added
Custom markup engines.engine now accepts a module specifier — an npm
package name or a project-relative path — in addition to "nunjucks" /
"liquid". The module's default export is an engine class implementing a
small contract (render, renderString, registerFilters, registerTags,
indexableExtensions, markupExtensions, and optional
replaceOutExtensions). Extend a built-in as the easy path — deep imports
like poops/lib/markup/engines/liquid.js are supported. This is what powers
the separate poops-shopify plugin.
Navigation tree (nav). Generates your page hierarchy as sidebar-ready
data, exposed both as the nav template global (built in a pre-pass, always
reflecting the current build) and as a nested nav.json. Subpages nest from
URL structure. Options: output, root, collections
(true | false | allowlist | "index"), home. Front matter:
order, nav: false, navTitle.
pagination shorthand tag — {% pagination page.pagination %} renders
prev/next links in one line, in both engines.
toc filter — build a table of contents from rendered HTML headings.
Headings now also get slug ids plus permalink anchors (.heading-anchor).
--base-url / -u CLI flag — override the markup base URL prefix at
build time (overrides config). The Pages workflow now passes the repo name
automatically, so project sites deploy under the correct subpath.
Changed
Engine resolution is now async/lazy and resolves against your project's
node_modules, so a file:-linked poops still finds a custom engine.
_url / page.url is now output-relative (getPageUrlRelativeToOutput) so
it matches the URLs in nav.json — sidebar active-state checks
(item.url == page.url) now fire correctly.
Markdown rendering moved to one shared renderer so both engines produce
identical output (highlighting + heading anchors).
Fixed
Watch loop guard — compiler output landing inside a watched directory
(e.g. a Shopify theme's assets/) no longer retriggers its own compiler
forever. Only the compiler's own extensions are skipped in its output zone.
path.join → path.resolve across the markup pipeline — fixes
absolute/cross-drive output paths (Windows-friendliness).