typerighter 0.42.1 → 0.43.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.
Files changed (54) hide show
  1. package/dist/{app-xAspP0Kq.js → app-DjpuKzvd.js} +17 -5
  2. package/dist/{cli-CThN6kIr.js → cli-DKDYNRYe.js} +5 -5
  3. package/dist/cli.js +1 -1
  4. package/dist/client/app/index.d.ts +29 -5
  5. package/dist/client/app/index.d.ts.map +1 -1
  6. package/dist/client/app/router.d.ts.map +1 -1
  7. package/dist/client/index.d.ts +2 -1
  8. package/dist/client/index.d.ts.map +1 -1
  9. package/dist/client/theme-default.js +822 -715
  10. package/dist/client.js +1 -1
  11. package/dist/fonts.css +2 -0
  12. package/dist/index.js +3 -3
  13. package/dist/{init-DSA-JLUJ.js → init-sdwwozr2.js} +3 -2
  14. package/dist/inlineRe-Cn-J_E76.js +4 -0
  15. package/dist/{jsonld-Du1iJ_fG.js → jsonld-Crj_9xpa.js} +1 -1
  16. package/dist/node/build/fonts.d.ts +2 -0
  17. package/dist/node/build/fonts.d.ts.map +1 -0
  18. package/dist/node/build/index.d.ts.map +1 -1
  19. package/dist/node/build/prerender.d.ts.map +1 -1
  20. package/dist/node/cli/init.d.ts.map +1 -1
  21. package/dist/node/lib/codegen/app-entry.d.ts +30 -0
  22. package/dist/node/lib/codegen/app-entry.d.ts.map +1 -0
  23. package/dist/node/lib/codegen/components.d.ts +7 -0
  24. package/dist/node/lib/codegen/components.d.ts.map +1 -0
  25. package/dist/node/lib/codegen/index.d.ts +4 -0
  26. package/dist/node/lib/codegen/index.d.ts.map +1 -0
  27. package/dist/node/lib/codegen/theme.d.ts +5 -0
  28. package/dist/node/lib/codegen/theme.d.ts.map +1 -0
  29. package/dist/node/lib/render/postprocess.d.ts +1 -0
  30. package/dist/node/lib/render/postprocess.d.ts.map +1 -1
  31. package/dist/node/lib/render/vue.d.ts.map +1 -1
  32. package/dist/node/plugin/vite/constants.d.ts +2 -0
  33. package/dist/node/plugin/vite/constants.d.ts.map +1 -1
  34. package/dist/node/plugin/vite/index.d.ts +1 -1
  35. package/dist/node/plugin/vite/index.d.ts.map +1 -1
  36. package/dist/node/plugin/vite/virtual/app.d.ts +3 -21
  37. package/dist/node/plugin/vite/virtual/app.d.ts.map +1 -1
  38. package/dist/node/plugin/vite/virtual/theme.d.ts +7 -0
  39. package/dist/node/plugin/vite/virtual/theme.d.ts.map +1 -0
  40. package/dist/prerenderWorker.js +2 -2
  41. package/dist/renderMath-C2Z7HdfG.js +19 -0
  42. package/dist/shared/types/ssg.d.ts +4 -0
  43. package/dist/shared/types/ssg.d.ts.map +1 -1
  44. package/dist/shared/utils/format.d.ts +2 -0
  45. package/dist/shared/utils/format.d.ts.map +1 -1
  46. package/dist/shared/utils/format.test.d.ts +2 -0
  47. package/dist/shared/utils/format.test.d.ts.map +1 -0
  48. package/dist/{shared-BMujDY3P.js → shared-QuBFygxT.js} +104 -98
  49. package/dist/shared.js +1 -1
  50. package/dist/typedown.schema.json +133 -0
  51. package/dist/typerighter.css +1 -1
  52. package/dist/{vite-Dup9wBL7.js → vite-Cj1Ofykq.js} +540 -425
  53. package/dist/vite.js +1 -1
  54. package/package.json +6 -4
@@ -4,6 +4,9 @@ var r = "index", i = [".td", ".md"], a = "**/*.{td,md}", o = ["title", "text"],
4
4
  //#endregion
5
5
  //#region src/shared/utils/format.ts
6
6
  function l(e) {
7
+ return e.replace(/(^|[-_])([a-z])/g, (e, t, n) => n.toUpperCase());
8
+ }
9
+ function u(e) {
7
10
  let t = e.match(/^(\d+)[-_](.+)$/);
8
11
  return t ? {
9
12
  order: Number(t[1]),
@@ -13,109 +16,112 @@ function l(e) {
13
16
  rest: e
14
17
  };
15
18
  }
16
- function u(e) {
17
- let { rest: t } = l(e), n = t.replace(/[-_]/g, " ").split(" ");
19
+ function d(e) {
20
+ return e.replace(/_/g, "-");
21
+ }
22
+ function f(e) {
23
+ let { rest: t } = u(e), n = t.replace(/[-_]/g, " ").split(" ");
18
24
  return 0 < n.length && (n[0] = n[0].charAt(0).toUpperCase() + n[0].slice(1)), n.join(" ");
19
25
  }
20
26
  //#endregion
21
27
  //#region src/shared/utils/path.ts
22
- var d = /* @__PURE__ */ e({
23
- basename: () => f,
24
- dirname: () => p,
25
- extname: () => m,
26
- filestem: () => h,
27
- isContentFile: () => g,
28
- isTypeFile: () => _,
29
- join: () => v,
30
- stripExtension: () => y,
31
- stripPrefix: () => b
28
+ var p = /* @__PURE__ */ e({
29
+ basename: () => m,
30
+ dirname: () => h,
31
+ extname: () => g,
32
+ filestem: () => _,
33
+ isContentFile: () => v,
34
+ isTypeFile: () => y,
35
+ join: () => b,
36
+ stripExtension: () => x,
37
+ stripPrefix: () => S
32
38
  });
33
- function f(e, t) {
34
- let n = x(e).split("/").pop() ?? "";
39
+ function m(e, t) {
40
+ let n = C(e).split("/").pop() ?? "";
35
41
  return t !== void 0 && n.endsWith(t) ? n.slice(0, -t.length) : n;
36
42
  }
37
- function p(e) {
38
- let t = x(e).split("/");
43
+ function h(e) {
44
+ let t = C(e).split("/");
39
45
  return t.pop(), t.join("/");
40
46
  }
41
- function m(e) {
42
- let t = f(e), n = t.lastIndexOf(".");
47
+ function g(e) {
48
+ let t = m(e), n = t.lastIndexOf(".");
43
49
  return n <= 0 ? "" : t.slice(n);
44
50
  }
45
- function h(e) {
46
- let t = f(e), n = t.lastIndexOf(".");
51
+ function _(e) {
52
+ let t = m(e), n = t.lastIndexOf(".");
47
53
  return n <= 0 ? t : t.slice(0, n);
48
54
  }
49
- function g(e) {
50
- return i.includes(m(e));
55
+ function v(e) {
56
+ return i.includes(g(e));
51
57
  }
52
- function _(e) {
53
- return g(e) && e.split("/").includes("_types");
58
+ function y(e) {
59
+ return v(e) && e.split("/").includes("_types");
54
60
  }
55
- function v(...e) {
61
+ function b(...e) {
56
62
  return e.filter(Boolean).join("/").replace(/\\+/g, "/").replace(/\/+/g, "/").replace(/\/$/, "") || "/";
57
63
  }
58
- function y(e) {
59
- let t = m(e);
64
+ function x(e) {
65
+ let t = g(e);
60
66
  return t ? e.slice(0, -t.length) : e;
61
67
  }
62
- function b(e, t) {
63
- let n = x(e), r = `/${t}/`, i = n.lastIndexOf(r);
68
+ function S(e, t) {
69
+ let n = C(e), r = `/${t}/`, i = n.lastIndexOf(r);
64
70
  return i === -1 ? n : n.slice(i + r.length);
65
71
  }
66
- function x(e) {
72
+ function C(e) {
67
73
  return e.replace(/\\/g, "/");
68
74
  }
69
75
  //#endregion
70
76
  //#region src/shared/utils/url.ts
71
77
  var ee = new Set("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip".split(","));
72
- function te(e) {
78
+ function w(e) {
73
79
  let t = e.indexOf("#");
74
80
  return 0 <= t ? e.slice(t + 1) : "";
75
81
  }
76
- function ne(e) {
77
- return T(e) ? C(e) : e;
82
+ function te(e) {
83
+ return O(e) ? E(e) : e;
78
84
  }
79
- function re(e, t) {
85
+ function ne(e, t) {
80
86
  return `${e}/${t}`;
81
87
  }
82
- function S(e) {
88
+ function T(e) {
83
89
  return e === "/" ? "/index" : e + "/index";
84
90
  }
85
- function C(e) {
86
- return p(A(e)) || "/";
91
+ function E(e) {
92
+ return h(M(e)) || "/";
87
93
  }
88
- function w(e) {
89
- let t = h(e);
90
- return "/" + v(p(e), t);
94
+ function D(e) {
95
+ let t = _(e);
96
+ return "/" + b(h(e), t);
91
97
  }
92
- function ie(e) {
98
+ function re(e) {
93
99
  return e.split("?")[0].split("#")[0];
94
100
  }
95
- function T(e) {
101
+ function O(e) {
96
102
  return e === "/index" || e.endsWith("/index");
97
103
  }
98
- function ae(e, t) {
104
+ function ie(e, t) {
99
105
  return t.startsWith(e + "/") || t === e;
100
106
  }
101
- function oe(e) {
107
+ function ae(e) {
102
108
  return c.test(e);
103
109
  }
104
- function E(e) {
105
- let t = m(e).slice(1);
110
+ function oe(e) {
111
+ let t = g(e).slice(1);
106
112
  return t === "" || !ee.has(t.toLowerCase());
107
113
  }
108
- function D(e) {
114
+ function k(e) {
109
115
  return e === "/" ? "/index" : e;
110
116
  }
111
- function O(e) {
117
+ function A(e) {
112
118
  let t = e.indexOf("#");
113
119
  return 0 <= t ? e.slice(0, t) : e;
114
120
  }
115
- function k(e) {
121
+ function j(e) {
116
122
  return e.replace(/^\//, "");
117
123
  }
118
- function A(e) {
124
+ function M(e) {
119
125
  return e.replace(/\/$/, "") || "/";
120
126
  }
121
127
  //#endregion
@@ -142,31 +148,31 @@ function se(e) {
142
148
  item: n
143
149
  });
144
150
  }
145
- return I(t), { entries: t.entries };
151
+ return R(t), { entries: t.entries };
146
152
  }
147
153
  function ce(e, t) {
148
154
  let n = {};
149
155
  function r(e) {
150
156
  let t = 0;
151
- for (let n of e.entries) n.kind === "file" ? N(n.item.filepath) || t++ : t += r(n.node);
157
+ for (let n of e.entries) n.kind === "file" ? F(n.item.filepath) || t++ : t += r(n.node);
152
158
  return t;
153
159
  }
154
160
  function i(e, t) {
155
- let n = j(e);
156
- return n ? w(n.filepath) : S(`${t}/${e.name}`);
161
+ let n = N(e);
162
+ return n ? D(n.filepath) : T(`${t}/${e.name}`);
157
163
  }
158
164
  function a(e, t) {
159
165
  let n = [];
160
166
  for (let a of e) a.kind === "dir" ? n.push({
161
167
  kind: "dir",
162
168
  sub: {
163
- name: u(a.node.name),
169
+ name: f(a.node.name),
164
170
  url: i(a.node, t),
165
171
  count: r(a.node)
166
172
  }
167
- }) : N(a.item.filepath) || n.push({
173
+ }) : F(a.item.filepath) || n.push({
168
174
  kind: "file",
169
- item: L(a.item)
175
+ item: z(a.item)
170
176
  });
171
177
  return n;
172
178
  }
@@ -175,7 +181,7 @@ function ce(e, t) {
175
181
  if (r.kind !== "dir") continue;
176
182
  let e = r.node, i = t ? `${t}/${e.name}` : `/${e.name}`;
177
183
  n[i] = {
178
- title: u(e.name),
184
+ title: f(e.name),
179
185
  url: i,
180
186
  entries: a(e.entries, i)
181
187
  }, o(e.entries, i);
@@ -187,47 +193,47 @@ function ce(e, t) {
187
193
  entries: a(e, "")
188
194
  }, o(e, ""), n;
189
195
  }
190
- function j(e) {
191
- for (let t of e.entries) if (t.kind === "file" && N(t.item.filepath)) return t.item;
196
+ function N(e) {
197
+ for (let t of e.entries) if (t.kind === "file" && F(t.item.filepath)) return t.item;
192
198
  }
193
199
  function le(e, t) {
194
- let n = f(p(e));
195
- return n ? u(n) : t;
200
+ let n = m(h(e));
201
+ return n ? f(n) : t;
196
202
  }
197
- function M(e, t) {
203
+ function P(e, t) {
198
204
  if (t !== void 0) return t;
199
- let n = h(e);
200
- if (N(e)) {
201
- let t = f(p(e));
202
- return t ? u(t) : n;
205
+ let n = _(e);
206
+ if (F(e)) {
207
+ let t = m(h(e));
208
+ return t ? f(t) : n;
203
209
  }
204
- return u(n);
210
+ return f(n);
205
211
  }
206
- function N(e) {
207
- return h(e) === r;
212
+ function F(e) {
213
+ return _(e) === r;
208
214
  }
209
- function P(e) {
210
- return e.kind === "dir" ? e.node.name : h(e.item.filepath);
215
+ function I(e) {
216
+ return e.kind === "dir" ? e.node.name : _(e.item.filepath);
211
217
  }
212
- function F(e, ...t) {
218
+ function L(e, ...t) {
213
219
  for (let n of t) {
214
220
  let t = e[n];
215
221
  if (typeof t == "string" && 0 < t.length) return t;
216
222
  }
217
223
  }
218
- function I(e) {
224
+ function R(e) {
219
225
  e.entries.sort((e, t) => {
220
- let n = P(e), r = P(t), i = l(n), a = l(r);
226
+ let n = I(e), r = I(t), i = u(n), a = u(r);
221
227
  return i.order === a.order ? i.order === Infinity && e.kind !== t.kind ? e.kind === "dir" ? -1 : 1 : i.rest.localeCompare(a.rest) : i.order - a.order;
222
228
  });
223
- for (let t of e.entries) t.kind === "dir" && I(t.node);
229
+ for (let t of e.entries) t.kind === "dir" && R(t.node);
224
230
  }
225
- function L(e) {
231
+ function z(e) {
226
232
  let t = e.header.tags, n = Array.isArray(t) ? t.filter((e) => typeof e == "string") : [];
227
233
  return {
228
- name: M(e.filepath, e.label),
229
- url: w(e.filepath),
230
- description: F(e.header, "description", "summary") ?? e.excerpt,
234
+ name: P(e.filepath, e.label),
235
+ url: D(e.filepath),
236
+ description: L(e.header, "description", "summary") ?? e.excerpt,
231
237
  tags: 0 < n.length ? n : void 0,
232
238
  mtime: e.fileMetadata?.mtime,
233
239
  schema: e.schema
@@ -235,13 +241,13 @@ function L(e) {
235
241
  }
236
242
  //#endregion
237
243
  //#region src/shared/utils/debounce.ts
238
- function R(e, t) {
244
+ function B(e, t) {
239
245
  let n;
240
246
  return (...r) => {
241
247
  clearTimeout(n), n = setTimeout(() => e(...r), t);
242
248
  };
243
249
  }
244
- function z(e, t) {
250
+ function V(e, t) {
245
251
  let n = 0, r;
246
252
  return (...i) => {
247
253
  let a = Date.now();
@@ -252,12 +258,12 @@ function z(e, t) {
252
258
  }
253
259
  //#endregion
254
260
  //#region src/shared/utils/field.ts
255
- function B(e) {
261
+ function H(e) {
256
262
  return e.startsWith("_");
257
263
  }
258
264
  //#endregion
259
265
  //#region src/shared/utils/html.ts
260
- var V = /* @__PURE__ */ t((/* @__PURE__ */ n(((e, t) => {
266
+ var U = /* @__PURE__ */ t((/* @__PURE__ */ n(((e, t) => {
261
267
  (function(e) {
262
268
  if (typeof n != "function") {
263
269
  var n = function(e) {
@@ -356,22 +362,22 @@ var V = /* @__PURE__ */ t((/* @__PURE__ */ n(((e, t) => {
356
362
  }) : typeof t == "object" && t.exports ? t.exports = c : e.striptags = c;
357
363
  })(e);
358
364
  })))(), 1);
359
- function H(e) {
365
+ function ue(e) {
360
366
  return e.replaceAll("&", "&amp;").replaceAll("\"", "&quot;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
361
367
  }
362
- function U(e) {
363
- return W((0, V.default)(e)).replace(/\s+/g, " ").trim();
364
- }
365
- var ue = /* @__PURE__ */ "code.em.strong.s.span.sub.sup.math.mrow.mi.mn.mo.mfrac.msup.msub.msubsup.msqrt.mroot.mtext.mspace.merror.semantics.annotation.mover.munder.munderover.mtable.mtr.mtd".split(".");
366
368
  function de(e) {
367
- return e === void 0 ? "" : (0, V.default)(e, ue);
369
+ return W((0, U.default)(e)).replace(/\s+/g, " ").trim();
370
+ }
371
+ var fe = /* @__PURE__ */ "code.em.strong.s.span.sub.sup.math.mrow.mi.mn.mo.mfrac.msup.msub.msubsup.msqrt.mroot.mtext.mspace.merror.semantics.annotation.mover.munder.munderover.mtable.mtr.mtd".split(".");
372
+ function pe(e) {
373
+ return e === void 0 ? "" : (0, U.default)(e, fe);
368
374
  }
369
375
  function W(e) {
370
376
  return e.replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&quot;", "\"").replaceAll("&#39;", "'").replaceAll("&amp;", "&");
371
377
  }
372
378
  //#endregion
373
379
  //#region src/shared/utils/regex.ts
374
- function fe(e) {
380
+ function me(e) {
375
381
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
376
382
  }
377
383
  //#endregion
@@ -384,7 +390,7 @@ function Q(e) {
384
390
  day: "numeric"
385
391
  });
386
392
  }
387
- function pe(e, t) {
393
+ function he(e, t) {
388
394
  return typeof window > "u" ? "" : Math.floor(Date.now() / 1e3) - e < Z ? `${t} ${$(e)}` : `${t} at ${Q(e)}`;
389
395
  }
390
396
  function $(e) {
@@ -392,20 +398,20 @@ function $(e) {
392
398
  let t = Math.floor(Date.now() / 1e3) - e;
393
399
  return t < G ? "just now" : t < K ? `${Math.floor(t / G)}m ago` : t < q ? `${Math.floor(t / K)}h ago` : t < J ? `${Math.floor(t / q)}d ago` : t < Y ? `${Math.floor(t / J)}w ago` : t < X ? `${Math.floor(t / Y)}mo ago` : `${Math.floor(t / X)}y ago`;
394
400
  }
395
- var me = new Intl.DateTimeFormat("en-US", {
401
+ var ge = new Intl.DateTimeFormat("en-US", {
396
402
  year: "numeric",
397
403
  month: "short",
398
404
  day: "numeric"
399
405
  });
400
- function he(e) {
406
+ function _e(e) {
401
407
  let t = new Date(e);
402
- return Number.isNaN(t.getTime()) ? e : me.format(t);
408
+ return Number.isNaN(t.getTime()) ? e : ge.format(t);
403
409
  }
404
- function ge(e) {
410
+ function ve(e) {
405
411
  return new Date(e).toISOString().slice(0, 10);
406
412
  }
407
- function _e(e) {
413
+ function ye(e) {
408
414
  return Math.floor(Date.now() / 1e3) - e < Z ? $(e) : Q(e);
409
415
  }
410
416
  //#endregion
411
- export { oe as A, d as B, re as C, ie as D, w as E, A as F, c as G, b as H, f as I, r as J, i as K, m as L, D as M, O as N, T as O, k as P, g as R, ne as S, C as T, l as U, y as V, u as W, s as X, o as Y, j as _, $ as a, N as b, H as c, W as d, B as f, ce as g, se as h, ge as i, E as j, ae as k, de as l, z as m, he as n, _e as o, R as p, a as q, pe as r, fe as s, Q as t, U as u, le as v, S as w, te as x, M as y, _ as z };
417
+ export { ae as A, p as B, ne as C, re as D, D as E, M as F, d as G, S as H, m as I, i as J, f as K, g as L, k as M, A as N, O, j as P, s as Q, v as R, te as S, E as T, l as U, x as V, u as W, r as X, a as Y, o as Z, N as _, $ as a, F as b, ue as c, W as d, H as f, ce as g, se as h, ve as i, oe as j, ie as k, pe as l, V as m, _e as n, ye as o, B as p, c as q, he as r, me as s, Q as t, de as u, le as v, T as w, w as x, P as y, y as z };
package/dist/shared.js CHANGED
@@ -1 +1 @@
1
- export { K as CONTENT_EXTENSIONS, q as CONTENT_GLOB, G as EXTERNAL_URL_RE, J as INDEX_FILENAME, Y as SEARCH_FIELDS, X as SEARCH_STORE_FIELDS, h as buildContentTree, g as buildDirectoryListingMap, p as debounce, c as escapeHtml, s as escapeRegex, t as formatAbsoluteTime, n as formatDateString, r as formatEditTime, i as formatIsoDate, a as formatRelativeTime, o as formatTime, x as getAnchor, S as getDirectoryFromPageUrl, C as getDirectoryUrl, w as getIndexUrl, _ as getNodeIndexItem, T as getParentUrl, E as getTdContentUrl, v as getTdIndexTitle, y as getTdResourceTitle, D as getUrlPath, f as isBuiltinField, b as isIndexFile, O as isIndexUrl, k as isUrlAncestorOf, A as isUrlExternal, j as isUrlToPage, U as parseNumericPrefix, B as path, M as resolveRootUrl, l as sanitizeInlineHtml, N as stripAnchor, u as stripHtml, P as stripLeadingSlash, F as stripTrailingSlash, m as throttle, d as unescapeHtml, W as unslugify } from "./shared-BMujDY3P.js";
1
+ export { J as CONTENT_EXTENSIONS, Y as CONTENT_GLOB, q as EXTERNAL_URL_RE, X as INDEX_FILENAME, Z as SEARCH_FIELDS, Q as SEARCH_STORE_FIELDS, h as buildContentTree, g as buildDirectoryListingMap, p as debounce, c as escapeHtml, s as escapeRegex, t as formatAbsoluteTime, n as formatDateString, r as formatEditTime, i as formatIsoDate, a as formatRelativeTime, o as formatTime, x as getAnchor, S as getDirectoryFromPageUrl, C as getDirectoryUrl, w as getIndexUrl, _ as getNodeIndexItem, T as getParentUrl, E as getTdContentUrl, v as getTdIndexTitle, y as getTdResourceTitle, D as getUrlPath, f as isBuiltinField, b as isIndexFile, O as isIndexUrl, k as isUrlAncestorOf, A as isUrlExternal, j as isUrlToPage, U as kebabToPascal, W as parseNumericPrefix, B as path, M as resolveRootUrl, l as sanitizeInlineHtml, G as snakeToKebab, N as stripAnchor, u as stripHtml, P as stripLeadingSlash, F as stripTrailingSlash, m as throttle, d as unescapeHtml, K as unslugify } from "./shared-QuBFygxT.js";
@@ -0,0 +1,133 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "typedown.schema.json",
4
+ "title": "Typedown vault configuration",
5
+ "type": "object",
6
+ "required": ["version"],
7
+ "additionalProperties": false,
8
+ "properties": {
9
+ "version": {
10
+ "type": "string",
11
+ "description": "Config file version",
12
+ "examples": ["1.0.0"]
13
+ },
14
+ "repo": {
15
+ "type": "string",
16
+ "description": "Repository URL shown in the site footer"
17
+ },
18
+ "vault": {
19
+ "type": "object",
20
+ "additionalProperties": false,
21
+ "properties": {
22
+ "root_dir": {
23
+ "type": "string",
24
+ "description": "Path to the vault directory relative to this file",
25
+ "default": ".",
26
+ "examples": ["vault", "docs", "."]
27
+ }
28
+ }
29
+ },
30
+ "theme": {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "properties": {
34
+ "components": {
35
+ "type": "array",
36
+ "description": "Custom Vue components: folder paths (scanned for .vue files) or explicit name-to-source mappings",
37
+ "items": {
38
+ "oneOf": [
39
+ {
40
+ "type": "string",
41
+ "description": "Folder path to scan for .vue files"
42
+ },
43
+ {
44
+ "type": "object",
45
+ "description": "Explicit component name to source path mapping",
46
+ "minProperties": 1,
47
+ "maxProperties": 1,
48
+ "additionalProperties": {
49
+ "type": "string"
50
+ }
51
+ }
52
+ ]
53
+ },
54
+ "examples": [
55
+ ["./src/components"],
56
+ [{ "Chart": "./src/Chart.vue" }],
57
+ ["./src/components", { "Chart": "./src/MyChart.vue" }]
58
+ ]
59
+ }
60
+ }
61
+ },
62
+ "site": {
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "properties": {
66
+ "title": {
67
+ "type": "string",
68
+ "description": "Site title shown in the browser tab and header"
69
+ },
70
+ "description": {
71
+ "type": "string",
72
+ "description": "Site description used in meta tags"
73
+ },
74
+ "origin": {
75
+ "type": "string",
76
+ "description": "Canonical site URL used for sitemap and SEO (e.g. https://example.com)",
77
+ "examples": ["https://example.com"]
78
+ },
79
+ "lang": {
80
+ "type": "string",
81
+ "description": "HTML lang attribute",
82
+ "default": "en",
83
+ "examples": ["en", "fr", "ja"]
84
+ },
85
+ "base_path": {
86
+ "type": "string",
87
+ "description": "Base path when the site is served from a subdirectory (e.g. /docs)",
88
+ "default": "/",
89
+ "examples": ["/", "/docs", "/blog"]
90
+ },
91
+ "author": {
92
+ "type": "string",
93
+ "description": "Site author name used in meta tags and JSON-LD"
94
+ },
95
+ "license": {
96
+ "type": "string",
97
+ "description": "Content license shown in the footer",
98
+ "examples": ["CC BY 4.0", "MIT", "AGPL-3.0-only"]
99
+ },
100
+ "public_dir": {
101
+ "type": "string",
102
+ "description": "Directory for static assets copied as-is to the build output",
103
+ "default": "public"
104
+ },
105
+ "nav": {
106
+ "type": "array",
107
+ "description": "Top navigation links (max 4 recommended)",
108
+ "maxItems": 4,
109
+ "items": {
110
+ "type": "object",
111
+ "required": ["title", "link"],
112
+ "additionalProperties": false,
113
+ "properties": {
114
+ "title": {
115
+ "type": "string",
116
+ "description": "Link label"
117
+ },
118
+ "link": {
119
+ "type": "string",
120
+ "description": "URL or internal path"
121
+ },
122
+ "icon": {
123
+ "type": "string",
124
+ "description": "Lucide icon name (e.g. icon.book, icon.github)",
125
+ "examples": ["icon.book", "icon.github", "icon.home"]
126
+ }
127
+ }
128
+ }
129
+ }
130
+ }
131
+ }
132
+ }
133
+ }