@writedocs/generator 0.10.19 → 0.11.0
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/astro.config.mjs +32 -8
- package/package.json +96 -93
- package/src/cli/base-path-layout.js +44 -0
- package/src/cli/build.js +177 -168
- package/src/cli/check-built-styles.js +41 -33
- package/src/cli/dev.js +261 -244
- package/src/cli/generate-api-pages.js +9 -5
- package/src/cli/page-list-watch.js +69 -66
- package/src/cli/run-pagefind.js +154 -148
- package/src/cli/write-mcp-files.js +103 -96
- package/src/cli/write-redirects-file.js +25 -8
- package/src/components/AppIcon.astro +51 -50
- package/src/components/Card.astro +193 -192
- package/src/components/CopyPageMenu.astro +374 -370
- package/src/components/Hint.astro +188 -187
- package/src/components/Icon.astro +72 -71
- package/src/components/Image.astro +165 -164
- package/src/components/Tile.astro +67 -66
- package/src/components/Video.astro +137 -136
- package/src/layout/BaseLayout.astro +21 -12
- package/src/layout/components/AnalyticsScripts.astro +6 -2
- package/src/layout/components/Breadcrumbs.astro +98 -97
- package/src/layout/components/ConsentBanner.astro +119 -118
- package/src/layout/components/MobileMenu.astro +229 -228
- package/src/layout/components/NavTree.astro +393 -392
- package/src/layout/components/Sidebar.astro +232 -231
- package/src/layout/components/SiteFooter.astro +87 -86
- package/src/layout/components/TopBar.astro +386 -385
- package/src/lib/agent-markdown.js +164 -162
- package/src/lib/asset-dimensions.js +89 -0
- package/src/lib/base-path.js +90 -0
- package/src/lib/config-schema.js +10 -0
- package/src/lib/config-schema.ts +17 -0
- package/src/lib/config.ts +1314 -1289
- package/src/lib/consent.js +108 -102
- package/src/lib/image-size.js +152 -140
- package/src/lib/json-schema-descriptions.js +1 -0
- package/src/lib/link-check.js +42 -4
- package/src/lib/llms-index.ts +90 -88
- package/src/lib/mcp-dev-integration.js +65 -60
- package/src/lib/mcp-index.ts +102 -101
- package/src/lib/pages.js +312 -304
- package/src/lib/project-files-integration.js +116 -61
- package/src/lib/project-files.js +137 -126
- package/src/lib/project-ignore.js +46 -0
- package/src/lib/rehype-base-path.js +62 -0
- package/src/lib/rehype-image-loading.js +71 -71
- package/src/lib/robots-txt.js +21 -16
- package/src/lib/seo-tags.js +155 -140
- package/src/lib/site-base.ts +27 -0
- package/src/lib/styles-asset-integration.js +58 -12
- package/src/lib/wdignore-cases.json +195 -0
- package/src/lib/wdignore.js +177 -0
- package/src/pages/404.astro +63 -62
- package/src/pages/[...slug].astro +1604 -1597
- package/src/pages/[...slug].md.ts +93 -93
- package/src/pages/llms-full.txt.ts +88 -86
- package/src/scripts/search.ts +241 -237
- package/writedocs.schema.json +6 -0
package/src/scripts/search.ts
CHANGED
|
@@ -1,237 +1,241 @@
|
|
|
1
|
-
// SearchModal.astro's own trigger button (rendered inside TopBar.astro) +
|
|
2
|
-
// overlay/modal. Owns opening/closing the modal, the ⌘K/Ctrl K shortcut,
|
|
3
|
-
// lazy-loading Pagefind on first open, and rendering results.
|
|
4
|
-
|
|
5
|
-
// The current page's modal, for the ⌘K/Ctrl K shortcut. ClientRouter swaps
|
|
6
|
-
// in a new modal on every navigation and initSearch() runs again for it; the
|
|
7
|
-
// shortcut is one document listener, attached once, that always acts on
|
|
8
|
-
// this. (Attached per page, it piled up one listener per visited page, each
|
|
9
|
-
// still driving that page's detached modal - on a page without a modal of
|
|
10
|
-
// its own, Ctrl K then locked the page's scrolling.)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
.then(() =>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
//
|
|
171
|
-
//
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
if (e.
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
1
|
+
// SearchModal.astro's own trigger button (rendered inside TopBar.astro) +
|
|
2
|
+
// overlay/modal. Owns opening/closing the modal, the ⌘K/Ctrl K shortcut,
|
|
3
|
+
// lazy-loading Pagefind on first open, and rendering results.
|
|
4
|
+
|
|
5
|
+
// The current page's modal, for the ⌘K/Ctrl K shortcut. ClientRouter swaps
|
|
6
|
+
// in a new modal on every navigation and initSearch() runs again for it; the
|
|
7
|
+
// shortcut is one document listener, attached once, that always acts on
|
|
8
|
+
// this. (Attached per page, it piled up one listener per visited page, each
|
|
9
|
+
// still driving that page's detached modal - on a page without a modal of
|
|
10
|
+
// its own, Ctrl K then locked the page's scrolling.)
|
|
11
|
+
declare const __WD_BASE__: string;
|
|
12
|
+
|
|
13
|
+
let active: { toggle(): void; closeIfOpen(): void } | null = null;
|
|
14
|
+
let shortcutBound = false;
|
|
15
|
+
|
|
16
|
+
export function initSearch(root: ParentNode) {
|
|
17
|
+
// No trigger button on a `blank` page (no topbar) - the modal and its
|
|
18
|
+
// shortcut still work there, as BaseLayout.astro intends.
|
|
19
|
+
const trigger = root.querySelector<HTMLButtonElement>('[data-search-trigger]');
|
|
20
|
+
const overlay = root.querySelector<HTMLElement>('#wd-search-overlay');
|
|
21
|
+
const input = root.querySelector<HTMLInputElement>('#wd-search-input');
|
|
22
|
+
const resultsEl = root.querySelector<HTMLElement>('#wd-search-results');
|
|
23
|
+
if (!overlay || !input || !resultsEl) {
|
|
24
|
+
active = null;
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (overlay.dataset.wdInit) return;
|
|
28
|
+
overlay.dataset.wdInit = 'true';
|
|
29
|
+
|
|
30
|
+
// Most keyboards outside macOS/iOS don't have a command key - "Ctrl K"
|
|
31
|
+
// reads more naturally there than the ⌘ glyph.
|
|
32
|
+
const kbd = trigger?.querySelector('.wd-search-kbd');
|
|
33
|
+
if (kbd && !/Mac|iPhone|iPad/.test(navigator.userAgent)) {
|
|
34
|
+
kbd.textContent = 'Ctrl K';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Loaded lazily on first open rather than on every page load - most
|
|
38
|
+
// visits never open search, and the module + its wasm binary are pure
|
|
39
|
+
// overhead until someone actually wants to search. Pagefind only writes
|
|
40
|
+
// this file as a postbuild step, after Astro's own build (and therefore
|
|
41
|
+
// Vite's bundling) has already finished - see run-pagefind.js - so it
|
|
42
|
+
// never exists at `writedocs dev` time, and doesn't exist yet even
|
|
43
|
+
// during a production build's own Vite transform pass.
|
|
44
|
+
//
|
|
45
|
+
// `/* @vite-ignore */` alone doesn't stop Vite from trying to resolve it
|
|
46
|
+
// anyway: that comment only suppresses static analysis for a
|
|
47
|
+
// *non-literal* dynamic import specifier - a literal string like
|
|
48
|
+
// '/pagefind/pagefind.js' still gets resolved at transform time
|
|
49
|
+
// regardless of the comment, which crashes `writedocs dev` outright once
|
|
50
|
+
// this file exists in the template. Routing the literal through a
|
|
51
|
+
// variable first makes the specifier opaque to static analysis,
|
|
52
|
+
// deferring resolution to the browser at runtime - where the .catch()
|
|
53
|
+
// below handles "not built yet" gracefully instead.
|
|
54
|
+
let pagefind: any = null;
|
|
55
|
+
let loadPromise: Promise<any> | null = null;
|
|
56
|
+
function ensurePagefind() {
|
|
57
|
+
if (!loadPromise) {
|
|
58
|
+
// A page under a hidden navigation item searches its own space's index
|
|
59
|
+
// (cli/run-pagefind.js, lib/hidden-sections.js); every other page, the site's.
|
|
60
|
+
const space = document.querySelector<HTMLElement>('[data-wd-search-scope]')?.dataset.wdSearchSpace;
|
|
61
|
+
// Under writedocs.json's `basePath` ("" or "/docs", astro.config.mjs) -
|
|
62
|
+
// written into the strings so a site without one gets the same code.
|
|
63
|
+
const pagefindUrl = space ? `${__WD_BASE__}/pagefind-spaces/${encodeURIComponent(space)}/pagefind.js` : `${__WD_BASE__}/pagefind/pagefind.js`;
|
|
64
|
+
loadPromise = import(/* @vite-ignore */ pagefindUrl)
|
|
65
|
+
.then((mod: any) => {
|
|
66
|
+
pagefind = mod;
|
|
67
|
+
return mod.init();
|
|
68
|
+
})
|
|
69
|
+
.then(() => pagefind)
|
|
70
|
+
.catch(() => {
|
|
71
|
+
resultsEl.innerHTML =
|
|
72
|
+
'<div class="wd-search-empty">Search isn\'t available in this preview - run a full build to index it.</div>';
|
|
73
|
+
return null;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return loadPromise;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
let currentResults: HTMLElement[] = [];
|
|
80
|
+
let activeIndex = -1;
|
|
81
|
+
|
|
82
|
+
// Down on the last result (or Up on the first) stays there - Enter always
|
|
83
|
+
// has a result to open.
|
|
84
|
+
function setActive(index: number) {
|
|
85
|
+
currentResults.forEach((el) => el.classList.remove('wd-search-result-active'));
|
|
86
|
+
activeIndex = currentResults.length ? Math.min(Math.max(index, 0), currentResults.length - 1) : -1;
|
|
87
|
+
if (activeIndex >= 0) {
|
|
88
|
+
currentResults[activeIndex].classList.add('wd-search-result-active');
|
|
89
|
+
currentResults[activeIndex].scrollIntoView({ block: 'nearest' });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Search looks in the version, language and product of the page the reader
|
|
94
|
+
// is on (plus pages outside any of them), with a switch to search
|
|
95
|
+
// everything. [...slug].astro marks each page's scope for Pagefind and
|
|
96
|
+
// for this - see lib/search-scope.js.
|
|
97
|
+
let everything = false;
|
|
98
|
+
const pageScope = () => {
|
|
99
|
+
const el = document.querySelector<HTMLElement>('[data-wd-search-scope]');
|
|
100
|
+
const key = el?.dataset.wdSearchScope ?? 'all';
|
|
101
|
+
return key === 'all' ? null : { key, label: el?.dataset.wdSearchScopeLabel || key };
|
|
102
|
+
};
|
|
103
|
+
function scopeNote(scope: { label: string } | null, found: boolean) {
|
|
104
|
+
if (!scope) return null;
|
|
105
|
+
const note = document.createElement('div');
|
|
106
|
+
note.className = 'wd-search-scope';
|
|
107
|
+
const text = document.createElement('span');
|
|
108
|
+
const button = document.createElement('button');
|
|
109
|
+
button.type = 'button';
|
|
110
|
+
button.className = 'wd-search-scope-toggle';
|
|
111
|
+
if (everything) {
|
|
112
|
+
text.textContent = 'Showing results from the whole site.';
|
|
113
|
+
button.textContent = `Only ${scope.label}`;
|
|
114
|
+
} else {
|
|
115
|
+
text.textContent = found ? `Showing results in ${scope.label}.` : `No results in ${scope.label}.`;
|
|
116
|
+
button.textContent = 'Search everything';
|
|
117
|
+
}
|
|
118
|
+
button.addEventListener('click', (e) => {
|
|
119
|
+
e.stopPropagation();
|
|
120
|
+
everything = !everything;
|
|
121
|
+
input.focus();
|
|
122
|
+
runSearch(input.value);
|
|
123
|
+
});
|
|
124
|
+
note.append(text, ' ', button);
|
|
125
|
+
return note;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
async function runSearch(term: string) {
|
|
129
|
+
if (!term.trim()) {
|
|
130
|
+
resultsEl.innerHTML = '<div class="wd-search-hint">Start typing to search...</div>';
|
|
131
|
+
currentResults = [];
|
|
132
|
+
activeIndex = -1;
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const pf = await ensurePagefind();
|
|
136
|
+
if (!pf) return;
|
|
137
|
+
// debouncedSearch resolves to null when a newer keystroke has already
|
|
138
|
+
// superseded this call - pagefind's own debounce, on top of (not
|
|
139
|
+
// instead of) the plain `input` listener below, so a fast typist never
|
|
140
|
+
// races two searches rendering out of order.
|
|
141
|
+
const scope = pageScope();
|
|
142
|
+
const options = scope && !everything ? { filters: { any: [{ scope: scope.key }, { scope: 'all' }] } } : {};
|
|
143
|
+
const search = await pf.debouncedSearch(term, options, 150);
|
|
144
|
+
if (search === null) return;
|
|
145
|
+
if (search.results.length === 0) {
|
|
146
|
+
resultsEl.innerHTML = '<div class="wd-search-empty">No results.</div>';
|
|
147
|
+
const note = scopeNote(scope, false);
|
|
148
|
+
if (note) resultsEl.replaceChildren(note);
|
|
149
|
+
currentResults = [];
|
|
150
|
+
activeIndex = -1;
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
const entries = await Promise.all(search.results.slice(0, 12).map((r: any) => r.data()));
|
|
154
|
+
resultsEl.innerHTML = '';
|
|
155
|
+
for (const data of entries) {
|
|
156
|
+
const a = document.createElement('a');
|
|
157
|
+
a.className = 'wd-search-result';
|
|
158
|
+
a.href = data.url;
|
|
159
|
+
const title = document.createElement('div');
|
|
160
|
+
title.className = 'wd-search-result-title';
|
|
161
|
+
title.textContent = data.meta?.title ?? data.url;
|
|
162
|
+
// Where the page sits: "API Reference › Webhooks".
|
|
163
|
+
const section = data.meta?.section ? document.createElement('div') : null;
|
|
164
|
+
if (section) {
|
|
165
|
+
section.className = 'wd-search-result-section';
|
|
166
|
+
section.textContent = data.meta.section;
|
|
167
|
+
}
|
|
168
|
+
const excerpt = document.createElement('div');
|
|
169
|
+
excerpt.className = 'wd-search-result-excerpt';
|
|
170
|
+
// innerHTML (not textContent) is deliberate: pagefind returns this
|
|
171
|
+
// pre-sanitized with <mark> wrapping the matched terms, which is the
|
|
172
|
+
// whole point - a plain-text excerpt couldn't highlight anything.
|
|
173
|
+
// The section is indexed as the page's last words, so a short page's
|
|
174
|
+
// excerpt ends with it - shown once, on its own line, unless it's what
|
|
175
|
+
// matched (then the excerpt keeps it, highlighted).
|
|
176
|
+
const trailing = data.meta?.section ? ` ${data.meta.section}.` : null;
|
|
177
|
+
excerpt.innerHTML = trailing && data.excerpt.endsWith(trailing) ? data.excerpt.slice(0, -trailing.length) : data.excerpt;
|
|
178
|
+
a.append(title, ...(section ? [section] : []), excerpt);
|
|
179
|
+
resultsEl.appendChild(a);
|
|
180
|
+
}
|
|
181
|
+
const note = scopeNote(scope, true);
|
|
182
|
+
if (note) resultsEl.appendChild(note);
|
|
183
|
+
currentResults = Array.from(resultsEl.querySelectorAll('.wd-search-result'));
|
|
184
|
+
setActive(0);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function open() {
|
|
188
|
+
overlay.hidden = false;
|
|
189
|
+
document.body.style.overflow = 'hidden';
|
|
190
|
+
input.value = '';
|
|
191
|
+
everything = false;
|
|
192
|
+
resultsEl.innerHTML = '<div class="wd-search-hint">Start typing to search...</div>';
|
|
193
|
+
currentResults = [];
|
|
194
|
+
activeIndex = -1;
|
|
195
|
+
ensurePagefind();
|
|
196
|
+
input.focus();
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function close() {
|
|
200
|
+
overlay.hidden = true;
|
|
201
|
+
document.body.style.overflow = '';
|
|
202
|
+
trigger?.focus();
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
trigger?.addEventListener('click', open);
|
|
206
|
+
overlay.addEventListener('click', (e) => {
|
|
207
|
+
if (e.target === overlay) close();
|
|
208
|
+
});
|
|
209
|
+
input.addEventListener('input', () => runSearch(input.value));
|
|
210
|
+
input.addEventListener('keydown', (e) => {
|
|
211
|
+
if (e.key === 'ArrowDown') {
|
|
212
|
+
e.preventDefault();
|
|
213
|
+
setActive(activeIndex + 1);
|
|
214
|
+
} else if (e.key === 'ArrowUp') {
|
|
215
|
+
e.preventDefault();
|
|
216
|
+
setActive(activeIndex - 1);
|
|
217
|
+
} else if (e.key === 'Enter' && activeIndex >= 0) {
|
|
218
|
+
currentResults[activeIndex]?.click();
|
|
219
|
+
} else if (e.key === 'Escape') {
|
|
220
|
+
close();
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
active = {
|
|
224
|
+
toggle: () => (overlay.hidden ? open() : close()),
|
|
225
|
+
closeIfOpen: () => {
|
|
226
|
+
if (!overlay.hidden) close();
|
|
227
|
+
},
|
|
228
|
+
};
|
|
229
|
+
if (!shortcutBound) {
|
|
230
|
+
shortcutBound = true;
|
|
231
|
+
document.addEventListener('keydown', (e) => {
|
|
232
|
+
if (!active) return;
|
|
233
|
+
if ((e.key === 'k' || e.key === 'K') && (e.metaKey || e.ctrlKey)) {
|
|
234
|
+
e.preventDefault();
|
|
235
|
+
active.toggle();
|
|
236
|
+
} else if (e.key === 'Escape') {
|
|
237
|
+
active.closeIfOpen();
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
}
|
package/writedocs.schema.json
CHANGED
|
@@ -705,6 +705,12 @@
|
|
|
705
705
|
"description": "The site's address, like \"docs.example.com\". Turns on sitemap.xml and absolute URLs in link previews.",
|
|
706
706
|
"markdownDescription": "The site's address, like \"docs.example.com\". Turns on sitemap.xml and absolute URLs in link previews."
|
|
707
707
|
},
|
|
708
|
+
"basePath": {
|
|
709
|
+
"type": "string",
|
|
710
|
+
"pattern": "^(\\/|(\\/[a-z0-9_-]+)+)?$",
|
|
711
|
+
"description": "The path the site is served under, like \"/docs\" for example.com/docs - usually behind your own proxy. Every address the site makes starts with it, and the build writes the site to dist/docs/. Starts with \"/\", no \"/\" at the end; lowercase letters, digits, \"-\" and \"_\". Default: none, the site at the root.",
|
|
712
|
+
"markdownDescription": "The path the site is served under, like \"/docs\" for example.com/docs - usually behind your own proxy. Every address the site makes starts with it, and the build writes the site to dist/docs/. Starts with \"/\", no \"/\" at the end; lowercase letters, digits, \"-\" and \"_\". Default: none, the site at the root."
|
|
713
|
+
},
|
|
708
714
|
"seo": {
|
|
709
715
|
"default": {},
|
|
710
716
|
"type": "object",
|