lildocs 0.1.21 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +19239 -1145
- package/dist/core/github-pages.mjs +1 -1
- package/dist/{github-pages-clWLKtga.mjs → github-pages-CbcFNgKi.mjs} +17 -10
- package/dist/render/client/.vite/manifest.json +8 -0
- package/dist/render/client/assets/client-BCZ1mVzx.js +5311 -0
- package/dist/render/server/renderer.mjs +714 -0
- package/dist/render/styles.css +1 -1
- package/docs/assets/favicon.svg +13 -0
- package/docs/assets/logo.svg +12 -0
- package/docs/config.json +23 -0
- package/docs/features/api-reference.md +34 -0
- package/docs/features/content.md +86 -0
- package/docs/features/mermaid.md +34 -0
- package/docs/features/navigation.md +92 -0
- package/docs/features/search.md +28 -0
- package/docs/getting-started.md +94 -0
- package/docs/guides/github-pages.md +61 -0
- package/docs/images/example.svg +5 -0
- package/docs/index.md +46 -0
- package/docs/reference/cli.md +138 -0
- package/docs/reference/configuration.md +137 -0
- package/docs/reference/theming.md +218 -0
- package/package.json +14 -16
- package/dist/render/Layout.tsrx +0 -380
- package/dist/render/Search.tsrx +0 -414
- package/dist/render/client.tsrx +0 -52
- package/dist/render/copy-code.ts +0 -56
- package/dist/render/heading-links.ts +0 -85
- package/dist/render/navigation.ts +0 -16
- package/dist/render/paths.ts +0 -47
- package/dist/render/renderPage.tsrx +0 -14
- package/dist/render/section-highlight.ts +0 -63
- package/dist/render/sidebar.ts +0 -93
- package/dist/render/table-viewer.ts +0 -161
- package/dist/render/toc-visibility.ts +0 -78
- package/dist/render/types.ts +0 -9
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: CLI Reference
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Command Line
|
|
6
|
+
|
|
7
|
+
> Choose the right lildocs command, understand each flag, and map one-off CLI
|
|
8
|
+
> choices to persistent configuration.
|
|
9
|
+
|
|
10
|
+
lildocs supports these command shapes:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
lildocs <path>
|
|
14
|
+
lildocs build <path>
|
|
15
|
+
lildocs dev <path>
|
|
16
|
+
lildocs deploy <path>
|
|
17
|
+
lildocs init github-pages <path>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`<path>` can be a Markdown folder or a single Markdown file.
|
|
21
|
+
|
|
22
|
+
## Bare Build Command
|
|
23
|
+
|
|
24
|
+
Build a static documentation site from a Markdown folder or file.
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
lildocs ./docs
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
This is the shortest form of the build command. It treats `./docs` as the
|
|
31
|
+
documentation root, finds the home page, generates navigation from the folder
|
|
32
|
+
structure, builds a search index, and writes the site to `dist`.
|
|
33
|
+
|
|
34
|
+
If the path points to a Markdown file, that file becomes the home page and its
|
|
35
|
+
parent folder becomes the docs root:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
lildocs ./docs/index.md
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Use this form for simple local scripts, CI jobs, or one-off builds.
|
|
42
|
+
|
|
43
|
+
## Build Command
|
|
44
|
+
|
|
45
|
+
Build a static documentation site with the explicit `build` subcommand.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
lildocs build ./docs
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`build` does the same generation work as the bare `lildocs <path>` form, but it
|
|
52
|
+
is clearer in package scripts and CI configuration:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pnpm lildocs build ./docs
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Build output is self-contained. Page links are relative, local assets are copied
|
|
59
|
+
into the output folder, and `search-index.json` is generated next to the HTML
|
|
60
|
+
files.
|
|
61
|
+
|
|
62
|
+
## Dev Command
|
|
63
|
+
|
|
64
|
+
Start a local development server that rebuilds the generated site when docs
|
|
65
|
+
files change.
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
lildocs dev ./docs
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The dev server writes generated files to `.lildocs` by default and serves them
|
|
72
|
+
through Vite from `127.0.0.1:3000`. Add `--open` to launch the preview in your
|
|
73
|
+
default browser.
|
|
74
|
+
|
|
75
|
+
Choose a different output folder when you want to inspect generated files:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
lildocs dev ./docs --out ./.docs-preview
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Choose the host or port when the defaults conflict with another local service:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
lildocs dev ./docs --host 0.0.0.0 --port 4173
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The dev output directory must stay inside the current workspace, cannot be the
|
|
88
|
+
repository root, and cannot contain the docs root.
|
|
89
|
+
|
|
90
|
+
## Deploy Command
|
|
91
|
+
|
|
92
|
+
Build GitHub Pages-ready output.
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
lildocs deploy ./docs
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
`deploy` builds the same static site as `build`, then adds Pages deployment
|
|
99
|
+
metadata. See [GitHub Pages](../guides/github-pages.md) for the full publishing
|
|
100
|
+
workflow.
|
|
101
|
+
|
|
102
|
+
## Init GitHub Pages Command
|
|
103
|
+
|
|
104
|
+
Create a GitHub Actions workflow that deploys lildocs output to GitHub Pages.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
lildocs init github-pages ./docs
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
This command writes `.github/workflows/lildocs-pages.yml` if it does not already
|
|
111
|
+
exist. The workflow obtains the current lildocs major and minor release line
|
|
112
|
+
with `pnpm dlx`, runs `lildocs deploy`, uploads the generated output, and
|
|
113
|
+
publishes it with GitHub's Pages deployment action. Lildocs does not need to be
|
|
114
|
+
a project dependency.
|
|
115
|
+
|
|
116
|
+
## Options
|
|
117
|
+
|
|
118
|
+
| Option | Applies to | Description |
|
|
119
|
+
| --- | --- | --- |
|
|
120
|
+
| `--out <dir>` | build, dev, deploy, init github-pages | Output directory for generated files. Build, deploy, and init github-pages default to `dist`; dev defaults to `.lildocs`. |
|
|
121
|
+
| `--theme <name>` | build, dev, deploy | Built-in lildocs theme or bundled Shiki theme name. |
|
|
122
|
+
| `--font.heading <name-or-file>` | build, dev, deploy | Heading font from Google Fonts or a local font file. |
|
|
123
|
+
| `--font.body <name-or-file>` | build, dev, deploy | Body and interface font from Google Fonts or a local font file. |
|
|
124
|
+
| `--font.code <name-or-file>` | build, dev, deploy | Code font from Google Fonts or a local font file. |
|
|
125
|
+
| `--background.image <url-or-file>` | build, dev, deploy | Background image URL, CSS image function, or docs-relative image path. |
|
|
126
|
+
| `--background.gradient <gradient>` | build, dev, deploy | CSS background gradient. |
|
|
127
|
+
| `--background.blendMode <mode>` | build, dev, deploy | CSS `background-blend-mode` for the theme color and background layers. |
|
|
128
|
+
| `--link.underline <style>` | build, dev, deploy | Content link underline behavior: `always`, `hover`, or `none`. |
|
|
129
|
+
| `--host <address>` | dev | Host address for the local development server. |
|
|
130
|
+
| `--port <number>` | dev | Port for the local development server. |
|
|
131
|
+
| `--open` | dev | Open the local development server in the default browser. |
|
|
132
|
+
| `--base <path>` | deploy, init github-pages | GitHub Pages base path, such as `/repo/` for project pages. |
|
|
133
|
+
|
|
134
|
+
CLI flags override matching `config.json` values. See
|
|
135
|
+
[Configuration](configuration.md) for persistent defaults.
|
|
136
|
+
|
|
137
|
+
Favicon and logo settings are configuration-only and do not have CLI flags. See
|
|
138
|
+
[Themes and styling](theming.md) for examples.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Configuration Reference
|
|
2
|
+
|
|
3
|
+
> Look up persistent project settings, schema support, precedence, and matching
|
|
4
|
+
> CLI overrides.
|
|
5
|
+
|
|
6
|
+
lildocs works without configuration. Add `config.json` to the docs root when you
|
|
7
|
+
want persistent defaults:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"$schema": "https://raw.githubusercontent.com/aleclarson/lildocs/main/schemas/config.schema.json",
|
|
12
|
+
"projectName": "Acme Docs",
|
|
13
|
+
"theme": {
|
|
14
|
+
"light": "github-light",
|
|
15
|
+
"dark": "github-dark"
|
|
16
|
+
},
|
|
17
|
+
"favicon": "./images/favicon.svg",
|
|
18
|
+
"font": {
|
|
19
|
+
"heading": "Inter",
|
|
20
|
+
"body": "Source Sans 3",
|
|
21
|
+
"code": "Roboto Mono"
|
|
22
|
+
},
|
|
23
|
+
"logo": {
|
|
24
|
+
"image": "./images/logo.svg",
|
|
25
|
+
"text": "Acme Docs",
|
|
26
|
+
"font": "Onest"
|
|
27
|
+
},
|
|
28
|
+
"background": {
|
|
29
|
+
"gradient": "linear-gradient(135deg, rgb(121 184 255 / 0.14), transparent 38%)",
|
|
30
|
+
"blendMode": "screen"
|
|
31
|
+
},
|
|
32
|
+
"link": {
|
|
33
|
+
"underline": "hover"
|
|
34
|
+
},
|
|
35
|
+
"reference": {
|
|
36
|
+
"packageJson": "../package.json"
|
|
37
|
+
},
|
|
38
|
+
"navigation": {
|
|
39
|
+
"order": ["index.md", "getting-started.md", "guides/", "reference/"],
|
|
40
|
+
"transition": "fade",
|
|
41
|
+
"duration": 160,
|
|
42
|
+
"easing": "cubic-bezier(0.16, 1, 0.3, 1)"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
CLI flags override `config.json` values for one command run.
|
|
48
|
+
|
|
49
|
+
## Schema
|
|
50
|
+
|
|
51
|
+
`$schema` points editors and language servers at the lildocs JSON schema:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"$schema": "https://raw.githubusercontent.com/aleclarson/lildocs/main/schemas/config.schema.json"
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
This field is optional and does not change build behavior.
|
|
60
|
+
|
|
61
|
+
## Fields
|
|
62
|
+
|
|
63
|
+
Configuration fields are grouped by the part of the generated site they affect.
|
|
64
|
+
Feature pages provide examples and explain the resulting behavior.
|
|
65
|
+
|
|
66
|
+
### Project
|
|
67
|
+
|
|
68
|
+
| Field | Description |
|
|
69
|
+
| ------------- | ---------------------------------------------------------------------------------------------------- |
|
|
70
|
+
| `projectName` | Project name appended to each browser document title. Defaults to the nearest `package.json` `name`. |
|
|
71
|
+
|
|
72
|
+
### Appearance
|
|
73
|
+
|
|
74
|
+
See [Themes and styling](theming.md) for theme resolution, local theme files,
|
|
75
|
+
branding examples, font sources, backgrounds, and link presentation.
|
|
76
|
+
|
|
77
|
+
| Field | Description |
|
|
78
|
+
| ---------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
79
|
+
| `theme` | Built-in lildocs theme, bundled Shiki theme name, or `{ "light": "...", "dark": "..." }` system theme pair. |
|
|
80
|
+
| `favicon` | Browser icon from a URL, data URL, absolute URL path, or docs-relative image path. |
|
|
81
|
+
| `font.heading` | Font used for page titles and headings. |
|
|
82
|
+
| `font.body` | Font used for normal text and interface text. |
|
|
83
|
+
| `font.code` | Font used for inline code and fenced code blocks. |
|
|
84
|
+
| `logo.image` | Header logo image from a URL, data URL, absolute URL path, or docs-relative image path. |
|
|
85
|
+
| `logo.text` | Header brand text. Defaults to the nearest `package.json` `name` when no logo image is configured. |
|
|
86
|
+
| `logo.font` | Font used for header brand text. |
|
|
87
|
+
| `background.image` | Background image from a URL, CSS image function, or docs-relative file path. |
|
|
88
|
+
| `background.gradient` | CSS background gradient. |
|
|
89
|
+
| `background.blendMode` | CSS `background-blend-mode` for the theme color and configured background layers. |
|
|
90
|
+
| `link.underline` | Content link underline behavior: `always`, `hover`, or `none`. |
|
|
91
|
+
|
|
92
|
+
### Navigation
|
|
93
|
+
|
|
94
|
+
See [Navigation and page structure](../features/navigation.md) for generated
|
|
95
|
+
ordering, breadcrumbs, previous and next links, and transition examples.
|
|
96
|
+
|
|
97
|
+
| Field | Description |
|
|
98
|
+
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
99
|
+
| `navigation.order` | Docs-root-relative Markdown files or folders, in generated navigation order. Unlisted pages keep entry-point link order, then generated order after listed siblings. |
|
|
100
|
+
| `navigation.transition` | Enhanced navigation transition preset: `fade`, `slide`, `scale`, or `instant`. |
|
|
101
|
+
| `navigation.duration` | Enhanced navigation transition duration in milliseconds. |
|
|
102
|
+
| `navigation.easing` | CSS timing function used by enhanced navigation transitions. |
|
|
103
|
+
|
|
104
|
+
### Generated Reference
|
|
105
|
+
|
|
106
|
+
See [Generated API reference](../features/api-reference.md) for export discovery,
|
|
107
|
+
generated paths, declaration handling, and GitHub links.
|
|
108
|
+
|
|
109
|
+
| Field | Description |
|
|
110
|
+
| ----------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
111
|
+
| `reference.packageJson` | Docs-root-relative path to a `package.json` whose exported TypeScript declarations generate `/reference/` API pages. |
|
|
112
|
+
|
|
113
|
+
## CLI Flag Mappings
|
|
114
|
+
|
|
115
|
+
| Flag | JSON config |
|
|
116
|
+
| ---------------------------------- | ---------------------- |
|
|
117
|
+
| `--theme <name>` | `theme` |
|
|
118
|
+
| `--font.heading <name-or-file>` | `font.heading` |
|
|
119
|
+
| `--font.body <name-or-file>` | `font.body` |
|
|
120
|
+
| `--font.code <name-or-file>` | `font.code` |
|
|
121
|
+
| `--background.image <url-or-file>` | `background.image` |
|
|
122
|
+
| `--background.gradient <gradient>` | `background.gradient` |
|
|
123
|
+
| `--background.blendMode <mode>` | `background.blendMode` |
|
|
124
|
+
| `--link.underline <style>` | `link.underline` |
|
|
125
|
+
|
|
126
|
+
`--out <dir>` has no JSON config equivalent. It sets the generated site
|
|
127
|
+
directory for the current command. Build and deploy default to `dist`; dev
|
|
128
|
+
defaults to `.lildocs`.
|
|
129
|
+
|
|
130
|
+
`--host <address>`, `--port <number>`, and `--open` are dev-only server options
|
|
131
|
+
and have no JSON config equivalent.
|
|
132
|
+
|
|
133
|
+
`--base <path>` applies to `deploy` and `init github-pages`, and has no JSON
|
|
134
|
+
config equivalent.
|
|
135
|
+
|
|
136
|
+
`favicon`, `logo.image`, `logo.text`, `logo.font`, and
|
|
137
|
+
`reference.packageJson` are configuration-only and have no CLI flag equivalents.
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Themes And Styling
|
|
2
|
+
|
|
3
|
+
> Control the generated site's visual system with theme selection, local theme
|
|
4
|
+
> files, fonts, logos, backgrounds, and links.
|
|
5
|
+
|
|
6
|
+
Theme and styling options are resolved at build time and emitted as static CSS.
|
|
7
|
+
|
|
8
|
+
## Theme
|
|
9
|
+
|
|
10
|
+
By default, generated sites follow the visitor's system color scheme. lildocs
|
|
11
|
+
uses `vitesse-light` in light mode and `vitesse-dark` in dark mode.
|
|
12
|
+
|
|
13
|
+
Set `theme` to a string to force one visual theme and syntax highlighting theme:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"theme": "github-dark"
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Use `default`, `minimal`, or any bundled Shiki theme name, such as
|
|
22
|
+
`github-light` or `github-dark`.
|
|
23
|
+
|
|
24
|
+
Set `theme.light` and `theme.dark` to customize the system color-scheme pair:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"theme": {
|
|
29
|
+
"light": "github-light",
|
|
30
|
+
"dark": "github-dark-dimmed"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If the docs root contains `theme.ts`, lildocs loads it when `theme` is not set
|
|
36
|
+
and no `--theme` flag is provided.
|
|
37
|
+
|
|
38
|
+
Theme resolution order is:
|
|
39
|
+
|
|
40
|
+
1. `--theme`
|
|
41
|
+
2. `theme` from `config.json`
|
|
42
|
+
3. `theme.ts` in the docs root
|
|
43
|
+
4. The built-in system theme pair
|
|
44
|
+
|
|
45
|
+
## Local Theme Files
|
|
46
|
+
|
|
47
|
+
Create `theme.ts` in the docs root when you need a local theme object instead of
|
|
48
|
+
a named built-in or Shiki theme:
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
export default {
|
|
52
|
+
color: {
|
|
53
|
+
background: "#ffffff",
|
|
54
|
+
text: "#111111",
|
|
55
|
+
mutedText: "#666666",
|
|
56
|
+
border: "#e5e5e5",
|
|
57
|
+
link: "#2563eb",
|
|
58
|
+
codeBackground: "#f6f8fa",
|
|
59
|
+
},
|
|
60
|
+
font: {
|
|
61
|
+
body: "system-ui, sans-serif",
|
|
62
|
+
code: "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
63
|
+
},
|
|
64
|
+
background: {
|
|
65
|
+
gradient:
|
|
66
|
+
"linear-gradient(180deg, rgb(37 99 235 / 0.06), transparent 220px)",
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Local themes keep the token surface small: colors, font families, and syntax
|
|
72
|
+
highlighting theme configuration. `background.gradient` and
|
|
73
|
+
`background.blendMode` can be set on a local theme when the background should
|
|
74
|
+
come from the active light or dark theme.
|
|
75
|
+
|
|
76
|
+
Local themes can also tune code foreground color, sidebar background color, and
|
|
77
|
+
the Shiki theme used for syntax highlighting and Mermaid diagrams:
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
export default {
|
|
81
|
+
color: {
|
|
82
|
+
background: "#ffffff",
|
|
83
|
+
text: "#111111",
|
|
84
|
+
mutedText: "#666666",
|
|
85
|
+
border: "#e5e5e5",
|
|
86
|
+
link: "#2563eb",
|
|
87
|
+
codeBackground: "#f6f8fa",
|
|
88
|
+
codeForeground: "#24292e",
|
|
89
|
+
sidebarBackground: "#fafafa",
|
|
90
|
+
},
|
|
91
|
+
font: {
|
|
92
|
+
body: "system-ui, sans-serif",
|
|
93
|
+
mono: "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
94
|
+
},
|
|
95
|
+
shiki: {
|
|
96
|
+
theme: "github-light",
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Use `font.code` when you want to name the code font directly. Use `font.mono`
|
|
102
|
+
when a local theme should provide a general monospace fallback for code.
|
|
103
|
+
|
|
104
|
+
## Fonts
|
|
105
|
+
|
|
106
|
+
`font` configures the generated site's font families:
|
|
107
|
+
|
|
108
|
+
The default built-in theme uses Baloo 2 (600 and 700) for headings, Inter (400
|
|
109
|
+
and 500) for body and interface text, and JetBrains Mono for code.
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"font": {
|
|
114
|
+
"heading": "Inter",
|
|
115
|
+
"body": "Source Sans 3",
|
|
116
|
+
"code": "Roboto Mono"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Font values can be Google Fonts family names or local `.woff2`, `.woff`, `.ttf`,
|
|
122
|
+
or `.otf` file paths.
|
|
123
|
+
|
|
124
|
+
`font.heading` sets the font used for page titles and headings.
|
|
125
|
+
|
|
126
|
+
`font.body` sets the font used for normal text and interface text.
|
|
127
|
+
|
|
128
|
+
`font.code` sets the font used for inline code and fenced code blocks.
|
|
129
|
+
|
|
130
|
+
## Favicon
|
|
131
|
+
|
|
132
|
+
`favicon` configures the generated site's browser icon:
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"favicon": "./images/favicon.svg"
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The value can be a URL, data URL, absolute URL path, or docs-relative image
|
|
141
|
+
file. Local image files are copied into the generated site's assets.
|
|
142
|
+
|
|
143
|
+
## Logo
|
|
144
|
+
|
|
145
|
+
`logo` configures the generated site's header brand:
|
|
146
|
+
|
|
147
|
+
```json
|
|
148
|
+
{
|
|
149
|
+
"logo": {
|
|
150
|
+
"image": "./images/logo.svg",
|
|
151
|
+
"text": "Acme Docs",
|
|
152
|
+
"font": "Onest"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
`logo.image` can be a URL, data URL, absolute URL path, or docs-relative image
|
|
158
|
+
file. Local image files are copied into the generated site's assets.
|
|
159
|
+
|
|
160
|
+
`logo.text` sets the visible brand text. When both `logo.text` and `logo.image`
|
|
161
|
+
are omitted, the generated header uses the nearest `package.json` `name` as the
|
|
162
|
+
brand text.
|
|
163
|
+
|
|
164
|
+
`logo.font` sets the brand text font. Values can be Google Fonts family names or
|
|
165
|
+
local `.woff2`, `.woff`, `.ttf`, or `.otf` file paths.
|
|
166
|
+
|
|
167
|
+
## Background
|
|
168
|
+
|
|
169
|
+
`background` configures optional page background layers:
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
{
|
|
173
|
+
"background": {
|
|
174
|
+
"image": "./images/background.svg",
|
|
175
|
+
"gradient": "linear-gradient(135deg, rgb(121 184 255 / 0.14), transparent 38%)",
|
|
176
|
+
"blendMode": "screen"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
`background.image` adds a background image from a URL, CSS image function, or
|
|
182
|
+
docs-relative file path. Local image files are copied into the generated site's
|
|
183
|
+
assets.
|
|
184
|
+
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"background": {
|
|
188
|
+
"image": "radial-gradient(circle at top, rgb(37 99 235 / 0.18), transparent 42%)"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
`background.gradient` adds a CSS background gradient.
|
|
194
|
+
|
|
195
|
+
`background.blendMode` sets `background-blend-mode` for the theme color and
|
|
196
|
+
configured background layers.
|
|
197
|
+
|
|
198
|
+
No background gradient is generated by default. Add a `background` entry in
|
|
199
|
+
`config.json`, pass the matching CLI background flags, or define `background` in
|
|
200
|
+
a local theme when a page should use background layers.
|
|
201
|
+
|
|
202
|
+
## Links
|
|
203
|
+
|
|
204
|
+
`link` configures link presentation in generated Markdown content:
|
|
205
|
+
|
|
206
|
+
```json
|
|
207
|
+
{
|
|
208
|
+
"link": {
|
|
209
|
+
"underline": "hover"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
`link.underline` controls generated content link underlines. Use `always`,
|
|
215
|
+
`hover`, or `none`.
|
|
216
|
+
|
|
217
|
+
See the [configuration reference](configuration.md#appearance) for a compact
|
|
218
|
+
summary of every appearance field.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lildocs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"description": "A lightweight CLI that turns Markdown docs into a static searchable documentation site.",
|
|
5
5
|
"homepage": "https://aleclarson.github.io/lildocs/",
|
|
6
6
|
"repository": {
|
|
@@ -11,20 +11,27 @@
|
|
|
11
11
|
"lildocs": "dist/cli.mjs"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
|
-
"dist"
|
|
14
|
+
"dist",
|
|
15
|
+
"docs"
|
|
15
16
|
],
|
|
16
17
|
"type": "module",
|
|
17
18
|
"scripts": {
|
|
18
|
-
"build": "tsdown",
|
|
19
|
+
"build": "tsdown && node scripts/build-renderers.mjs",
|
|
19
20
|
"docs:serve": "pnpm run build && node dist/cli.mjs build ./docs --out ./dist/docs && sirv ./dist/docs",
|
|
20
|
-
"format": "prettier --write src schemas package.json tsconfig.json tsdown.config.ts vitest.config.ts .oxlintrc.json .prettierrc.json .vscode/settings.json",
|
|
21
|
-
"format:check": "prettier --check src schemas package.json tsconfig.json tsdown.config.ts vitest.config.ts .oxlintrc.json .prettierrc.json .vscode/settings.json",
|
|
22
|
-
"lint": "oxlint src tsdown.config.ts vitest.config.ts",
|
|
21
|
+
"format": "prettier --write src scripts schemas package.json tsconfig.json tsdown.config.ts vitest.config.ts .oxlintrc.json .prettierrc.json .vscode/settings.json",
|
|
22
|
+
"format:check": "prettier --check src scripts schemas package.json tsconfig.json tsdown.config.ts vitest.config.ts .oxlintrc.json .prettierrc.json .vscode/settings.json",
|
|
23
|
+
"lint": "oxlint src scripts tsdown.config.ts vitest.config.ts",
|
|
23
24
|
"test": "pnpm run build && vitest run",
|
|
24
25
|
"typecheck": "tsc --noEmit"
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|
|
27
28
|
"beautiful-mermaid": "^1.1.3",
|
|
29
|
+
"shiki": "^4.0.2"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@tsrx/prettier-plugin": "^0.3.93",
|
|
33
|
+
"@types/culori": "^4.0.1",
|
|
34
|
+
"@types/node": "^24.0.0",
|
|
28
35
|
"cmd-ts": "^0.15.0",
|
|
29
36
|
"culori": "^4.0.2",
|
|
30
37
|
"entities": "^8.0.0",
|
|
@@ -33,19 +40,10 @@
|
|
|
33
40
|
"marked": "^18.0.3",
|
|
34
41
|
"marked-shiki": "^1.2.1",
|
|
35
42
|
"octane": "^0.1.3",
|
|
36
|
-
"shiki": "^4.0.2",
|
|
37
|
-
"swup": "^4.9.0"
|
|
38
|
-
},
|
|
39
|
-
"peerDependencies": {
|
|
40
|
-
"vite": "^8.0.0"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@tsrx/prettier-plugin": "^0.3.93",
|
|
44
|
-
"@types/culori": "^4.0.1",
|
|
45
|
-
"@types/node": "^24.0.0",
|
|
46
43
|
"oxlint": "^1.65.0",
|
|
47
44
|
"prettier": "^3.9.5",
|
|
48
45
|
"sirv": "^3.0.2",
|
|
46
|
+
"swup": "^4.9.0",
|
|
49
47
|
"tsdown": "^0.22.0",
|
|
50
48
|
"typescript": "^5.9.0",
|
|
51
49
|
"vite": "^8.0.0",
|