Docs menu

@memomori-app/elysium holds createDocs, writeDocs, DEFAULT_LABELS and ElysiumError. Import everything else by its own path, such as @memomori-app/elysium/vite.

Path Holds
site find pages, read frontmatter, order sections, routes (Node)
page the nav, search button, previous and next, and contents
templates pageTemplates: load, pick and fill page templates (Node)
outputs Markdown copies, search sections, llms.txt, sitemap, link checks
build createDocs: every page and file by route, plus check (Node)
write writeDocs: write a built site to a folder (Node)
vite the Vite plugin
og social cards with Satori
client startDocs, the browser script
labels DEFAULT_LABELS and the Labels type
errors ElysiumError, for a problem in the site

Each piece has its own path, so you can build a different kind of site from them. createDocs takes the Vite plugin's options, with base in place of route; dir, template and assets resolve from root, the working folder unless you give one:

import { createDocs } from '@memomori-app/elysium/build'
import { writeDocs } from '@memomori-app/elysium/write'

const docs = createDocs({ dir: 'docs', name: 'Acme Docs' })
await writeDocs(docs, { out: 'site' })

writeDocs checks the site, throws an ElysiumError listing anything broken, then writes every page and file, _assets included. It leaves out the default theme's CSS and script, which the CLI adds.

Stylesheets and templates #

Path Holds
docs.css the docs chrome
docs-layout.css the default theme's layout
docs-site.css the whole default theme, Charon's styles included
fonts.css JetBrains Mono, from the shipped assets/fonts/
scrollbars.css thin scrollbars that show on hover
templates/elysium.html the default page template, which other templates call
templates/top.html the top page template