@kung-fu/minerva
v0.23.1
Published
Static site generator and package for converting Markdown files to HTML.
Readme
Minerva Publish
Easy, minimalist approach to publishing markdown as static site content for magazine and blog sites.
⚠️ Documentation TODO
This README is badly out of date — Minerva gained a lot of capability (≈ v0.20.x) that is not documented anywhere yet. Before publishing/sharing, write real docs covering:
- Folder-scoped
lists/feeds—folder:now filters the source set (only pages undercontent/<folder>/), not just the output directory. Backward-compatible: omitfolderto include everything. (selectPagesinfile.tsis the single source of truth for folder +property/keycategory +order+skip/limit.) collections:config — named, Eleventy-style collections exposed to every template ascollections.<name>(collection.ts).- Per-file
permalinkfrontmatter + theincludeFoldersInURL/includeExtensionURL options, all unified instructure.ts(getOutputPath/getOutputLink); the view's on-disk path and the templatelinkalways agree. output.trailingSlash— emit prettyname/index.htmlso URLs end in a slash; the templatelink(and every canonical/OG/sitemap/RSS URL derived from it) carries it. Defaults off.output.linkifyBareUrls— opt-in markdown-it "fuzzy" auto-linking of bare domains in prose (example.com→<a>). Defaults off, so a domain typed in body text stays plain text; explicit[text](url)links and fullhttp(s)://URLs always linkify.sections:data cascade — per-folder frontmatter defaults merged beneath each file's own frontmatter (globals < section < frontmatter).- Per-section view layouts —
view.templatescan hold multiple templates; a page'slayout(frontmatter or section default) selects which one renders it. linkin static/list contexts — static pages and list/index pages now receive their ownlink, so layouts can emit canonical/OG tags for them (added v0.20.2).--watch/-w— rebuild-on-change dev mode (watches source, the layout dir, and every configuredassetsdir; debounced). Pipeline is now fullyasync/awaited, andcopy()awaits all asset copies (no clean()-vs-copy race under watch).- Page store keyed by relative path (not
datePublished) so two posts sharing a timestamp can't silently collide. - Correctness fixes to document/note:
get/getOnehelpers, feedmaxItemsapplied after filtering, RFC-822 RSS dates. - Test suite exists now (
npm test→ mocha + nyc; fixtures undertest/fixtures/). - Depends on
@kung-fu/moneta^2.1.0 (itswhereoperators / dot-path keys are used by the query layer).
Credits
slash() method retrieved from https://github.com/sindresorhus/slash
