@openlaboratory/open-doc 0.1.0 → 0.1.3
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/app/src/integrations/open-doc-config.mjs +62 -12
- package/package.json +5 -2
- package/app/.astro/collections/docs.schema.json +0 -24
- package/app/.astro/content-assets.mjs +0 -1
- package/app/.astro/content-modules.mjs +0 -4
- package/app/.astro/content.d.ts +0 -218
- package/app/.astro/data-store.json +0 -1
- package/app/.astro/settings.json +0 -5
- package/app/.astro/types.d.ts +0 -2
- package/app/node_modules/.astro/data-store.json +0 -1
- package/app/node_modules/.vite/deps/@astrojs_react_client__js.js +0 -163
- package/app/node_modules/.vite/deps/@astrojs_react_client__js.js.map +0 -7
- package/app/node_modules/.vite/deps/_metadata.json +0 -67
- package/app/node_modules/.vite/deps/astro___aria-query.js +0 -6776
- package/app/node_modules/.vite/deps/astro___aria-query.js.map +0 -7
- package/app/node_modules/.vite/deps/astro___axobject-query.js +0 -3754
- package/app/node_modules/.vite/deps/astro___axobject-query.js.map +0 -7
- package/app/node_modules/.vite/deps/astro___cssesc.js +0 -99
- package/app/node_modules/.vite/deps/astro___cssesc.js.map +0 -7
- package/app/node_modules/.vite/deps/chunk-55ZOATU5.js +0 -305
- package/app/node_modules/.vite/deps/chunk-55ZOATU5.js.map +0 -7
- package/app/node_modules/.vite/deps/chunk-5WRI5ZAA.js +0 -30
- package/app/node_modules/.vite/deps/chunk-5WRI5ZAA.js.map +0 -7
- package/app/node_modules/.vite/deps/chunk-FEZZJEG2.js +0 -6935
- package/app/node_modules/.vite/deps/chunk-FEZZJEG2.js.map +0 -7
- package/app/node_modules/.vite/deps/package.json +0 -3
- package/app/node_modules/.vite/deps/react-dom.js +0 -6
- package/app/node_modules/.vite/deps/react-dom.js.map +0 -7
- package/app/node_modules/.vite/deps/react.js +0 -5
- package/app/node_modules/.vite/deps/react.js.map +0 -7
- package/app/node_modules/.vite/deps/react_jsx-dev-runtime.js +0 -39
- package/app/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +0 -7
- package/app/node_modules/.vite/deps/react_jsx-runtime.js +0 -57
- package/app/node_modules/.vite/deps/react_jsx-runtime.js.map +0 -7
|
@@ -1,9 +1,64 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url'
|
|
2
|
+
import { createRequire } from 'node:module'
|
|
3
|
+
|
|
4
|
+
// The bundled Astro app this integration ships inside, e.g.
|
|
5
|
+
// `…/node_modules/@openlaboratory/open-doc/app`. Its `src/` holds the React
|
|
6
|
+
// island components Vite must be allowed to serve in dev.
|
|
7
|
+
const APP_ROOT = fileURLToPath(new URL('../../', import.meta.url))
|
|
8
|
+
|
|
9
|
+
// Resolve specifiers from open-doc's own install (not the consumer's).
|
|
10
|
+
const require = createRequire(import.meta.url)
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Astro's static build emits an SSR server bundle into the consumer's `dist/`
|
|
14
|
+
* and then runs it with Node to prerender the pages. That bundle keeps open-doc's
|
|
15
|
+
* runtime deps (Astro, the React renderer, and their transitive deps like
|
|
16
|
+
* `clsx`/`piccolore`) as bare `import` specifiers — but those live in open-doc's
|
|
17
|
+
* own `node_modules`, not the consumer's, so under a strict (non-hoisted) install
|
|
18
|
+
* Node can't resolve them from `dist/` and prerendering fails.
|
|
19
|
+
*
|
|
20
|
+
* This plugin rewrites those bare specifiers to absolute paths resolved from
|
|
21
|
+
* open-doc's install, making the build self-contained under any package manager
|
|
22
|
+
* or workspace layout — without consumer-side hoisting. It runs in `renderChunk`
|
|
23
|
+
* (after Astro's module graph is fully resolved) so Astro's own resolution and
|
|
24
|
+
* virtual modules (`astro:*`) are left untouched. Client chunks bundle their
|
|
25
|
+
* deps, so they have nothing bare to rewrite.
|
|
26
|
+
*
|
|
27
|
+
* @returns {import('vite').Plugin}
|
|
28
|
+
*/
|
|
29
|
+
function absolutizeSsrExternals() {
|
|
30
|
+
const rewrite = (_match, pre, quote, spec) => {
|
|
31
|
+
if (/^[./]/.test(spec) || spec.startsWith('\0') || spec.includes(':')) return _match
|
|
32
|
+
try {
|
|
33
|
+
return pre + quote + require.resolve(spec) + quote
|
|
34
|
+
} catch {
|
|
35
|
+
return _match
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
name: 'open-doc:absolutize-ssr-externals',
|
|
40
|
+
renderChunk(code) {
|
|
41
|
+
// Only the SSR build emits bare external imports; skip the client build.
|
|
42
|
+
if (this.environment && this.environment.name !== 'ssr') return null
|
|
43
|
+
const out = code
|
|
44
|
+
// `import … from '<spec>'` / `export … from '<spec>'`
|
|
45
|
+
.replace(/^(\s*(?:import|export)\b[^\n'"]*?\bfrom\s*)(['"])([^'"]+)\2/gm, rewrite)
|
|
46
|
+
// bare side-effect `import '<spec>'`
|
|
47
|
+
.replace(/^(\s*import\s+)(['"])([^'"]+)\2/gm, rewrite)
|
|
48
|
+
// dynamic `import('<spec>')`
|
|
49
|
+
.replace(/(\bimport\s*\(\s*)(['"])([^'"]+)\2/g, rewrite)
|
|
50
|
+
return out === code ? null : { code: out }
|
|
51
|
+
},
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
1
55
|
/**
|
|
2
56
|
* Internal Astro integration that wires the consumer's project into the bundled
|
|
3
57
|
* app:
|
|
4
58
|
* • exposes the resolved config as the `virtual:open-doc-config` module
|
|
5
59
|
* • aliases `@docs` to the consumer's content directory
|
|
6
|
-
* • allows Vite to read
|
|
60
|
+
* • allows Vite to read the app's island sources + the consumer's content/public dirs
|
|
61
|
+
* • makes the production build self-contained (see absolutizeSsrExternals)
|
|
7
62
|
*
|
|
8
63
|
* The resolved config is passed from the CLI via OPEN_DOC_CONFIG_JSON.
|
|
9
64
|
*
|
|
@@ -12,29 +67,24 @@
|
|
|
12
67
|
*/
|
|
13
68
|
export function openDocConfig({ contentDir, publicDir } = {}) {
|
|
14
69
|
const configJson = process.env.OPEN_DOC_CONFIG_JSON || '{}'
|
|
15
|
-
|
|
70
|
+
// The app lives in node_modules (under pnpm, behind a symlinked .pnpm path),
|
|
71
|
+
// so its island sources fall outside Vite's default fs.allow and 404 in dev.
|
|
72
|
+
// Allow the app root explicitly alongside the consumer's content/public dirs.
|
|
73
|
+
const allow = [APP_ROOT, contentDir, publicDir].filter(Boolean)
|
|
16
74
|
|
|
17
75
|
return {
|
|
18
76
|
name: 'open-doc:config',
|
|
19
77
|
hooks: {
|
|
20
78
|
'astro:config:setup': ({ command, updateConfig }) => {
|
|
21
|
-
|
|
22
|
-
// build is self-contained under every package manager (their files live
|
|
23
|
-
// in open-doc's node_modules, not the consumer's). In `dev` they must
|
|
24
|
-
// stay external — bundling CommonJS React breaks the dev SSR runtime.
|
|
25
|
-
const noExternal =
|
|
26
|
-
command === 'build' ? ['fuse.js', 'react', 'react-dom', '@astrojs/react'] : []
|
|
27
|
-
|
|
79
|
+
const buildPlugins = command === 'build' ? [absolutizeSsrExternals()] : []
|
|
28
80
|
updateConfig({
|
|
29
81
|
vite: {
|
|
30
|
-
plugins: [virtualConfigPlugin(configJson)],
|
|
82
|
+
plugins: [virtualConfigPlugin(configJson), ...buildPlugins],
|
|
31
83
|
resolve: {
|
|
32
84
|
alias: contentDir ? { '@docs': contentDir } : {},
|
|
33
85
|
// One React instance, even if a consumer installs their own for MDX.
|
|
34
86
|
dedupe: ['react', 'react-dom'],
|
|
35
87
|
},
|
|
36
|
-
ssr: { noExternal },
|
|
37
|
-
// Merged additively with Vite's defaults by Astro's config merge.
|
|
38
88
|
server: { fs: { allow } },
|
|
39
89
|
},
|
|
40
90
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openlaboratory/open-doc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "A polished, GitBook-style documentation-site framework. Write Markdown, run one command, get a beautiful static site.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"documentation",
|
|
@@ -38,7 +38,10 @@
|
|
|
38
38
|
"files": [
|
|
39
39
|
"bin",
|
|
40
40
|
"dist",
|
|
41
|
-
"app",
|
|
41
|
+
"app/src",
|
|
42
|
+
"app/astro.config.mjs",
|
|
43
|
+
"app/tailwind.config.mjs",
|
|
44
|
+
"app/tsconfig.json",
|
|
42
45
|
"README.md"
|
|
43
46
|
],
|
|
44
47
|
"scripts": {
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$ref": "#/definitions/docs",
|
|
3
|
-
"definitions": {
|
|
4
|
-
"docs": {
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"title": {
|
|
8
|
-
"type": "string"
|
|
9
|
-
},
|
|
10
|
-
"description": {
|
|
11
|
-
"type": "string"
|
|
12
|
-
},
|
|
13
|
-
"$schema": {
|
|
14
|
-
"type": "string"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"required": [
|
|
18
|
-
"title"
|
|
19
|
-
],
|
|
20
|
-
"additionalProperties": false
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
24
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default new Map();
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export default new Map([
|
|
3
|
-
["../../../example/content/guides/custom-components.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=..%2F..%2F..%2Fexample%2Fcontent%2Fguides%2Fcustom-components.mdx&astroContentModuleFlag=true")]]);
|
|
4
|
-
|
package/app/.astro/content.d.ts
DELETED
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
declare module 'astro:content' {
|
|
2
|
-
interface Render {
|
|
3
|
-
'.mdx': Promise<{
|
|
4
|
-
Content: import('astro').MDXContent;
|
|
5
|
-
headings: import('astro').MarkdownHeading[];
|
|
6
|
-
remarkPluginFrontmatter: Record<string, any>;
|
|
7
|
-
components: import('astro').MDXInstance<{}>['components'];
|
|
8
|
-
}>;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module 'astro:content' {
|
|
13
|
-
export interface RenderResult {
|
|
14
|
-
Content: import('astro/runtime/server/index.js').AstroComponentFactory;
|
|
15
|
-
headings: import('astro').MarkdownHeading[];
|
|
16
|
-
remarkPluginFrontmatter: Record<string, any>;
|
|
17
|
-
}
|
|
18
|
-
interface Render {
|
|
19
|
-
'.md': Promise<RenderResult>;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface RenderedContent {
|
|
23
|
-
html: string;
|
|
24
|
-
metadata?: {
|
|
25
|
-
imagePaths: Array<string>;
|
|
26
|
-
[key: string]: unknown;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
declare module 'astro:content' {
|
|
32
|
-
type Flatten<T> = T extends { [K: string]: infer U } ? U : never;
|
|
33
|
-
|
|
34
|
-
export type CollectionKey = keyof AnyEntryMap;
|
|
35
|
-
export type CollectionEntry<C extends CollectionKey> = Flatten<AnyEntryMap[C]>;
|
|
36
|
-
|
|
37
|
-
export type ContentCollectionKey = keyof ContentEntryMap;
|
|
38
|
-
export type DataCollectionKey = keyof DataEntryMap;
|
|
39
|
-
|
|
40
|
-
type AllValuesOf<T> = T extends any ? T[keyof T] : never;
|
|
41
|
-
type ValidContentEntrySlug<C extends keyof ContentEntryMap> = AllValuesOf<
|
|
42
|
-
ContentEntryMap[C]
|
|
43
|
-
>['slug'];
|
|
44
|
-
|
|
45
|
-
export type ReferenceDataEntry<
|
|
46
|
-
C extends CollectionKey,
|
|
47
|
-
E extends keyof DataEntryMap[C] = string,
|
|
48
|
-
> = {
|
|
49
|
-
collection: C;
|
|
50
|
-
id: E;
|
|
51
|
-
};
|
|
52
|
-
export type ReferenceContentEntry<
|
|
53
|
-
C extends keyof ContentEntryMap,
|
|
54
|
-
E extends ValidContentEntrySlug<C> | (string & {}) = string,
|
|
55
|
-
> = {
|
|
56
|
-
collection: C;
|
|
57
|
-
slug: E;
|
|
58
|
-
};
|
|
59
|
-
export type ReferenceLiveEntry<C extends keyof LiveContentConfig['collections']> = {
|
|
60
|
-
collection: C;
|
|
61
|
-
id: string;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
/** @deprecated Use `getEntry` instead. */
|
|
65
|
-
export function getEntryBySlug<
|
|
66
|
-
C extends keyof ContentEntryMap,
|
|
67
|
-
E extends ValidContentEntrySlug<C> | (string & {}),
|
|
68
|
-
>(
|
|
69
|
-
collection: C,
|
|
70
|
-
// Note that this has to accept a regular string too, for SSR
|
|
71
|
-
entrySlug: E,
|
|
72
|
-
): E extends ValidContentEntrySlug<C>
|
|
73
|
-
? Promise<CollectionEntry<C>>
|
|
74
|
-
: Promise<CollectionEntry<C> | undefined>;
|
|
75
|
-
|
|
76
|
-
/** @deprecated Use `getEntry` instead. */
|
|
77
|
-
export function getDataEntryById<C extends keyof DataEntryMap, E extends keyof DataEntryMap[C]>(
|
|
78
|
-
collection: C,
|
|
79
|
-
entryId: E,
|
|
80
|
-
): Promise<CollectionEntry<C>>;
|
|
81
|
-
|
|
82
|
-
export function getCollection<C extends keyof AnyEntryMap, E extends CollectionEntry<C>>(
|
|
83
|
-
collection: C,
|
|
84
|
-
filter?: (entry: CollectionEntry<C>) => entry is E,
|
|
85
|
-
): Promise<E[]>;
|
|
86
|
-
export function getCollection<C extends keyof AnyEntryMap>(
|
|
87
|
-
collection: C,
|
|
88
|
-
filter?: (entry: CollectionEntry<C>) => unknown,
|
|
89
|
-
): Promise<CollectionEntry<C>[]>;
|
|
90
|
-
|
|
91
|
-
export function getLiveCollection<C extends keyof LiveContentConfig['collections']>(
|
|
92
|
-
collection: C,
|
|
93
|
-
filter?: LiveLoaderCollectionFilterType<C>,
|
|
94
|
-
): Promise<
|
|
95
|
-
import('astro').LiveDataCollectionResult<LiveLoaderDataType<C>, LiveLoaderErrorType<C>>
|
|
96
|
-
>;
|
|
97
|
-
|
|
98
|
-
export function getEntry<
|
|
99
|
-
C extends keyof ContentEntryMap,
|
|
100
|
-
E extends ValidContentEntrySlug<C> | (string & {}),
|
|
101
|
-
>(
|
|
102
|
-
entry: ReferenceContentEntry<C, E>,
|
|
103
|
-
): E extends ValidContentEntrySlug<C>
|
|
104
|
-
? Promise<CollectionEntry<C>>
|
|
105
|
-
: Promise<CollectionEntry<C> | undefined>;
|
|
106
|
-
export function getEntry<
|
|
107
|
-
C extends keyof DataEntryMap,
|
|
108
|
-
E extends keyof DataEntryMap[C] | (string & {}),
|
|
109
|
-
>(
|
|
110
|
-
entry: ReferenceDataEntry<C, E>,
|
|
111
|
-
): E extends keyof DataEntryMap[C]
|
|
112
|
-
? Promise<DataEntryMap[C][E]>
|
|
113
|
-
: Promise<CollectionEntry<C> | undefined>;
|
|
114
|
-
export function getEntry<
|
|
115
|
-
C extends keyof ContentEntryMap,
|
|
116
|
-
E extends ValidContentEntrySlug<C> | (string & {}),
|
|
117
|
-
>(
|
|
118
|
-
collection: C,
|
|
119
|
-
slug: E,
|
|
120
|
-
): E extends ValidContentEntrySlug<C>
|
|
121
|
-
? Promise<CollectionEntry<C>>
|
|
122
|
-
: Promise<CollectionEntry<C> | undefined>;
|
|
123
|
-
export function getEntry<
|
|
124
|
-
C extends keyof DataEntryMap,
|
|
125
|
-
E extends keyof DataEntryMap[C] | (string & {}),
|
|
126
|
-
>(
|
|
127
|
-
collection: C,
|
|
128
|
-
id: E,
|
|
129
|
-
): E extends keyof DataEntryMap[C]
|
|
130
|
-
? string extends keyof DataEntryMap[C]
|
|
131
|
-
? Promise<DataEntryMap[C][E]> | undefined
|
|
132
|
-
: Promise<DataEntryMap[C][E]>
|
|
133
|
-
: Promise<CollectionEntry<C> | undefined>;
|
|
134
|
-
export function getLiveEntry<C extends keyof LiveContentConfig['collections']>(
|
|
135
|
-
collection: C,
|
|
136
|
-
filter: string | LiveLoaderEntryFilterType<C>,
|
|
137
|
-
): Promise<import('astro').LiveDataEntryResult<LiveLoaderDataType<C>, LiveLoaderErrorType<C>>>;
|
|
138
|
-
|
|
139
|
-
/** Resolve an array of entry references from the same collection */
|
|
140
|
-
export function getEntries<C extends keyof ContentEntryMap>(
|
|
141
|
-
entries: ReferenceContentEntry<C, ValidContentEntrySlug<C>>[],
|
|
142
|
-
): Promise<CollectionEntry<C>[]>;
|
|
143
|
-
export function getEntries<C extends keyof DataEntryMap>(
|
|
144
|
-
entries: ReferenceDataEntry<C, keyof DataEntryMap[C]>[],
|
|
145
|
-
): Promise<CollectionEntry<C>[]>;
|
|
146
|
-
|
|
147
|
-
export function render<C extends keyof AnyEntryMap>(
|
|
148
|
-
entry: AnyEntryMap[C][string],
|
|
149
|
-
): Promise<RenderResult>;
|
|
150
|
-
|
|
151
|
-
export function reference<C extends keyof AnyEntryMap>(
|
|
152
|
-
collection: C,
|
|
153
|
-
): import('astro/zod').ZodEffects<
|
|
154
|
-
import('astro/zod').ZodString,
|
|
155
|
-
C extends keyof ContentEntryMap
|
|
156
|
-
? ReferenceContentEntry<C, ValidContentEntrySlug<C>>
|
|
157
|
-
: ReferenceDataEntry<C, keyof DataEntryMap[C]>
|
|
158
|
-
>;
|
|
159
|
-
// Allow generic `string` to avoid excessive type errors in the config
|
|
160
|
-
// if `dev` is not running to update as you edit.
|
|
161
|
-
// Invalid collection names will be caught at build time.
|
|
162
|
-
export function reference<C extends string>(
|
|
163
|
-
collection: C,
|
|
164
|
-
): import('astro/zod').ZodEffects<import('astro/zod').ZodString, never>;
|
|
165
|
-
|
|
166
|
-
type ReturnTypeOrOriginal<T> = T extends (...args: any[]) => infer R ? R : T;
|
|
167
|
-
type InferEntrySchema<C extends keyof AnyEntryMap> = import('astro/zod').infer<
|
|
168
|
-
ReturnTypeOrOriginal<Required<ContentConfig['collections'][C]>['schema']>
|
|
169
|
-
>;
|
|
170
|
-
|
|
171
|
-
type ContentEntryMap = {
|
|
172
|
-
|
|
173
|
-
};
|
|
174
|
-
|
|
175
|
-
type DataEntryMap = {
|
|
176
|
-
"docs": Record<string, {
|
|
177
|
-
id: string;
|
|
178
|
-
body?: string;
|
|
179
|
-
collection: "docs";
|
|
180
|
-
data: InferEntrySchema<"docs">;
|
|
181
|
-
rendered?: RenderedContent;
|
|
182
|
-
filePath?: string;
|
|
183
|
-
}>;
|
|
184
|
-
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
type AnyEntryMap = ContentEntryMap & DataEntryMap;
|
|
188
|
-
|
|
189
|
-
type ExtractLoaderTypes<T> = T extends import('astro/loaders').LiveLoader<
|
|
190
|
-
infer TData,
|
|
191
|
-
infer TEntryFilter,
|
|
192
|
-
infer TCollectionFilter,
|
|
193
|
-
infer TError
|
|
194
|
-
>
|
|
195
|
-
? { data: TData; entryFilter: TEntryFilter; collectionFilter: TCollectionFilter; error: TError }
|
|
196
|
-
: { data: never; entryFilter: never; collectionFilter: never; error: never };
|
|
197
|
-
type ExtractDataType<T> = ExtractLoaderTypes<T>['data'];
|
|
198
|
-
type ExtractEntryFilterType<T> = ExtractLoaderTypes<T>['entryFilter'];
|
|
199
|
-
type ExtractCollectionFilterType<T> = ExtractLoaderTypes<T>['collectionFilter'];
|
|
200
|
-
type ExtractErrorType<T> = ExtractLoaderTypes<T>['error'];
|
|
201
|
-
|
|
202
|
-
type LiveLoaderDataType<C extends keyof LiveContentConfig['collections']> =
|
|
203
|
-
LiveContentConfig['collections'][C]['schema'] extends undefined
|
|
204
|
-
? ExtractDataType<LiveContentConfig['collections'][C]['loader']>
|
|
205
|
-
: import('astro/zod').infer<
|
|
206
|
-
Exclude<LiveContentConfig['collections'][C]['schema'], undefined>
|
|
207
|
-
>;
|
|
208
|
-
type LiveLoaderEntryFilterType<C extends keyof LiveContentConfig['collections']> =
|
|
209
|
-
ExtractEntryFilterType<LiveContentConfig['collections'][C]['loader']>;
|
|
210
|
-
type LiveLoaderCollectionFilterType<C extends keyof LiveContentConfig['collections']> =
|
|
211
|
-
ExtractCollectionFilterType<LiveContentConfig['collections'][C]['loader']>;
|
|
212
|
-
type LiveLoaderErrorType<C extends keyof LiveContentConfig['collections']> = ExtractErrorType<
|
|
213
|
-
LiveContentConfig['collections'][C]['loader']
|
|
214
|
-
>;
|
|
215
|
-
|
|
216
|
-
export type ContentConfig = typeof import("../src/content.config.js");
|
|
217
|
-
export type LiveContentConfig = never;
|
|
218
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[["Map",1,2,9,10],"meta::meta",["Map",3,4,5,6,7,8],"astro-version","5.18.2","content-config-digest","dfe7a3bbcb228414","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"site\":\"https://open-doc.dev\",\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"static\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":false,\"port\":4411,\"streaming\":true,\"allowedHosts\":[]},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[],\"responsiveStyles\":false},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":{\"type\":\"shiki\",\"excludeLangs\":[\"math\"]},\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{\"light\":\"github-light\",\"dark\":\"github-dark\"},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true,\"allowedDomains\":[],\"actionBodySizeLimit\":1048576},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"headingIdCompat\":false,\"preserveScriptOrder\":false,\"liveContentCollections\":false,\"csp\":false,\"staticImportMetaEnv\":false,\"chromeDevtoolsWorkspace\":false,\"failOnPrerenderConflict\":false,\"svgo\":false},\"legacy\":{\"collections\":false}}","docs",["Map",11,12,20,21,49,50,79,80,109,110,142,143,181,182],"guides/custom-components",{"id":11,"data":13,"body":16,"filePath":17,"digest":18,"deferredRender":19},{"title":14,"description":15},"Custom Components","Use your own React components inside Markdown with MDX.","import { Callout } from '../_components/Callout'\n\n# Custom Components\n\nRename a page from `.md` to `.mdx` and you can import and use React components right\ninside your content.\n\n\u003CCallout type=\"tip\" title=\"Try it\">\n This box is a React component imported at the top of this very page.\n\u003C/Callout>\n\n## Where components live\n\nPut components anywhere under your content directory. Folders that start with an\nunderscore (like `_components`) are ignored as pages, so they're the natural home\nfor shared partials:\n\n```\ncontent/\n├─ _components/\n│ └─ Callout.tsx\n└─ guides/\n └─ custom-components.mdx\n```\n\n## Importing them\n\nUse a relative import:\n\n```mdx\nimport { Callout } from '../_components/Callout'\n\n\u003CCallout type=\"warning\" title=\"Heads up\">\n Underscore-prefixed files never become their own pages.\n\u003C/Callout>\n```\n\n…or the built-in `@docs` alias, which always points at your content directory:\n\n```mdx\nimport { Callout } from '@docs/_components/Callout'\n```\n\n\u003CCallout type=\"warning\" title=\"One requirement\">\n MDX and React components need `react` and `react-dom` installed in your project.\n Plain Markdown does not.\n\u003C/Callout>\n\n## A few of each type\n\n\u003CCallout type=\"note\">A neutral note, for context and details.\u003C/Callout>\n\u003CCallout type=\"tip\">A tip, for the happy path.\u003C/Callout>\n\u003CCallout type=\"warning\">A warning, for the sharp edges.\u003C/Callout>\n\nComponents compose with all the normal Markdown around them, so you can mix prose,\ncode, and your own UI however you like.","../../../example/content/guides/custom-components.mdx","6a1c034b5af01859",true,"getting-started/introduction",{"id":20,"data":22,"body":25,"filePath":26,"digest":27,"rendered":28},{"title":23,"description":24},"Introduction","open-doc turns a folder of Markdown into a polished documentation site.","# Introduction\n\n**open-doc** is a documentation-site framework. You write Markdown and MDX, point a\nsmall config file at it, and run one command to get a fast, beautiful static site —\nno build setup, no boilerplate.\n\nIt is built on [Astro](https://astro.build), React, Tailwind CSS, and MDX, and ships\nwith the polish you'd expect from GitBook or Mintlify out of the box.\n\n## What you get\n\n- **Three-column layout** — sidebar navigation, content, and an auto-generated \"on this page\" table of contents.\n- **Full-text search** — press \u003Ckbd>⌘K\u003C/kbd> anywhere. Powered by [Pagefind](https://pagefind.app), indexed at build time.\n- **Light & dark themes** — with a header toggle and system-preference detection.\n- **Great typography** — tuned prose styles, code blocks with copy buttons, and heading anchor links.\n- **MDX components** — drop your own React components straight into the page.\n- **One dependency** — everything is bundled. Your repo stays tiny.\n\n## How it works\n\nYour project only ever contains two things: a config file and a content directory.\n\n```\nmy-docs/\n├─ open-doc.config.ts # title, navigation, theme\n└─ content/ # your .md and .mdx files\n ├─ getting-started/\n │ └─ introduction.md\n └─ reference/\n └─ faq.md\n```\n\nRunning `open-doc dev` (or `build`) hands that content to a fully-configured Astro\napp bundled inside the `open-doc` package. You never manage Astro, Tailwind, or any\nof the moving parts yourself.\n\n## Next steps\n\n- [Installation](/getting-started/installation) — add open-doc to a project in two minutes.\n- [Configuration](/getting-started/configuration) — every option explained.","../../../example/content/getting-started/introduction.md","3190be6db1a720f0",{"html":29,"metadata":30},"\u003Ch1 id=\"introduction\">Introduction\u003C/h1>\n\u003Cp>\u003Cstrong>open-doc\u003C/strong> is a documentation-site framework. You write Markdown and MDX, point a\nsmall config file at it, and run one command to get a fast, beautiful static site —\nno build setup, no boilerplate.\u003C/p>\n\u003Cp>It is built on \u003Ca href=\"https://astro.build\">Astro\u003C/a>, React, Tailwind CSS, and MDX, and ships\nwith the polish you’d expect from GitBook or Mintlify out of the box.\u003C/p>\n\u003Ch2 id=\"what-you-get\">What you get\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Cstrong>Three-column layout\u003C/strong> — sidebar navigation, content, and an auto-generated “on this page” table of contents.\u003C/li>\n\u003Cli>\u003Cstrong>Full-text search\u003C/strong> — press \u003Ckbd>⌘K\u003C/kbd> anywhere. Powered by \u003Ca href=\"https://pagefind.app\">Pagefind\u003C/a>, indexed at build time.\u003C/li>\n\u003Cli>\u003Cstrong>Light & dark themes\u003C/strong> — with a header toggle and system-preference detection.\u003C/li>\n\u003Cli>\u003Cstrong>Great typography\u003C/strong> — tuned prose styles, code blocks with copy buttons, and heading anchor links.\u003C/li>\n\u003Cli>\u003Cstrong>MDX components\u003C/strong> — drop your own React components straight into the page.\u003C/li>\n\u003Cli>\u003Cstrong>One dependency\u003C/strong> — everything is bundled. Your repo stays tiny.\u003C/li>\n\u003C/ul>\n\u003Ch2 id=\"how-it-works\">How it works\u003C/h2>\n\u003Cp>Your project only ever contains two things: a config file and a content directory.\u003C/p>\n\u003Cpre class=\"astro-code astro-code-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"plaintext\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan>my-docs/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan>├─ open-doc.config.ts # title, navigation, theme\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan>└─ content/ # your .md and .mdx files\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan> ├─ getting-started/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan> │ └─ introduction.md\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan> └─ reference/\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan> └─ faq.md\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Running \u003Ccode>open-doc dev\u003C/code> (or \u003Ccode>build\u003C/code>) hands that content to a fully-configured Astro\napp bundled inside the \u003Ccode>open-doc\u003C/code> package. You never manage Astro, Tailwind, or any\nof the moving parts yourself.\u003C/p>\n\u003Ch2 id=\"next-steps\">Next steps\u003C/h2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"/getting-started/installation\">Installation\u003C/a> — add open-doc to a project in two minutes.\u003C/li>\n\u003Cli>\u003Ca href=\"/getting-started/configuration\">Configuration\u003C/a> — every option explained.\u003C/li>\n\u003C/ul>",{"headings":31,"localImagePaths":45,"remoteImagePaths":46,"frontmatter":47,"imagePaths":48},[32,35,39,42],{"depth":33,"slug":34,"text":23},1,"introduction",{"depth":36,"slug":37,"text":38},2,"what-you-get","What you get",{"depth":36,"slug":40,"text":41},"how-it-works","How it works",{"depth":36,"slug":43,"text":44},"next-steps","Next steps",[],[],{"title":23,"description":24},[],"getting-started/configuration",{"id":49,"data":51,"body":54,"filePath":55,"digest":56,"rendered":57},{"title":52,"description":53},"Configuration","Every option in open-doc.config.ts, explained.","# Configuration\n\nAll configuration lives in `open-doc.config.ts` (`.js` and `.mjs` work too). Wrap it\nin `defineConfig` for full type-checking and autocomplete.\n\n## Full example\n\n```ts\nimport { defineConfig } from 'open-doc'\n\nexport default defineConfig({\n title: 'My Docs',\n description: 'Everything you need to know.',\n contentDir: './content',\n base: '/',\n site: 'https://docs.example.com',\n logo: { text: 'My Docs', src: '/logo.svg', href: '/' },\n social: [{ icon: 'github', href: 'https://github.com/me/repo' }],\n defaultTheme: 'dark',\n themeToggle: true,\n editLinkBase: 'https://github.com/me/repo/edit/main/content',\n nav: [\n { label: 'Getting Started', dir: 'getting-started', pages: ['introduction'] },\n { label: 'Reference', dir: 'reference', pages: ['faq'] },\n ],\n})\n```\n\n## Options\n\n| Option | Type | Description |\n|---|---|---|\n| `title` | `string` | **Required.** Used in the `\u003Ctitle>` tag and as the default logo text. |\n| `description` | `string` | Tagline shown on the home page. |\n| `contentDir` | `string` | Folder of your `.md`/`.mdx` files. Default `./content`. |\n| `publicDir` | `string` | Static assets served at the site root. Default `./public` if present. |\n| `base` | `string` | Base path for sub-path hosting, e.g. `/docs`. Default `/`. |\n| `site` | `string` | Canonical site URL, used for SEO meta. |\n| `logo` | `object` | `{ text, src, href }`. `src` points to an image in your public dir. |\n| `social` | `array` | `{ icon, label, href }` links shown in the header. |\n| `defaultTheme` | `'dark' \\| 'light' \\| 'auto'` | Initial theme. `auto` follows the OS. Default `dark`. |\n| `themeToggle` | `boolean` | Show the light/dark toggle. Default `true`. |\n| `theme` | `object` | Per-mode color overrides (see below). |\n| `editLinkBase` | `string` | Base URL for an \"Edit this page\" link. |\n| `nav` | `array` | **Required.** The sidebar — see [Writing Content](/guides/writing-content). |\n\n## Built-in social icons\n\n`github`, `x`, `twitter`, `discord`, `slack`, `linkedin`, `youtube`, `mastodon`,\n`bluesky`. Anything else falls back to a generic link icon.\n\n## Theming\n\nopen-doc is dark-first but fully themeable. Override any color token per mode with\nHSL triplets (no `hsl()` wrapper):\n\n```ts\ntheme: {\n dark: {\n link: '160 84% 55%',\n 'surface-sidebar': '0 0% 4%',\n },\n light: {\n link: '160 84% 35%',\n },\n}\n```\n\nRecognised tokens include `background`, `foreground`, `surface`,\n`surface-sidebar`, `surface-content`, `surface-raised`, `border`, `muted`, `link`,\n`link-hover`, `code-bg`, and `code-border`.","../../../example/content/getting-started/configuration.md","89476537f5cf2a23",{"html":58,"metadata":59},"\u003Ch1 id=\"configuration\">Configuration\u003C/h1>\n\u003Cp>All configuration lives in \u003Ccode>open-doc.config.ts\u003C/code> (\u003Ccode>.js\u003C/code> and \u003Ccode>.mjs\u003C/code> work too). Wrap it\nin \u003Ccode>defineConfig\u003C/code> for full type-checking and autocomplete.\u003C/p>\n\u003Ch2 id=\"full-example\">Full example\u003C/h2>\n\u003Cpre class=\"astro-code astro-code-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"ts\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#D73A49;--shiki-dark:#F97583\">import\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { defineConfig } \u003C/span>\u003Cspan style=\"color:#D73A49;--shiki-dark:#F97583\">from\u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> 'open-doc'\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#D73A49;--shiki-dark:#F97583\">export\u003C/span>\u003Cspan style=\"color:#D73A49;--shiki-dark:#F97583\"> default\u003C/span>\u003Cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\"> defineConfig\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">({\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> title: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'My Docs'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> description: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Everything you need to know.'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> contentDir: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'./content'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> base: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> site: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'https://docs.example.com'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> logo: { text: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'My Docs'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, src: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/logo.svg'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, href: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> social: [{ icon: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'github'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, href: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'https://github.com/me/repo'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }],\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> defaultTheme: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'dark'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> themeToggle: \u003C/span>\u003Cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\">true\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> editLinkBase: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'https://github.com/me/repo/edit/main/content'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> nav: [\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { label: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Getting Started'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, dir: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'getting-started'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, pages: [\u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'introduction'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">] },\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { label: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Reference'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, dir: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'reference'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, pages: [\u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'faq'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">] },\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ],\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">})\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"options\">Options\u003C/h2>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Option\u003C/th>\u003Cth>Type\u003C/th>\u003Cth>Description\u003C/th>\u003C/tr>\u003C/thead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>title\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>string\u003C/code>\u003C/td>\u003Ctd>\u003Cstrong>Required.\u003C/strong> Used in the \u003Ccode><title>\u003C/code> tag and as the default logo text.\u003C/td>\u003C/tr>\u003Ctr>\u003Ctd>\u003Ccode>description\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>string\u003C/code>\u003C/td>\u003Ctd>Tagline shown on the home page.\u003C/td>\u003C/tr>\u003Ctr>\u003Ctd>\u003Ccode>contentDir\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>string\u003C/code>\u003C/td>\u003Ctd>Folder of your \u003Ccode>.md\u003C/code>/\u003Ccode>.mdx\u003C/code> files. Default \u003Ccode>./content\u003C/code>.\u003C/td>\u003C/tr>\u003Ctr>\u003Ctd>\u003Ccode>publicDir\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>string\u003C/code>\u003C/td>\u003Ctd>Static assets served at the site root. Default \u003Ccode>./public\u003C/code> if present.\u003C/td>\u003C/tr>\u003Ctr>\u003Ctd>\u003Ccode>base\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>string\u003C/code>\u003C/td>\u003Ctd>Base path for sub-path hosting, e.g. \u003Ccode>/docs\u003C/code>. Default \u003Ccode>/\u003C/code>.\u003C/td>\u003C/tr>\u003Ctr>\u003Ctd>\u003Ccode>site\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>string\u003C/code>\u003C/td>\u003Ctd>Canonical site URL, used for SEO meta.\u003C/td>\u003C/tr>\u003Ctr>\u003Ctd>\u003Ccode>logo\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>object\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>{ text, src, href }\u003C/code>. \u003Ccode>src\u003C/code> points to an image in your public dir.\u003C/td>\u003C/tr>\u003Ctr>\u003Ctd>\u003Ccode>social\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>array\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>{ icon, label, href }\u003C/code> links shown in the header.\u003C/td>\u003C/tr>\u003Ctr>\u003Ctd>\u003Ccode>defaultTheme\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>'dark' | 'light' | 'auto'\u003C/code>\u003C/td>\u003Ctd>Initial theme. \u003Ccode>auto\u003C/code> follows the OS. Default \u003Ccode>dark\u003C/code>.\u003C/td>\u003C/tr>\u003Ctr>\u003Ctd>\u003Ccode>themeToggle\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>boolean\u003C/code>\u003C/td>\u003Ctd>Show the light/dark toggle. Default \u003Ccode>true\u003C/code>.\u003C/td>\u003C/tr>\u003Ctr>\u003Ctd>\u003Ccode>theme\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>object\u003C/code>\u003C/td>\u003Ctd>Per-mode color overrides (see below).\u003C/td>\u003C/tr>\u003Ctr>\u003Ctd>\u003Ccode>editLinkBase\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>string\u003C/code>\u003C/td>\u003Ctd>Base URL for an “Edit this page” link.\u003C/td>\u003C/tr>\u003Ctr>\u003Ctd>\u003Ccode>nav\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>array\u003C/code>\u003C/td>\u003Ctd>\u003Cstrong>Required.\u003C/strong> The sidebar — see \u003Ca href=\"/guides/writing-content\">Writing Content\u003C/a>.\u003C/td>\u003C/tr>\u003C/tbody>\u003C/table>\n\u003Ch2 id=\"built-in-social-icons\">Built-in social icons\u003C/h2>\n\u003Cp>\u003Ccode>github\u003C/code>, \u003Ccode>x\u003C/code>, \u003Ccode>twitter\u003C/code>, \u003Ccode>discord\u003C/code>, \u003Ccode>slack\u003C/code>, \u003Ccode>linkedin\u003C/code>, \u003Ccode>youtube\u003C/code>, \u003Ccode>mastodon\u003C/code>,\n\u003Ccode>bluesky\u003C/code>. Anything else falls back to a generic link icon.\u003C/p>\n\u003Ch2 id=\"theming\">Theming\u003C/h2>\n\u003Cp>open-doc is dark-first but fully themeable. Override any color token per mode with\nHSL triplets (no \u003Ccode>hsl()\u003C/code> wrapper):\u003C/p>\n\u003Cpre class=\"astro-code astro-code-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"ts\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">theme\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: {\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\"> dark\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: {\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\"> link\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'160 84% 55%'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> 'surface-sidebar'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'0 0% 4%'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\"> light\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: {\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\"> link\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'160 84% 35%'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">}\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Recognised tokens include \u003Ccode>background\u003C/code>, \u003Ccode>foreground\u003C/code>, \u003Ccode>surface\u003C/code>,\n\u003Ccode>surface-sidebar\u003C/code>, \u003Ccode>surface-content\u003C/code>, \u003Ccode>surface-raised\u003C/code>, \u003Ccode>border\u003C/code>, \u003Ccode>muted\u003C/code>, \u003Ccode>link\u003C/code>,\n\u003Ccode>link-hover\u003C/code>, \u003Ccode>code-bg\u003C/code>, and \u003Ccode>code-border\u003C/code>.\u003C/p>",{"headings":60,"localImagePaths":75,"remoteImagePaths":76,"frontmatter":77,"imagePaths":78},[61,63,66,69,72],{"depth":33,"slug":62,"text":52},"configuration",{"depth":36,"slug":64,"text":65},"full-example","Full example",{"depth":36,"slug":67,"text":68},"options","Options",{"depth":36,"slug":70,"text":71},"built-in-social-icons","Built-in social icons",{"depth":36,"slug":73,"text":74},"theming","Theming",[],[],{"title":52,"description":53},[],"reference/cli",{"id":79,"data":81,"body":84,"filePath":85,"digest":86,"rendered":87},{"title":82,"description":83},"CLI","The open-doc command-line interface.","# CLI\n\nopen-doc ships a single command with three subcommands. Run them via npm scripts or\ndirectly with your package runner.\n\n## `open-doc dev`\n\nStart the local development server with hot-reloading.\n\n```bash\nopen-doc dev\n```\n\n| Flag | Default | Description |\n|---|---|---|\n| `--port \u003Cport>` | `4321` | Port to listen on. |\n| `--host` | off | Expose the server on your local network. |\n\n> Search uses a lightweight title-only mode in `dev`. Run a build once to enable\n> full-text search locally.\n\n## `open-doc build`\n\nBuild the static site into `./dist`, including the full-text search index.\n\n```bash\nopen-doc build\n```\n\nThe output is plain static files — deploy `./dist` to Netlify, Vercel, GitHub\nPages, Cloudflare Pages, or any static host.\n\n## `open-doc preview`\n\nServe the contents of `./dist` locally, exactly as it will be in production.\n\n```bash\nopen-doc preview\n```\n\nAccepts the same `--port` and `--host` flags as `dev`.\n\n## Deploying under a sub-path\n\nHosting at `example.com/docs` instead of the root? Set `base` in your config and\nevery link adjusts automatically:\n\n```ts\nexport default defineConfig({\n base: '/docs',\n // …\n})\n```","../../../example/content/reference/cli.md","6f93064c92a5e09c",{"html":88,"metadata":89},"\u003Ch1 id=\"cli\">CLI\u003C/h1>\n\u003Cp>open-doc ships a single command with three subcommands. Run them via npm scripts or\ndirectly with your package runner.\u003C/p>\n\u003Ch2 id=\"open-doc-dev\">\u003Ccode>open-doc dev\u003C/code>\u003C/h2>\n\u003Cp>Start the local development server with hot-reloading.\u003C/p>\n\u003Cpre class=\"astro-code astro-code-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">open-doc\u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> dev\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Flag\u003C/th>\u003Cth>Default\u003C/th>\u003Cth>Description\u003C/th>\u003C/tr>\u003C/thead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>--port <port>\u003C/code>\u003C/td>\u003Ctd>\u003Ccode>4321\u003C/code>\u003C/td>\u003Ctd>Port to listen on.\u003C/td>\u003C/tr>\u003Ctr>\u003Ctd>\u003Ccode>--host\u003C/code>\u003C/td>\u003Ctd>off\u003C/td>\u003Ctd>Expose the server on your local network.\u003C/td>\u003C/tr>\u003C/tbody>\u003C/table>\n\u003Cblockquote>\n\u003Cp>Search uses a lightweight title-only mode in \u003Ccode>dev\u003C/code>. Run a build once to enable\nfull-text search locally.\u003C/p>\n\u003C/blockquote>\n\u003Ch2 id=\"open-doc-build\">\u003Ccode>open-doc build\u003C/code>\u003C/h2>\n\u003Cp>Build the static site into \u003Ccode>./dist\u003C/code>, including the full-text search index.\u003C/p>\n\u003Cpre class=\"astro-code astro-code-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">open-doc\u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> build\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>The output is plain static files — deploy \u003Ccode>./dist\u003C/code> to Netlify, Vercel, GitHub\nPages, Cloudflare Pages, or any static host.\u003C/p>\n\u003Ch2 id=\"open-doc-preview\">\u003Ccode>open-doc preview\u003C/code>\u003C/h2>\n\u003Cp>Serve the contents of \u003Ccode>./dist\u003C/code> locally, exactly as it will be in production.\u003C/p>\n\u003Cpre class=\"astro-code astro-code-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">open-doc\u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> preview\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Accepts the same \u003Ccode>--port\u003C/code> and \u003Ccode>--host\u003C/code> flags as \u003Ccode>dev\u003C/code>.\u003C/p>\n\u003Ch2 id=\"deploying-under-a-sub-path\">Deploying under a sub-path\u003C/h2>\n\u003Cp>Hosting at \u003Ccode>example.com/docs\u003C/code> instead of the root? Set \u003Ccode>base\u003C/code> in your config and\nevery link adjusts automatically:\u003C/p>\n\u003Cpre class=\"astro-code astro-code-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"ts\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#D73A49;--shiki-dark:#F97583\">export\u003C/span>\u003Cspan style=\"color:#D73A49;--shiki-dark:#F97583\"> default\u003C/span>\u003Cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\"> defineConfig\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">({\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> base: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'/docs'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#6A737D;--shiki-dark:#6A737D\"> // …\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">})\u003C/span>\u003C/span>\u003C/code>\u003C/pre>",{"headings":90,"localImagePaths":105,"remoteImagePaths":106,"frontmatter":107,"imagePaths":108},[91,93,96,99,102],{"depth":33,"slug":92,"text":82},"cli",{"depth":36,"slug":94,"text":95},"open-doc-dev","open-doc dev",{"depth":36,"slug":97,"text":98},"open-doc-build","open-doc build",{"depth":36,"slug":100,"text":101},"open-doc-preview","open-doc preview",{"depth":36,"slug":103,"text":104},"deploying-under-a-sub-path","Deploying under a sub-path",[],[],{"title":82,"description":83},[],"getting-started/installation",{"id":109,"data":111,"body":114,"filePath":115,"digest":116,"rendered":117},{"title":112,"description":113},"Installation","Add open-doc to a project and run your first build.","# Installation\n\n## 1. Install the package\n\n```bash\nnpm install -D open-doc\n```\n\n> **Using MDX?** If you author MDX pages or custom React components, also install\n> `react` and `react-dom` as dependencies. Plain Markdown needs nothing else.\n\n## 2. Add a config file\n\nCreate `open-doc.config.ts` in your project root:\n\n```ts\nimport { defineConfig } from 'open-doc'\n\nexport default defineConfig({\n title: 'My Docs',\n nav: [\n { label: 'Getting Started', dir: 'getting-started', pages: ['introduction'] },\n ],\n})\n```\n\n## 3. Write some content\n\n```md\n---\ntitle: Introduction\ndescription: Welcome to my project.\n---\n\n# Introduction\n\nHello, world!\n```\n\nSave it as `content/getting-started/introduction.md`.\n\n## 4. Add scripts\n\n```json\n{\n \"scripts\": {\n \"dev\": \"open-doc dev\",\n \"build\": \"open-doc build\",\n \"preview\": \"open-doc preview\"\n }\n}\n```\n\n## 5. Run it\n\n```bash\nnpm run dev\n```\n\nYour site is live at `http://localhost:4321`. Run `npm run build` when you're ready\nto ship — the static site is written to `./dist`, deployable to any static host.","../../../example/content/getting-started/installation.md","8f208361d60f94bc",{"html":118,"metadata":119},"\u003Ch1 id=\"installation\">Installation\u003C/h1>\n\u003Ch2 id=\"1-install-the-package\">1. Install the package\u003C/h2>\n\u003Cpre class=\"astro-code astro-code-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">npm\u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> install\u003C/span>\u003Cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> -D\u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> open-doc\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cblockquote>\n\u003Cp>\u003Cstrong>Using MDX?\u003C/strong> If you author MDX pages or custom React components, also install\n\u003Ccode>react\u003C/code> and \u003Ccode>react-dom\u003C/code> as dependencies. Plain Markdown needs nothing else.\u003C/p>\n\u003C/blockquote>\n\u003Ch2 id=\"2-add-a-config-file\">2. Add a config file\u003C/h2>\n\u003Cp>Create \u003Ccode>open-doc.config.ts\u003C/code> in your project root:\u003C/p>\n\u003Cpre class=\"astro-code astro-code-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"ts\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#D73A49;--shiki-dark:#F97583\">import\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { defineConfig } \u003C/span>\u003Cspan style=\"color:#D73A49;--shiki-dark:#F97583\">from\u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> 'open-doc'\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#D73A49;--shiki-dark:#F97583\">export\u003C/span>\u003Cspan style=\"color:#D73A49;--shiki-dark:#F97583\"> default\u003C/span>\u003Cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\"> defineConfig\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">({\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> title: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'My Docs'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> nav: [\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> { label: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Getting Started'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, dir: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'getting-started'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, pages: [\u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'introduction'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">] },\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> ],\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">})\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"3-write-some-content\">3. Write some content\u003C/h2>\n\u003Cpre class=\"astro-code astro-code-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"md\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold\">---\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">title: Introduction\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">description: Welcome to my project.\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold\">---\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold\"># Introduction\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">Hello, world!\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Save it as \u003Ccode>content/getting-started/introduction.md\u003C/code>.\u003C/p>\n\u003Ch2 id=\"4-add-scripts\">4. Add scripts\u003C/h2>\n\u003Cpre class=\"astro-code astro-code-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"json\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">{\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"scripts\"\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: {\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"dev\"\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"open-doc dev\"\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"build\"\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"open-doc build\"\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> \"preview\"\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">\"open-doc preview\"\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> }\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">}\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch2 id=\"5-run-it\">5. Run it\u003C/h2>\n\u003Cpre class=\"astro-code astro-code-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"bash\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">npm\u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> run\u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> dev\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>Your site is live at \u003Ccode>http://localhost:4321\u003C/code>. Run \u003Ccode>npm run build\u003C/code> when you’re ready\nto ship — the static site is written to \u003Ccode>./dist\u003C/code>, deployable to any static host.\u003C/p>",{"headings":120,"localImagePaths":138,"remoteImagePaths":139,"frontmatter":140,"imagePaths":141},[121,123,126,129,132,135],{"depth":33,"slug":122,"text":112},"installation",{"depth":36,"slug":124,"text":125},"1-install-the-package","1. Install the package",{"depth":36,"slug":127,"text":128},"2-add-a-config-file","2. Add a config file",{"depth":36,"slug":130,"text":131},"3-write-some-content","3. Write some content",{"depth":36,"slug":133,"text":134},"4-add-scripts","4. Add scripts",{"depth":36,"slug":136,"text":137},"5-run-it","5. Run it",[],[],{"title":112,"description":113},[],"reference/faq",{"id":142,"data":144,"body":147,"filePath":148,"digest":149,"rendered":150},{"title":145,"description":146},"FAQ","Common questions about open-doc.","# FAQ\n\n## Do I need to know Astro?\n\nNo. Astro, Tailwind, MDX, and the search index are all bundled and configured inside\nthe `open-doc` package. You only write content and a config file.\n\n## Can I use plain Markdown without React?\n\nYes. `.md` files need nothing beyond `open-doc`. You only need `react` and\n`react-dom` if you write `.mdx` pages or import React components.\n\n## How does search work?\n\n`open-doc build` runs [Pagefind](https://pagefind.app) over the generated HTML and\nproduces a static search index. The \u003Ckbd>⌘K\u003C/kbd> dialog queries it entirely in the\nbrowser — no server or third-party service. In `dev`, search falls back to matching\npage titles until you run a build.\n\n## Can I customise the colors?\n\nYes — override any theme token per mode via the `theme` option. See\n[Configuration](/getting-started/configuration#theming).\n\n## How do I add a page?\n\n1. Create the Markdown file in your content directory.\n2. Add its slug to the relevant section's `pages` array in `open-doc.config.ts`.\n\nThe title comes from the file's frontmatter.\n\n## Where do I deploy the output?\n\nAnywhere that serves static files. `open-doc build` writes everything to `./dist`.\n\n## Is light mode supported?\n\nYes. open-doc defaults to dark but includes a polished light theme and a header\ntoggle. Set `defaultTheme: 'auto'` to follow the visitor's system preference.","../../../example/content/reference/faq.md","5215c27998f1d6f0",{"html":151,"metadata":152},"\u003Ch1 id=\"faq\">FAQ\u003C/h1>\n\u003Ch2 id=\"do-i-need-to-know-astro\">Do I need to know Astro?\u003C/h2>\n\u003Cp>No. Astro, Tailwind, MDX, and the search index are all bundled and configured inside\nthe \u003Ccode>open-doc\u003C/code> package. You only write content and a config file.\u003C/p>\n\u003Ch2 id=\"can-i-use-plain-markdown-without-react\">Can I use plain Markdown without React?\u003C/h2>\n\u003Cp>Yes. \u003Ccode>.md\u003C/code> files need nothing beyond \u003Ccode>open-doc\u003C/code>. You only need \u003Ccode>react\u003C/code> and\n\u003Ccode>react-dom\u003C/code> if you write \u003Ccode>.mdx\u003C/code> pages or import React components.\u003C/p>\n\u003Ch2 id=\"how-does-search-work\">How does search work?\u003C/h2>\n\u003Cp>\u003Ccode>open-doc build\u003C/code> runs \u003Ca href=\"https://pagefind.app\">Pagefind\u003C/a> over the generated HTML and\nproduces a static search index. The \u003Ckbd>⌘K\u003C/kbd> dialog queries it entirely in the\nbrowser — no server or third-party service. In \u003Ccode>dev\u003C/code>, search falls back to matching\npage titles until you run a build.\u003C/p>\n\u003Ch2 id=\"can-i-customise-the-colors\">Can I customise the colors?\u003C/h2>\n\u003Cp>Yes — override any theme token per mode via the \u003Ccode>theme\u003C/code> option. See\n\u003Ca href=\"/getting-started/configuration#theming\">Configuration\u003C/a>.\u003C/p>\n\u003Ch2 id=\"how-do-i-add-a-page\">How do I add a page?\u003C/h2>\n\u003Col>\n\u003Cli>Create the Markdown file in your content directory.\u003C/li>\n\u003Cli>Add its slug to the relevant section’s \u003Ccode>pages\u003C/code> array in \u003Ccode>open-doc.config.ts\u003C/code>.\u003C/li>\n\u003C/ol>\n\u003Cp>The title comes from the file’s frontmatter.\u003C/p>\n\u003Ch2 id=\"where-do-i-deploy-the-output\">Where do I deploy the output?\u003C/h2>\n\u003Cp>Anywhere that serves static files. \u003Ccode>open-doc build\u003C/code> writes everything to \u003Ccode>./dist\u003C/code>.\u003C/p>\n\u003Ch2 id=\"is-light-mode-supported\">Is light mode supported?\u003C/h2>\n\u003Cp>Yes. open-doc defaults to dark but includes a polished light theme and a header\ntoggle. Set \u003Ccode>defaultTheme: 'auto'\u003C/code> to follow the visitor’s system preference.\u003C/p>",{"headings":153,"localImagePaths":177,"remoteImagePaths":178,"frontmatter":179,"imagePaths":180},[154,156,159,162,165,168,171,174],{"depth":33,"slug":155,"text":145},"faq",{"depth":36,"slug":157,"text":158},"do-i-need-to-know-astro","Do I need to know Astro?",{"depth":36,"slug":160,"text":161},"can-i-use-plain-markdown-without-react","Can I use plain Markdown without React?",{"depth":36,"slug":163,"text":164},"how-does-search-work","How does search work?",{"depth":36,"slug":166,"text":167},"can-i-customise-the-colors","Can I customise the colors?",{"depth":36,"slug":169,"text":170},"how-do-i-add-a-page","How do I add a page?",{"depth":36,"slug":172,"text":173},"where-do-i-deploy-the-output","Where do I deploy the output?",{"depth":36,"slug":175,"text":176},"is-light-mode-supported","Is light mode supported?",[],[],{"title":145,"description":146},[],"guides/writing-content",{"id":181,"data":183,"body":186,"filePath":187,"digest":188,"rendered":189},{"title":184,"description":185},"Writing Content","Frontmatter, the navigation model, and the Markdown features you can use.","# Writing Content\n\n## Frontmatter\n\nEvery page starts with a small frontmatter block:\n\n```md\n---\ntitle: Quick Start\ndescription: Get up and running in five minutes.\n---\n```\n\n| Field | Required | Used for |\n|---|---|---|\n| `title` | Yes | The page heading in the sidebar, search, and `\u003Ctitle>`. |\n| `description` | No | Sub-text in search results and the home page. |\n\n## The navigation model\n\nThe sidebar is **explicit** — you control exactly what appears and in what order\nvia the `nav` array in your config. Page titles are pulled from each file's\nfrontmatter automatically.\n\n```ts\nnav: [\n {\n label: 'Getting Started',\n dir: 'getting-started', // folder under your content dir\n pages: ['introduction', 'installation'],\n },\n]\n```\n\nThis maps to `content/getting-started/introduction.md` and\n`content/getting-started/installation.md`, rendered at `/getting-started/introduction`\nand so on. Order in the array is the order in the sidebar.\n\nA page that exists on disk but isn't listed in `nav` simply won't appear in the\nsidebar — handy for drafts.\n\n## Markdown features\n\nEverything you'd expect, styled to match:\n\n### Code blocks\n\nFenced code is syntax-highlighted (light & dark) and gets a copy button on hover.\n\n```ts\nexport function greet(name: string) {\n return `Hello, ${name}!`\n}\n```\n\n### Tables\n\n| Command | What it does |\n|---|---|\n| `open-doc dev` | Starts the dev server |\n| `open-doc build` | Builds to `./dist` |\n\n### Blockquotes\n\n> Use blockquotes for asides and tips. Lead with a **bold** word to give it a label.\n\n### Lists and links\n\n1. Ordered lists work.\n2. So do [internal links](/reference/faq) and [external ones](https://astro.build).\n\n- Bullets too\n- With `inline code`\n\nHeadings automatically get anchor links and feed the \"on this page\" outline on the\nright.","../../../example/content/guides/writing-content.md","3a3d6124b05233c7",{"html":190,"metadata":191},"\u003Ch1 id=\"writing-content\">Writing Content\u003C/h1>\n\u003Ch2 id=\"frontmatter\">Frontmatter\u003C/h2>\n\u003Cp>Every page starts with a small frontmatter block:\u003C/p>\n\u003Cpre class=\"astro-code astro-code-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"md\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold\">---\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">title: Quick Start\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">description: Get up and running in five minutes.\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold\">---\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Field\u003C/th>\u003Cth>Required\u003C/th>\u003Cth>Used for\u003C/th>\u003C/tr>\u003C/thead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>title\u003C/code>\u003C/td>\u003Ctd>Yes\u003C/td>\u003Ctd>The page heading in the sidebar, search, and \u003Ccode><title>\u003C/code>.\u003C/td>\u003C/tr>\u003Ctr>\u003Ctd>\u003Ccode>description\u003C/code>\u003C/td>\u003Ctd>No\u003C/td>\u003Ctd>Sub-text in search results and the home page.\u003C/td>\u003C/tr>\u003C/tbody>\u003C/table>\n\u003Ch2 id=\"the-navigation-model\">The navigation model\u003C/h2>\n\u003Cp>The sidebar is \u003Cstrong>explicit\u003C/strong> — you control exactly what appears and in what order\nvia the \u003Ccode>nav\u003C/code> array in your config. Page titles are pulled from each file’s\nfrontmatter automatically.\u003C/p>\n\u003Cpre class=\"astro-code astro-code-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"ts\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\">nav\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">: [\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> {\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> label: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'Getting Started'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">,\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> dir: \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'getting-started'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#6A737D;--shiki-dark:#6A737D\">// folder under your content dir\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> pages: [\u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'introduction'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">, \u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">'installation'\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">],\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\"> },\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">]\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Cp>This maps to \u003Ccode>content/getting-started/introduction.md\u003C/code> and\n\u003Ccode>content/getting-started/installation.md\u003C/code>, rendered at \u003Ccode>/getting-started/introduction\u003C/code>\nand so on. Order in the array is the order in the sidebar.\u003C/p>\n\u003Cp>A page that exists on disk but isn’t listed in \u003Ccode>nav\u003C/code> simply won’t appear in the\nsidebar — handy for drafts.\u003C/p>\n\u003Ch2 id=\"markdown-features\">Markdown features\u003C/h2>\n\u003Cp>Everything you’d expect, styled to match:\u003C/p>\n\u003Ch3 id=\"code-blocks\">Code blocks\u003C/h3>\n\u003Cp>Fenced code is syntax-highlighted (light & dark) and gets a copy button on hover.\u003C/p>\n\u003Cpre class=\"astro-code astro-code-themes github-light github-dark\" style=\"background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8; overflow-x: auto;\" tabindex=\"0\" data-language=\"ts\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#D73A49;--shiki-dark:#F97583\">export\u003C/span>\u003Cspan style=\"color:#D73A49;--shiki-dark:#F97583\"> function\u003C/span>\u003Cspan style=\"color:#6F42C1;--shiki-dark:#B392F0\"> greet\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">(\u003C/span>\u003Cspan style=\"color:#E36209;--shiki-dark:#FFAB70\">name\u003C/span>\u003Cspan style=\"color:#D73A49;--shiki-dark:#F97583\">:\u003C/span>\u003Cspan style=\"color:#005CC5;--shiki-dark:#79B8FF\"> string\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">) {\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#D73A49;--shiki-dark:#F97583\"> return\u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\"> `Hello, ${\u003C/span>\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">name\u003C/span>\u003Cspan style=\"color:#032F62;--shiki-dark:#9ECBFF\">}!`\u003C/span>\u003C/span>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#24292E;--shiki-dark:#E1E4E8\">}\u003C/span>\u003C/span>\u003C/code>\u003C/pre>\n\u003Ch3 id=\"tables\">Tables\u003C/h3>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\u003Ctable>\u003Cthead>\u003Ctr>\u003Cth>Command\u003C/th>\u003Cth>What it does\u003C/th>\u003C/tr>\u003C/thead>\u003Ctbody>\u003Ctr>\u003Ctd>\u003Ccode>open-doc dev\u003C/code>\u003C/td>\u003Ctd>Starts the dev server\u003C/td>\u003C/tr>\u003Ctr>\u003Ctd>\u003Ccode>open-doc build\u003C/code>\u003C/td>\u003Ctd>Builds to \u003Ccode>./dist\u003C/code>\u003C/td>\u003C/tr>\u003C/tbody>\u003C/table>\n\u003Ch3 id=\"blockquotes\">Blockquotes\u003C/h3>\n\u003Cblockquote>\n\u003Cp>Use blockquotes for asides and tips. Lead with a \u003Cstrong>bold\u003C/strong> word to give it a label.\u003C/p>\n\u003C/blockquote>\n\u003Ch3 id=\"lists-and-links\">Lists and links\u003C/h3>\n\u003Col>\n\u003Cli>Ordered lists work.\u003C/li>\n\u003Cli>So do \u003Ca href=\"/reference/faq\">internal links\u003C/a> and \u003Ca href=\"https://astro.build\">external ones\u003C/a>.\u003C/li>\n\u003C/ol>\n\u003Cul>\n\u003Cli>Bullets too\u003C/li>\n\u003Cli>With \u003Ccode>inline code\u003C/code>\u003C/li>\n\u003C/ul>\n\u003Cp>Headings automatically get anchor links and feed the “on this page” outline on the\nright.\u003C/p>",{"headings":192,"localImagePaths":217,"remoteImagePaths":218,"frontmatter":219,"imagePaths":220},[193,195,198,201,204,208,211,214],{"depth":33,"slug":194,"text":184},"writing-content",{"depth":36,"slug":196,"text":197},"frontmatter","Frontmatter",{"depth":36,"slug":199,"text":200},"the-navigation-model","The navigation model",{"depth":36,"slug":202,"text":203},"markdown-features","Markdown features",{"depth":205,"slug":206,"text":207},3,"code-blocks","Code blocks",{"depth":205,"slug":209,"text":210},"tables","Tables",{"depth":205,"slug":212,"text":213},"blockquotes","Blockquotes",{"depth":205,"slug":215,"text":216},"lists-and-links","Lists and links",[],[],{"title":184,"description":185},[]]
|
package/app/.astro/settings.json
DELETED
package/app/.astro/types.d.ts
DELETED