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.
Files changed (36) hide show
  1. package/dist/cli.mjs +19239 -1145
  2. package/dist/core/github-pages.mjs +1 -1
  3. package/dist/{github-pages-clWLKtga.mjs → github-pages-CbcFNgKi.mjs} +17 -10
  4. package/dist/render/client/.vite/manifest.json +8 -0
  5. package/dist/render/client/assets/client-BCZ1mVzx.js +5311 -0
  6. package/dist/render/server/renderer.mjs +714 -0
  7. package/dist/render/styles.css +1 -1
  8. package/docs/assets/favicon.svg +13 -0
  9. package/docs/assets/logo.svg +12 -0
  10. package/docs/config.json +23 -0
  11. package/docs/features/api-reference.md +34 -0
  12. package/docs/features/content.md +86 -0
  13. package/docs/features/mermaid.md +34 -0
  14. package/docs/features/navigation.md +92 -0
  15. package/docs/features/search.md +28 -0
  16. package/docs/getting-started.md +94 -0
  17. package/docs/guides/github-pages.md +61 -0
  18. package/docs/images/example.svg +5 -0
  19. package/docs/index.md +46 -0
  20. package/docs/reference/cli.md +138 -0
  21. package/docs/reference/configuration.md +137 -0
  22. package/docs/reference/theming.md +218 -0
  23. package/package.json +14 -16
  24. package/dist/render/Layout.tsrx +0 -380
  25. package/dist/render/Search.tsrx +0 -414
  26. package/dist/render/client.tsrx +0 -52
  27. package/dist/render/copy-code.ts +0 -56
  28. package/dist/render/heading-links.ts +0 -85
  29. package/dist/render/navigation.ts +0 -16
  30. package/dist/render/paths.ts +0 -47
  31. package/dist/render/renderPage.tsrx +0 -14
  32. package/dist/render/section-highlight.ts +0 -63
  33. package/dist/render/sidebar.ts +0 -93
  34. package/dist/render/table-viewer.ts +0 -161
  35. package/dist/render/toc-visibility.ts +0 -78
  36. package/dist/render/types.ts +0 -9
@@ -850,7 +850,7 @@ html.mermaidFullscreenOpen {
850
850
  opacity: 1;
851
851
  }
852
852
 
853
- .toc a {
853
+ .tocLinks a {
854
854
  display: block;
855
855
  overflow: hidden;
856
856
  color: var(--ld-color-muted-text);
@@ -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>
@@ -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
+ ![Small example image](../images/example.svg)
55
+ ```
56
+
57
+ ![Small example image](../images/example.svg)
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.