Options
Every option lives in jaad.config.ts, at the project root. Only title is
required:
import { defineJaadConfig } from '@jaamd/jaad'
export default defineJaadConfig({
title: 'My Project',
site: 'https://example.dev',
})
The docs’ own
| Option | Type | Default | What it does |
|---|---|---|---|
docsDir |
string |
"./docs" |
The directory of the pages |
routeBase |
string |
"/" |
Where the docs are served |
sections |
object |
none | One directory per part of the docs |
locales |
string[] | false |
detected | The language directories |
readingTime |
boolean |
false |
The minutes to read a page |
editLink |
boolean | string |
true |
The “Edit this page” link |
author |
string |
none | The author of a page that names none |
llms |
boolean |
true |
Files for language models |
Site options
JAAB reads these too. Beside it, they go in
site.config.ts, shared by both: see
Docs and a blog.
| Option | Type | Default | What it does |
|---|---|---|---|
title |
string |
required | The site name |
description |
string |
package.json |
The site description |
lang |
string |
"en" |
The language, the default one if many |
logo |
string |
none | An image in place of the site name |
homeLink |
string |
"/" |
Where the site name leads |
nav |
object[] |
[] |
Text links in the header |
social |
object |
from git | Icon links in the header |
footer |
string | false |
credit, :feed |
The footer |
authors |
object |
{} |
The people who write the site |
head |
object[] |
[] |
Extra tags in <head> |
ogImage |
string | false |
detected | The social image |
theme |
string | object |
"default" |
The colours of the interface and code |
appearance |
string |
"auto" |
Light, dark, or the reader’s choice |
tailwind |
boolean |
false |
Tailwind in your pages and styles |
ui |
object |
{} |
The interface strings, per language |
Astro options
site, the public URL, base, the path the site
is served below, and astro, Astro options of your own, set up
Astro. With @jaamd/jaad/site, they go in jaad.config.ts. In an
astro.config of your own, as beside JAAB, site and base go in its
defineConfig, with the rest of Astro’s own options, and of astro only
fonts is read: see
Existing Astro project.
Found in the project
Some values need no option. JAAD reads them from the project:
| Value | Read from |
|---|---|
| Repository and edit links | the git remote and the branch |
| Description, when not set | package.json |
| Favicon | public/favicon.svg, .ico or .png |
| Social image, when not set | public/og-image.png, .jpg, .jpeg or .webp |
| Styles of your own | src/jaamd.css |
| Languages | the directory names under docsDir |
| Trailing slash of page links | Astro’s trailingSlash and build.format |
Errors
An unknown key stops the build at any depth, and names its path: a misspelt
attributes in a head entry is caught like a misspelt titel. Links in
nav, social and homeLink are paths or http(s), mailto and tel URLs.