lildocs 0.1.22 → 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 +1 -1
- package/dist/core/github-pages.mjs +1 -1
- package/dist/{github-pages-qzowPgcG.mjs → github-pages-CbcFNgKi.mjs} +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 +3 -2
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as renderGitHubPagesWorkflow, r as repoRelativeInputPath, t as normalizeBasePath } from "./github-pages-
|
|
2
|
+
import { n as renderGitHubPagesWorkflow, r as repoRelativeInputPath, t as normalizeBasePath } from "./github-pages-CbcFNgKi.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { spawn } from "node:child_process";
|
|
5
5
|
import process$1 from "node:process";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as renderGitHubPagesWorkflow, r as repoRelativeInputPath, t as normalizeBasePath } from "../github-pages-
|
|
1
|
+
import { n as renderGitHubPagesWorkflow, r as repoRelativeInputPath, t as normalizeBasePath } from "../github-pages-CbcFNgKi.mjs";
|
|
2
2
|
export { normalizeBasePath, renderGitHubPagesWorkflow, repoRelativeInputPath };
|
|
@@ -54,7 +54,7 @@ ${pnpmActionSetupOptions} - uses: actions/setup-node@49933ea5288caeca8642d1
|
|
|
54
54
|
cache: pnpm
|
|
55
55
|
- run: pnpm install --frozen-lockfile
|
|
56
56
|
- run: pnpm run build
|
|
57
|
-
- run: pnpm dlx
|
|
57
|
+
- run: pnpm dlx lildocs@${patchVersionRange(options.lildocsVersion ?? "0.1.23")} ${deployArgs.map(shellQuote).join(" ")}
|
|
58
58
|
- uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b
|
|
59
59
|
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa
|
|
60
60
|
with:
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg width="10" height="16" viewBox="0 0 10 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_1_2)">
|
|
3
|
+
<path d="M5.11698 5.72303L5.98949 5.72097C6.59708 5.72008 7.08739 5.65352 7.55885 6.12297C7.95541 6.51779 8.35186 6.91721 8.74704 7.31365L9.24895 7.81657C9.43919 8.00722 9.63506 8.18194 9.77234 8.41446C9.91283 8.65252 9.98544 8.92681 9.98739 9.20283C9.98957 9.49719 9.98819 9.7926 9.98773 10.0871L9.97935 12.1872L9.97923 13.483C9.97877 13.8008 9.9944 14.1797 9.93076 14.486C9.85721 14.8302 9.68906 15.1468 9.44539 15.3998C9.07008 15.7914 8.58322 15.9935 8.04536 15.9943C7.58056 15.995 7.11542 15.9943 6.65062 15.9944L3.82548 15.9941L2.60156 15.9947C2.29086 15.9952 1.896 16.0116 1.60101 15.9508C1.24514 15.8756 0.918547 15.6985 0.660645 15.441C0.25402 15.0383 0.0981978 14.5938 0.0957624 14.0317L0.0955787 9.46246L0.0954981 8.22245C0.0951419 7.42557 0.0571172 6.89988 0.667044 6.28567C0.922399 6.026 1.24665 5.8455 1.60122 5.76565C1.86805 5.70362 2.37682 5.7209 2.67353 5.72104L4.04813 5.72239C4.34301 5.72764 4.8299 5.73676 5.11698 5.72303Z" fill="#091C33"/>
|
|
4
|
+
<path d="M2.04379 6.78103C2.17184 6.77242 2.36456 6.77756 2.49755 6.7776L3.29003 6.77796L5.74893 6.7777L5.74859 8.46547C5.74974 8.90719 5.81108 9.2971 6.14136 9.6232C6.30489 9.78293 6.50783 9.89601 6.72931 9.95081C7.00984 10.0227 7.46017 10.0062 7.76081 10.0062L8.90753 10.0047C8.89363 10.9628 8.90178 11.9481 8.90006 12.9086L8.89868 13.6674C8.89845 13.8445 8.90845 14.0326 8.87961 14.2073C8.80379 14.6663 8.46467 14.9129 8.01653 14.9271L3.99575 14.9281L2.62705 14.929C2.22627 14.9286 1.79021 14.9989 1.46933 14.7209C1.13264 14.4292 1.17662 14.0814 1.17672 13.6788L1.17708 12.9021L1.17749 10.4668L1.17707 8.55905C1.17703 8.4395 1.17689 8.31799 1.17691 8.19937C1.177 7.71465 1.11037 7.19671 1.59524 6.91083C1.75343 6.81756 1.86165 6.79418 2.04379 6.78103Z" fill="white"/>
|
|
5
|
+
<path d="M6.83109 6.93333C6.89094 6.97812 7.03305 7.12698 7.08773 7.18283L7.48004 7.57966C7.91624 8.01946 8.39517 8.48566 8.81643 8.93523C8.45548 8.96719 8.04134 8.92623 7.67522 8.94146C7.48567 8.94942 7.27246 8.94746 7.08463 8.93281C6.95803 8.923 6.85085 8.81211 6.84109 8.6861C6.82259 8.48566 6.83052 8.27957 6.83052 8.07821L6.83109 6.93333Z" fill="white"/>
|
|
6
|
+
<path d="M4.64024 3.16599C4.7998 2.9671 4.78717 2.864 4.84736 2.62633C5.23623 1.09003 6.73321 0.205269 8.21906 0.0470532C8.4047 0.0272979 8.58874 0.0193244 8.77542 0.0187243C9.03918 0.0199014 9.24378 -0.0112317 9.25722 0.318193C9.298 1.30861 8.99828 2.2963 8.312 3.02507C7.70658 3.6732 6.8844 4.02573 6.00477 4.05069C5.76697 4.05744 5.42451 4.02056 5.25541 4.19796C5.19283 4.26412 5.14962 4.34633 5.13054 4.43556C5.11905 4.49036 5.11549 4.54508 5.11526 4.60215C5.114 4.97203 5.11503 5.34211 5.11595 5.71201L5.11698 5.72303C4.8299 5.73676 4.34301 5.72764 4.04813 5.72239C4.09486 5.72103 4.12416 5.72814 4.1587 5.70563C4.17531 5.64458 4.17068 5.27943 4.16628 5.18513C4.14614 4.7547 4.31143 4.10338 3.68541 4.06024C3.43078 4.04269 3.1976 4.05786 2.95147 4.03014C1.95779 3.91024 1.07329 3.3404 0.550384 2.48322C0.143758 1.82427 -0.0276751 1.00772 0.024951 0.238698C0.0426423 -0.0197594 0.333676 0.023213 0.508763 0.0213898C1.91144 0.00678102 3.447 0.641374 4.14908 1.91744C4.25061 2.10333 4.33388 2.29872 4.39773 2.50082C4.49193 2.7935 4.44345 2.9276 4.64024 3.16599Z" fill="#36AC0F"/>
|
|
7
|
+
</g>
|
|
8
|
+
<defs>
|
|
9
|
+
<clipPath id="clip0_1_2">
|
|
10
|
+
<rect width="10" height="16" fill="white"/>
|
|
11
|
+
</clipPath>
|
|
12
|
+
</defs>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg width="1170" height="279" viewBox="0 0 1170 279" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<style>
|
|
3
|
+
.wordmark { fill: #192638; }
|
|
4
|
+
@media (prefers-color-scheme: dark) {
|
|
5
|
+
.wordmark { fill: #fff; }
|
|
6
|
+
}
|
|
7
|
+
</style>
|
|
8
|
+
<path d="M538.97 7.16949C567.35 4.30853 564.81 24.1859 564.83 44.5269C564.87 72.7909 564.83 101.091 564.85 129.356L564.88 208.38C564.87 223.64 566.78 250.157 561.64 264.321C558.08 274.11 544.6 276.68 535.98 271.434C527.36 266.183 526.52 262.47 523.88 252.908C518.86 256.928 514.26 260.913 508.73 264.293C477.122 283.633 439.882 279.403 409.644 259.955C406.854 257.996 404.16 255.902 401.573 253.681C391.933 245.352 384.07 235.164 378.454 223.727C372.839 212.291 369.587 199.839 368.892 187.118C368.03 174.003 369.795 160.848 374.083 148.424C378.371 136.001 385.096 124.558 393.865 114.767C421.971 83.2562 470.672 73.4967 507.47 95.5806C510.8 97.5806 520.43 105.545 523.54 105.358C528.09 98.6633 522.31 30.5359 526.66 18.816C529.11 12.2311 532.99 9.97048 538.97 7.16949ZM527.18 177.097C525.37 144.43 497.575 119.325 464.893 120.845C431.8 122.384 406.31 150.61 408.141 183.688C409.972 216.766 438.423 242.006 471.483 239.882C504.13 237.785 528.99 209.764 527.18 177.097Z" class="wordmark"/>
|
|
9
|
+
<path d="M684.93 82.7676C738.83 75.2808 788.58 112.948 796 166.861C803.42 220.774 765.69 270.48 711.77 277.832C657.94 285.171 608.35 247.523 600.94 193.705C593.53 139.887 631.12 90.2406 684.93 82.7676ZM758.58 177.227C756.88 144.421 729.11 119.087 696.28 120.398C685.678 120.823 675.378 124.051 666.43 129.755C657.483 135.459 650.21 143.434 645.35 152.866C640.491 162.299 638.22 172.852 638.77 183.449C639.32 194.046 642.671 204.309 648.48 213.188C654.292 222.067 662.356 229.246 671.847 233.992C681.339 238.738 691.92 240.882 702.51 240.205C735.29 238.109 760.29 210.033 758.58 177.227Z" class="wordmark"/>
|
|
10
|
+
<path d="M1087.55 84.282C1090.71 83.9967 1093.88 83.8283 1097.06 83.777C1116.06 83.619 1163.23 92.858 1162.99 117.179C1162.96 119.45 1162.48 121.692 1161.58 123.776C1160.67 125.86 1159.37 127.745 1157.73 129.321C1140.91 145.563 1121.35 113.103 1100.21 115.319C1086.61 116.743 1068.7 120.798 1069.25 138.47C1069.77 155.398 1095.97 159.763 1108.32 163.856C1137.68 172.439 1169.68 183.581 1169.48 219.67C1169.24 262.956 1132.41 276.609 1094.87 276.687C1070.51 275.53 1041.6 268.552 1026.25 248.042C1019.3 238.747 1026.87 222.658 1038.97 221.733C1051.25 220.793 1058.67 230.522 1067.67 236.72C1083.12 247.353 1115.46 249.972 1127.48 232.689C1146.8 204.017 1091.71 193.731 1073.1 187.922C1035.79 176.277 1016.6 144.553 1039.91 109.213C1049.89 94.071 1069.55 86.933 1087.55 84.282ZM840.15 230.585C826.55 205.705 822.15 181.089 830.25 153.349C833.73 141.224 839.584 129.911 847.472 120.067C855.36 110.223 865.125 102.044 876.2 96.005C901.63 82.221 932.98 80.533 960.37 88.777C969.69 91.582 988.76 98.983 993.25 108.081C995.68 112.984 996.6 116.698 994.93 122.031C994.124 124.569 992.818 126.92 991.091 128.947C989.363 130.974 987.248 132.635 984.87 133.834C968.17 142.119 943.08 106.915 901.1 126.001C893.916 129.251 887.452 133.9 882.084 139.676C876.717 145.452 872.555 152.24 869.84 159.643C864.343 174.282 864.857 190.501 871.27 204.763C884.6 233.777 914.23 245.687 944.4 237.905C960.53 233.743 982.69 214.204 993.75 235.346C1001.24 250.541 988.28 260.196 976.16 265.806C949.19 278.286 917.23 280.162 889.18 270.264C872.74 264.463 851.81 250.097 843.17 234.519L840.15 230.585ZM18.122 9.31499C24.009 8.55199 29.788 8.79499 35.243 11.32C41.083 14.023 44.037 18.875 45.566 24.913C48.727 37.391 47.081 52.426 47.059 65.276C47.009 95.889 43.559 196.579 51.67 218.224C58.43 236.263 72.178 231.22 86.138 237.692C90.11 239.534 93.323 242.257 94.775 246.5C96.392 251.227 96.022 258.549 93.731 263.024C90.593 269.156 84.682 271.889 78.501 273.905C31.295 279.975 4.32701 249.42 2.24701 204.616C-0.373987 148.151 1.85201 90.582 1.14301 33.983C0.98401 21.309 6.58401 13.994 18.122 9.31499ZM267.001 9.30098C272.593 8.45198 278.356 8.67599 283.575 11.02C289.278 13.581 292.76 18.341 294.435 24.246C297.923 36.54 296.171 51.995 296.145 64.767C296.09 92.546 292.482 197.937 300.666 218.934C307.359 236.105 320.853 231.46 334.369 237.649C338.447 239.516 342.254 242.231 343.822 246.622C345.531 251.41 344.658 258.576 342.41 263.125C339.516 268.982 333.772 271.602 327.969 273.655C234.238 286.258 251.888 176.431 250.686 117.8C250.112 89.753 250.532 61.507 250.598 33.453C250.628 20.873 255.694 14.317 267.001 9.30098ZM155.184 87.15C160.262 86.848 165.085 87.321 169.757 89.446C174.595 91.646 178.915 95.987 180.64 101.071C184.459 112.325 183.816 232.736 182.387 251.112C182.106 254.728 181.44 257.912 179.831 261.201C176.357 268.304 170.782 271.047 163.735 273.48C159.129 273.885 154.64 273.504 150.343 271.751C145.18 269.644 140.705 265.411 138.625 260.192C134.477 249.79 135.477 129.202 136.736 110.527C136.991 106.731 137.392 103.215 139.019 99.709C142.349 92.528 148.214 89.743 155.184 87.15Z" class="wordmark"/>
|
|
11
|
+
<path d="M199.746 0.414981C203.01 0.0379807 203.675 -0.00801298 206.916 0.458987L207.92 1.89199C206.65 13.757 195.765 37.607 188.095 46.823C175.275 62.228 161.086 67.176 141.892 69.356C138.494 69.784 134.59 70.755 131.72 69.146C131.445 68.669 131.018 67.795 131.031 67.259C131.504 48.139 135.432 26.655 151.694 14.459C165.386 4.19099 183.235 2.08398 199.746 0.414981Z" fill="#38AC3C"/>
|
|
12
|
+
</svg>
|
package/docs/config.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../schemas/config.schema.json",
|
|
3
|
+
"link": {
|
|
4
|
+
"underline": "hover"
|
|
5
|
+
},
|
|
6
|
+
"favicon": "./assets/favicon.svg",
|
|
7
|
+
"logo": {
|
|
8
|
+
"image": "./assets/logo.svg"
|
|
9
|
+
},
|
|
10
|
+
"navigation": {
|
|
11
|
+
"order": [
|
|
12
|
+
"getting-started.md",
|
|
13
|
+
"features/content.md",
|
|
14
|
+
"features/navigation.md",
|
|
15
|
+
"features/search.md",
|
|
16
|
+
"features/mermaid.md",
|
|
17
|
+
"features/api-reference.md",
|
|
18
|
+
"guides/",
|
|
19
|
+
"reference/"
|
|
20
|
+
],
|
|
21
|
+
"duration": 125
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Generated API Reference
|
|
2
|
+
|
|
3
|
+
> Generate static API pages from a package's exported TypeScript declarations.
|
|
4
|
+
|
|
5
|
+
Set `reference.packageJson` to a docs-root-relative package manifest:
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"reference": {
|
|
10
|
+
"packageJson": "../package.json"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
When the manifest exposes TypeScript declarations, lildocs generates API pages
|
|
16
|
+
under `/reference/`. If `reference.packageJson` is not configured, lildocs also
|
|
17
|
+
checks for a `package.json` next to the docs root. Sibling package manifests
|
|
18
|
+
without an `exports` field are ignored.
|
|
19
|
+
|
|
20
|
+
## Export Paths
|
|
21
|
+
|
|
22
|
+
Reference pages are generated with `exports-md`. Package export maps follow
|
|
23
|
+
relative imports and re-exports by default, and property comments render below
|
|
24
|
+
declaration blocks.
|
|
25
|
+
|
|
26
|
+
Each export uses its full package specifier as its pathname. For a package named
|
|
27
|
+
`foo`, the `.` export is written to `/reference/foo.html`, while `./bar` is
|
|
28
|
+
written to `/reference/foo/bar.html`.
|
|
29
|
+
|
|
30
|
+
When the nearest package metadata points to a GitHub repository, generated
|
|
31
|
+
symbol sections include GitHub code search links.
|
|
32
|
+
|
|
33
|
+
See the [configuration reference](../reference/configuration.md#generated-reference)
|
|
34
|
+
for the field summary.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Writing Content
|
|
2
|
+
|
|
3
|
+
> Use Markdown, frontmatter, links, assets, callouts, and page metadata to write
|
|
4
|
+
> lildocs pages.
|
|
5
|
+
|
|
6
|
+
Write normal Markdown files in your docs folder. lildocs supports standard and
|
|
7
|
+
GitHub-flavored Markdown, syntax-highlighted code blocks with copy buttons,
|
|
8
|
+
heading anchors, frontmatter, and local assets.
|
|
9
|
+
|
|
10
|
+
## Page Titles
|
|
11
|
+
|
|
12
|
+
Page titles are inferred in this order:
|
|
13
|
+
|
|
14
|
+
1. `title` in frontmatter
|
|
15
|
+
2. The first `h1`
|
|
16
|
+
3. The filename
|
|
17
|
+
|
|
18
|
+
Use frontmatter when the navigation label should differ from the visible page
|
|
19
|
+
heading:
|
|
20
|
+
|
|
21
|
+
```md
|
|
22
|
+
---
|
|
23
|
+
title: CLI Reference
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# Command Line
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Page Subtitles
|
|
30
|
+
|
|
31
|
+
Place a plain blockquote immediately after the page `h1` to render short
|
|
32
|
+
supporting copy as a subtitle:
|
|
33
|
+
|
|
34
|
+
```md
|
|
35
|
+
# Command Line
|
|
36
|
+
|
|
37
|
+
> Choose the command and flags for building, previewing, or deploying docs.
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Keep subtitles brief and descriptive. Blockquotes elsewhere on the page continue
|
|
41
|
+
to render as regular quoted notes unless they use GitHub-style callout syntax.
|
|
42
|
+
|
|
43
|
+
## Links And Assets
|
|
44
|
+
|
|
45
|
+
Use normal relative Markdown links:
|
|
46
|
+
|
|
47
|
+
```md
|
|
48
|
+
Read the [CLI reference](../reference/cli.md).
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Use normal Markdown images for local assets:
|
|
52
|
+
|
|
53
|
+
```md
|
|
54
|
+

|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+

|
|
58
|
+
|
|
59
|
+
Local assets referenced by Markdown are copied into the generated site.
|
|
60
|
+
|
|
61
|
+
## Callouts
|
|
62
|
+
|
|
63
|
+
Use GitHub-style blockquote callouts to highlight notes, tips, important
|
|
64
|
+
details, warnings, and cautions:
|
|
65
|
+
|
|
66
|
+
```md
|
|
67
|
+
> [!NOTE]
|
|
68
|
+
> Useful context for readers who are skimming.
|
|
69
|
+
|
|
70
|
+
> [!WARNING]
|
|
71
|
+
> Something readers should check before continuing.
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Supported callout types are `NOTE`, `TIP`, `IMPORTANT`, `WARNING`, and
|
|
75
|
+
`CAUTION`.
|
|
76
|
+
|
|
77
|
+
> [!TIP]
|
|
78
|
+
> Callouts are rendered as regular static HTML and work without client-side
|
|
79
|
+
> JavaScript.
|
|
80
|
+
|
|
81
|
+
## Related Features
|
|
82
|
+
|
|
83
|
+
- [Navigation and page structure](navigation.md) explains how files become a
|
|
84
|
+
site hierarchy.
|
|
85
|
+
- [Mermaid diagrams](mermaid.md) covers build-time diagram rendering.
|
|
86
|
+
- [Local search](search.md) explains how page content is indexed.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Mermaid Diagrams
|
|
2
|
+
|
|
3
|
+
> Add themed diagrams that lildocs renders to static SVG during the build.
|
|
4
|
+
|
|
5
|
+
Use fenced `mermaid` code blocks:
|
|
6
|
+
|
|
7
|
+
````md
|
|
8
|
+
```mermaid
|
|
9
|
+
flowchart LR
|
|
10
|
+
Markdown --> Build
|
|
11
|
+
Build --> StaticHTML[Static HTML]
|
|
12
|
+
```
|
|
13
|
+
````
|
|
14
|
+
|
|
15
|
+
```mermaid
|
|
16
|
+
flowchart LR
|
|
17
|
+
Markdown --> Build
|
|
18
|
+
Build --> StaticHTML[Static HTML]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Static Rendering
|
|
22
|
+
|
|
23
|
+
lildocs renders Mermaid diagrams during the build. Generated pages contain
|
|
24
|
+
static SVG and do not load Mermaid from a CDN or require Mermaid client
|
|
25
|
+
JavaScript.
|
|
26
|
+
|
|
27
|
+
Readers can expand a rendered diagram to fill the viewport. Diagram colors come
|
|
28
|
+
from the active Shiki theme and follow configured light and dark themes.
|
|
29
|
+
|
|
30
|
+
Invalid Mermaid syntax fails the build with the source page and diagram number
|
|
31
|
+
in the error message.
|
|
32
|
+
|
|
33
|
+
See [Themes and styling](../reference/theming.md) to configure the themes used
|
|
34
|
+
for syntax highlighting and diagrams.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Navigation And Page Structure
|
|
2
|
+
|
|
3
|
+
> Turn a Markdown file tree into a home page, sidebar groups, breadcrumbs, and
|
|
4
|
+
> previous and next links.
|
|
5
|
+
|
|
6
|
+
## Docs Root And Home Page
|
|
7
|
+
|
|
8
|
+
When the input is a folder, lildocs treats that folder as the docs root and
|
|
9
|
+
looks for a home page in this order:
|
|
10
|
+
|
|
11
|
+
1. `README.md`
|
|
12
|
+
2. `readme.md`
|
|
13
|
+
3. `index.md`
|
|
14
|
+
4. `intro.md`
|
|
15
|
+
5. `introduction.md`
|
|
16
|
+
6. `getting-started.md`
|
|
17
|
+
7. `quickstart.md`
|
|
18
|
+
|
|
19
|
+
If none of those files exists, the first Markdown file found in the folder tree
|
|
20
|
+
is used as the home page.
|
|
21
|
+
|
|
22
|
+
When the input is a Markdown file, that file becomes the home page and its
|
|
23
|
+
parent folder becomes the docs root:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
lildocs ./docs/index.md
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Generated Navigation
|
|
30
|
+
|
|
31
|
+
Nested folders become nested navigation groups, and hidden or system files are
|
|
32
|
+
ignored.
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
docs/
|
|
36
|
+
index.md
|
|
37
|
+
getting-started.md
|
|
38
|
+
guides/
|
|
39
|
+
github-pages.md
|
|
40
|
+
reference/
|
|
41
|
+
cli.md
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This tree creates a top-level sidebar link for `getting-started.md`, plus
|
|
45
|
+
`Guides` and `Reference` groups. The home page is not repeated in the sidebar;
|
|
46
|
+
the generated header brand links back to it instead.
|
|
47
|
+
|
|
48
|
+
Pages inside folders show a small group breadcrumb above the page content. The
|
|
49
|
+
label comes from the folder name.
|
|
50
|
+
|
|
51
|
+
## Ordering Pages
|
|
52
|
+
|
|
53
|
+
When the home page links to local Markdown documents, those pages are hoisted in
|
|
54
|
+
the sidebar in first-reference order. Unlinked pages continue to use generated
|
|
55
|
+
folder order.
|
|
56
|
+
|
|
57
|
+
Use `navigation.order` when you want to make the order explicit:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"navigation": {
|
|
62
|
+
"order": ["getting-started.md", "features/", "reference/"]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Entries are docs-root-relative Markdown files or folders. Unlisted pages keep
|
|
68
|
+
home-page link order, then generated order after listed siblings.
|
|
69
|
+
|
|
70
|
+
Multi-page sites also get previous and next links at the bottom of each page.
|
|
71
|
+
Those links follow the same order as the sidebar.
|
|
72
|
+
|
|
73
|
+
## Page Transitions
|
|
74
|
+
|
|
75
|
+
Enhanced page navigation can use a transition preset and custom timing:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"navigation": {
|
|
80
|
+
"transition": "slide",
|
|
81
|
+
"duration": 160,
|
|
82
|
+
"easing": "cubic-bezier(0.16, 1, 0.3, 1)"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`navigation.transition` accepts `fade`, `slide`, `scale`, or `instant`.
|
|
88
|
+
`navigation.duration` is measured in milliseconds, and `navigation.easing`
|
|
89
|
+
accepts any valid CSS timing function.
|
|
90
|
+
|
|
91
|
+
See the [configuration reference](../reference/configuration.md#navigation) for
|
|
92
|
+
the complete field summary.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Local Search
|
|
2
|
+
|
|
3
|
+
> Give readers fast section-level search without a hosted service.
|
|
4
|
+
|
|
5
|
+
Search is generated locally at build time from page titles, headings, and body
|
|
6
|
+
text. The generated `search-index.json` is emitted with the static site, so no
|
|
7
|
+
external search service is required.
|
|
8
|
+
|
|
9
|
+
## Section Results
|
|
10
|
+
|
|
11
|
+
`h2` and `h3` sections get their own search entries. Results can link directly
|
|
12
|
+
to the most useful section instead of only opening the top of a page:
|
|
13
|
+
|
|
14
|
+
```md
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
Run the package manager command.
|
|
18
|
+
|
|
19
|
+
### Local Files
|
|
20
|
+
|
|
21
|
+
Place screenshots in the docs folder and reference them with relative paths.
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Search Interface
|
|
25
|
+
|
|
26
|
+
The search UI highlights matching terms and supports Arrow Up, Arrow Down,
|
|
27
|
+
Enter, and Escape. It also prefetches local result pages while readers browse
|
|
28
|
+
results.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Getting Started
|
|
2
|
+
|
|
3
|
+
> Install lildocs, build your first static docs site, and start the local
|
|
4
|
+
> development server.
|
|
5
|
+
|
|
6
|
+
Run lildocs directly with `pnpm dlx`:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
pnpm dlx lildocs@0.1.x ./docs
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Or add it to a project:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pnpm add -D lildocs
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Then call it from package scripts:
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"scripts": {
|
|
23
|
+
"docs:build": "lildocs build ./docs",
|
|
24
|
+
"docs:dev": "lildocs dev ./docs"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Build A Site
|
|
30
|
+
|
|
31
|
+
The shortest build command is:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
lildocs ./docs
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This treats `./docs` as the docs root, finds a home page, generates navigation
|
|
38
|
+
from the folder structure, builds a local search index, copies assets, and writes
|
|
39
|
+
the site to `dist`.
|
|
40
|
+
|
|
41
|
+
Use the explicit `build` subcommand when a script or CI job should make the
|
|
42
|
+
intent obvious:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
lildocs build ./docs
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
If the input path points to a Markdown file, that file becomes the home page and
|
|
49
|
+
its parent folder becomes the docs root:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
lildocs ./docs/index.md
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The output is self-contained. Page links are relative, local assets are copied
|
|
56
|
+
into the output folder, and `search-index.json` is generated next to the HTML
|
|
57
|
+
files.
|
|
58
|
+
|
|
59
|
+
## Preview Locally
|
|
60
|
+
|
|
61
|
+
Use the development server while writing:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
lildocs dev ./docs
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The dev server writes generated files to `.lildocs` by default and serves them
|
|
68
|
+
through Vite from `127.0.0.1:3000`. Add `--open` to launch the preview in your
|
|
69
|
+
default browser.
|
|
70
|
+
|
|
71
|
+
Choose a different output folder when you want to inspect the generated files:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
lildocs dev ./docs --out ./.docs-preview
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Choose the host or port when the defaults conflict with another local service:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
lildocs dev ./docs --host 0.0.0.0 --port 4173
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The dev output directory must stay inside the current workspace, cannot be the
|
|
84
|
+
repository root, and cannot contain the docs root.
|
|
85
|
+
|
|
86
|
+
## Next Steps
|
|
87
|
+
|
|
88
|
+
Read [Writing content](features/content.md) and
|
|
89
|
+
[Navigation and page structure](features/navigation.md) to organize your docs.
|
|
90
|
+
Then explore [local search](features/search.md),
|
|
91
|
+
[Mermaid diagrams](features/mermaid.md), and the
|
|
92
|
+
[generated API reference](features/api-reference.md), or use the
|
|
93
|
+
[CLI reference](reference/cli.md) and
|
|
94
|
+
[configuration reference](reference/configuration.md) for option details.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# GitHub Pages
|
|
2
|
+
|
|
3
|
+
> Generate GitHub Pages-ready output and wire it into an Actions workflow without
|
|
4
|
+
> changing how the static site is built.
|
|
5
|
+
|
|
6
|
+
Use `deploy` to build GitHub Pages-ready output:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
lildocs deploy ./docs
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`deploy` builds the same static site as `build`, then adds Pages deployment
|
|
13
|
+
metadata:
|
|
14
|
+
|
|
15
|
+
- `.nojekyll`
|
|
16
|
+
- `lildocs-deploy.json`
|
|
17
|
+
|
|
18
|
+
The command prepares files only. It does not commit, push, or publish your site.
|
|
19
|
+
|
|
20
|
+
## Project Pages
|
|
21
|
+
|
|
22
|
+
Use `--base` for GitHub project pages metadata:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
lildocs deploy ./docs --out ./site --base /repo-name/
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Generated page links remain relative so the site can still be opened directly
|
|
29
|
+
from disk.
|
|
30
|
+
|
|
31
|
+
## GitHub Actions Workflow
|
|
32
|
+
|
|
33
|
+
Use `init github-pages` to create a Pages workflow:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
lildocs init github-pages ./docs --out ./site
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This writes `.github/workflows/lildocs-pages.yml` if it does not already exist.
|
|
40
|
+
The workflow installs dependencies with pnpm, builds the project, runs
|
|
41
|
+
the current lildocs major and minor release line with `pnpm dlx`, uploads the
|
|
42
|
+
output with `actions/upload-pages-artifact`, and deploys with
|
|
43
|
+
`actions/deploy-pages`. Lildocs does not need to be a project dependency.
|
|
44
|
+
|
|
45
|
+
Pass the same output and base path that the workflow should use:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
lildocs init github-pages ./docs --out ./site --base /repo-name/
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
In the repository settings, set Pages source to **GitHub Actions** before relying
|
|
52
|
+
on the workflow.
|
|
53
|
+
|
|
54
|
+
## Repository Link
|
|
55
|
+
|
|
56
|
+
Generated sites include a GitHub icon button before search when lildocs can
|
|
57
|
+
detect a GitHub repository.
|
|
58
|
+
|
|
59
|
+
During GitHub Actions builds, lildocs reads `GITHUB_REPOSITORY` as
|
|
60
|
+
`<owner>/<repo>`. For local builds, it walks up from the docs root to the nearest
|
|
61
|
+
`package.json` and uses the `repository` field when it points to GitHub.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="240" height="120" role="img" aria-label="Example image">
|
|
2
|
+
<rect width="240" height="120" fill="#f6f8fa"/>
|
|
3
|
+
<circle cx="72" cy="60" r="32" fill="#2563eb"/>
|
|
4
|
+
<path d="M120 42h72v12h-72zm0 24h54v12h-54z" fill="#111111"/>
|
|
5
|
+
</svg>
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Introducing lildocs
|
|
2
|
+
|
|
3
|
+
> A map of the lildocs documentation, from first build through content,
|
|
4
|
+
> navigation, search, diagrams, configuration, and deployment.
|
|
5
|
+
|
|
6
|
+
`lildocs` builds a static, searchable documentation site from Markdown files.
|
|
7
|
+
The default path is intentionally short:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
lildocs ./docs
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Use this documentation to learn how lildocs resolves input, turns folders into
|
|
14
|
+
site navigation, applies configuration, and prepares output for local preview or
|
|
15
|
+
GitHub Pages.
|
|
16
|
+
|
|
17
|
+
## Start Here
|
|
18
|
+
|
|
19
|
+
- [Getting started](getting-started.md) covers installation, the first build, and
|
|
20
|
+
local development.
|
|
21
|
+
- [CLI reference](reference/cli.md) lists every command and flag.
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
- [Writing content](features/content.md) covers Markdown, page metadata, links,
|
|
26
|
+
assets, and callouts.
|
|
27
|
+
- [Navigation and page structure](features/navigation.md) explains home-page
|
|
28
|
+
discovery, generated sidebars, ordering, breadcrumbs, and transitions.
|
|
29
|
+
- [Local search](features/search.md) covers the static index, section-level
|
|
30
|
+
results, and keyboard navigation.
|
|
31
|
+
- [Mermaid diagrams](features/mermaid.md) explains build-time static rendering,
|
|
32
|
+
themes, and error reporting.
|
|
33
|
+
- [Generated API reference](features/api-reference.md) turns exported TypeScript
|
|
34
|
+
declarations into static reference pages.
|
|
35
|
+
|
|
36
|
+
## Configuration And Styling
|
|
37
|
+
|
|
38
|
+
- [Configuration reference](reference/configuration.md) lists `config.json`
|
|
39
|
+
fields, schema support, precedence, and CLI flag mappings.
|
|
40
|
+
- [Themes and styling](reference/theming.md) covers built-in themes, Shiki
|
|
41
|
+
themes, local `theme.ts`, fonts, backgrounds, and link styling.
|
|
42
|
+
|
|
43
|
+
## Publishing
|
|
44
|
+
|
|
45
|
+
- [GitHub Pages deployment](guides/github-pages.md) shows how to generate
|
|
46
|
+
Pages-ready output and initialize a deployment workflow.
|
|
@@ -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,7 +11,8 @@
|
|
|
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": {
|