Skip to content

Customizing

You can customize styling, layout chrome, and routing through astro.config.mjs and CSS without forking @lukurauha/shelf. Edit /about and /privacy from the EmDash admin dashboard or via seed/seed.json.

Projects created with create-lukurauha-shelf include src/styles/custom.css, loaded via customCss in astro.config.mjs. Override CSS custom properties here:

src/styles/custom.css
:root {
--bg: #f4f1ea;
--surface: #fbf9f4;
--ink: #222624;
--lamp: #c9812b;
--action: #222624;
}

Full token definitions live in node_modules/@lukurauha/shelf/src/styles/tokens.css.

Pass Astro component entrypoints to lukurauhaShelf() under components:

astro.config.mjs
lukurauhaShelf({
title: "My Shelf",
customCss: ["./src/styles/custom.css"],
components: {
Header: "./src/components/MyHeader.astro",
Footer: "./src/components/MyFooter.astro",
},
});

Available integration options:

Option Default Purpose
title "lukurauha" Site title shown in browser tabs and footers
basePath "/" Mount path for shelf routes (for example "/shelf")
customCss [] Stylesheets loaded after base styles
components {} Overrides for Header, Footer, Logo, and Head
fonts true Register Google Fonts (Literata, Noto Sans JP, Noto Serif JP)
cmsPages true when basePath is "/" Inject EmDash-managed /[slug] route
disable404Route false when basePath is "/" Skip injecting /404 when true
links { about: "/about", privacy: "/privacy" } Footer and settings links (set a key to false to hide it)
  1. Sign in to /_emdash/admin.
  2. Open Pages.
  3. Edit and publish about and privacy.

Recommended details to state clearly for invited readers:

  • Who operates the server and how to contact them
  • Who can read stored books (specifically that the server operator has database access)
  • Backup expectations
  • What happens if the server shuts down

Initial /about and /privacy content is seeded from seed/seed.json. Update content.pages in seed/seed.json before initial setup if you want custom default copy on new deployments.