@writedocs/generator 0.13.4 → 0.13.5

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 (86) hide show
  1. package/README.md +28 -28
  2. package/astro.config.mjs +645 -645
  3. package/bin/writedocs.js +356 -356
  4. package/package.json +99 -99
  5. package/src/cli/base-path-layout.js +44 -44
  6. package/src/cli/build-auth.js +135 -135
  7. package/src/cli/build.js +203 -203
  8. package/src/cli/check-built-styles.js +41 -41
  9. package/src/cli/convert.js +124 -124
  10. package/src/cli/dev.js +268 -268
  11. package/src/cli/exit-when-flushed.js +42 -42
  12. package/src/cli/generate-api-pages.js +507 -507
  13. package/src/cli/og-image-worker.js +20 -20
  14. package/src/cli/og-images.js +70 -70
  15. package/src/cli/page-list-watch.js +69 -69
  16. package/src/cli/run-astro.js +97 -97
  17. package/src/cli/run-pagefind.js +154 -154
  18. package/src/cli/write-mcp-files.js +103 -103
  19. package/src/cli/write-redirects-file.js +158 -158
  20. package/src/components/ApiReferencePanel.astro +1792 -1792
  21. package/src/components/AppIcon.astro +51 -51
  22. package/src/components/Card.astro +193 -193
  23. package/src/components/CodeGroup.astro +63 -39
  24. package/src/components/CopyPageMenu.astro +374 -374
  25. package/src/components/Hint.astro +188 -188
  26. package/src/components/Icon.astro +72 -72
  27. package/src/components/Image.astro +165 -165
  28. package/src/components/Tile.astro +67 -67
  29. package/src/components/Video.astro +137 -137
  30. package/src/content.config.ts +203 -203
  31. package/src/layout/BaseLayout.astro +908 -908
  32. package/src/layout/components/AnalyticsScripts.astro +49 -49
  33. package/src/layout/components/Breadcrumbs.astro +98 -98
  34. package/src/layout/components/ConsentBanner.astro +119 -119
  35. package/src/layout/components/MobileMenu.astro +225 -225
  36. package/src/layout/components/NavTree.astro +408 -408
  37. package/src/layout/components/Sidebar.astro +232 -232
  38. package/src/layout/components/SiteFooter.astro +87 -87
  39. package/src/layout/components/TopBar.astro +386 -386
  40. package/src/layout/styles/base.css +332 -326
  41. package/src/layout/styles/mobile-menu.css +285 -285
  42. package/src/lib/agent-markdown.js +164 -164
  43. package/src/lib/asset-dimensions.js +89 -89
  44. package/src/lib/base-path.js +90 -90
  45. package/src/lib/cli-report.js +22 -22
  46. package/src/lib/code-line-numbers.js +13 -0
  47. package/src/lib/config-schema.ts +2509 -2509
  48. package/src/lib/config.ts +1316 -1316
  49. package/src/lib/consent.js +108 -108
  50. package/src/lib/content-store-reload-integration.js +101 -101
  51. package/src/lib/icon-data-dev.js +53 -53
  52. package/src/lib/image-size.js +152 -152
  53. package/src/lib/json-schema-descriptions.js +228 -228
  54. package/src/lib/link-check.js +544 -544
  55. package/src/lib/llms-index.ts +90 -90
  56. package/src/lib/mcp-dev-integration.js +65 -65
  57. package/src/lib/mcp-index.ts +102 -102
  58. package/src/lib/mintlify-convert.js +605 -605
  59. package/src/lib/moved-api-pages.js +49 -49
  60. package/src/lib/og-cards.js +33 -33
  61. package/src/lib/og-image.js +235 -235
  62. package/src/lib/openapi-dev-status.js +80 -80
  63. package/src/lib/openapi-reload-integration.js +193 -193
  64. package/src/lib/pages.js +312 -312
  65. package/src/lib/project-files-integration.js +116 -116
  66. package/src/lib/project-files.js +137 -137
  67. package/src/lib/rehype-base-path.js +62 -62
  68. package/src/lib/rehype-image-loading.js +71 -71
  69. package/src/lib/robots-txt.js +21 -21
  70. package/src/lib/search-scope.js +44 -44
  71. package/src/lib/selector-placement.js +50 -50
  72. package/src/lib/seo-tags.js +155 -155
  73. package/src/lib/shiki-code-block.js +7 -1
  74. package/src/lib/site-base.ts +27 -27
  75. package/src/lib/styles-asset-integration.js +291 -291
  76. package/src/lib/wdignore-cases.json +195 -195
  77. package/src/lib/wdignore.js +177 -177
  78. package/src/pages/404.astro +63 -63
  79. package/src/pages/[...slug].astro +1762 -1608
  80. package/src/pages/[...slug].md.ts +93 -93
  81. package/src/pages/llms-full.txt.ts +88 -88
  82. package/src/pages/og/[...slug].png.ts +63 -63
  83. package/src/scripts/mobile-menu.ts +80 -80
  84. package/src/scripts/search.ts +245 -245
  85. package/src/scripts/sidebar-scroll.ts +61 -61
  86. package/src/styles/global.css +40 -40
@@ -1,177 +1,177 @@
1
- // Which of a project's files are left out: never published, never read as
2
- // content. Three layers, in this order:
3
- //
4
- // LOCKED_PATTERNS - secrets. Always left out; no `.wdignore` line brings
5
- // one back.
6
- // DEFAULT_PATTERNS - tooling and data that a docs repository holds but a
7
- // site rarely means to publish. Left out unless the
8
- // project's `.wdignore` re-includes them with `!`.
9
- // the project's `.wdignore` - its own patterns, in .gitignore syntax.
10
- //
11
- // Files under the top-level `public/` folder are the exception to the
12
- // second layer: putting a file there is already saying "publish this", so
13
- // only LOCKED_PATTERNS and the project's own `.wdignore` apply to them
14
- // (`public/.well-known/security.txt` is published; `public/.env` is not).
15
- //
16
- // THIS FILE IS A CONTRACT. The WriteDocs platform imports it
17
- // (`@writedocs/generator/wdignore`) and applies the same rules when it
18
- // syncs a project, so a `.env` never reaches its storage. It runs in a
19
- // Cloudflare Worker there: nothing from Node (`fs`, `path`, `process`,
20
- // `Buffer`) may be imported or used here - only `ignore`, which is plain
21
- // JavaScript. It takes paths and the text of `.wdignore`; whoever calls it
22
- // does the reading. scripts/wdignore.test.js bundles it for a browser to
23
- // prove it, and runs every case in wdignore-cases.json, which the platform
24
- // runs too.
25
- //
26
- // The two lists below are the only place the default exclusions are
27
- // written. The docs (site/ and docs/dev/) describe them; nothing else
28
- // repeats them.
29
- import ignore from 'ignore';
30
-
31
- /** The project's own ignore file, at its root. */
32
- export const WDIGNORE_FILE = '.wdignore';
33
-
34
- /** Never published and never synced, whatever `.wdignore` says. */
35
- export const LOCKED_PATTERNS = [
36
- // Environment files: API keys and passwords.
37
- '.env',
38
- '.env.*',
39
- // The repository's own history.
40
- '.git/',
41
- // npm's configuration, which can hold a registry token.
42
- '.npmrc',
43
- // Private keys and the containers that hold them.
44
- '*.pem',
45
- '*.key',
46
- '*.p12',
47
- '*.pfx',
48
- 'id_rsa*',
49
- 'id_dsa*',
50
- 'id_ecdsa*',
51
- 'id_ed25519*',
52
- ];
53
-
54
- /** Left out by default; a `.wdignore` line starting with `!` brings one back. */
55
- export const DEFAULT_PATTERNS = [
56
- // Every file and folder whose name starts with a dot: .gitignore,
57
- // .gitmodules, .gitattributes, .github/, .vscode/, .DS_Store, .wdignore,
58
- // .writedocs/ ...
59
- '.*',
60
- // Package manifests and lockfiles.
61
- 'package.json',
62
- 'package-lock.json',
63
- 'yarn.lock',
64
- 'pnpm-lock.yaml',
65
- 'bun.lockb',
66
- 'bun.lock',
67
- 'composer.json',
68
- 'composer.lock',
69
- // Dependencies and build output, at any depth.
70
- 'node_modules/',
71
- 'dist/',
72
- // Tooling and hosting configuration.
73
- 'tsconfig.json',
74
- 'jsconfig.json',
75
- 'vercel.json',
76
- 'netlify.json',
77
- 'netlify.toml',
78
- 'wrangler.json',
79
- 'wrangler.jsonc',
80
- 'wrangler.toml',
81
- 'Dockerfile',
82
- 'docker-compose*.yml',
83
- 'docker-compose*.yaml',
84
- // Certificates and key stores.
85
- '*.crt',
86
- '*.jks',
87
- '*.keystore',
88
- // Databases and dumps.
89
- '*.sqlite',
90
- '*.sqlite3',
91
- '*.db',
92
- '*.sql',
93
- // Logs.
94
- '*.log',
95
- ];
96
-
97
- /** Paths that are left out of the site (the patterns above match them) but
98
- * that the build reads. A sync that drops ignored files must still deliver
99
- * these, or the build runs with different rules than the sync did. */
100
- export const BUILD_INPUT_PATHS = ['.wdignore', '.mintignore', '.writedocs/asset-dimensions.json'];
101
-
102
- /** The top-level folder whose files skip DEFAULT_PATTERNS. */
103
- const PUBLIC_DIR = 'public';
104
-
105
- function clean(text) {
106
- return typeof text === 'string' ? text.replace(/^\uFEFF/, '') : '';
107
- }
108
-
109
- /** A project-relative POSIX path ("docs/a.pdf", no leading slash) with any
110
- * trailing slash removed, or null when it isn't one: empty, absolute,
111
- * with a backslash, or with a `.`/`..` segment. */
112
- function normalize(relPath) {
113
- if (typeof relPath !== 'string') return null;
114
- const trimmed = relPath.replace(/\/+$/, '');
115
- if (!trimmed || trimmed.startsWith('/') || trimmed.includes('\\')) return null;
116
- if (trimmed.split('/').some((segment) => segment === '' || segment === '.' || segment === '..')) return null;
117
- return trimmed;
118
- }
119
-
120
- /** The rules for one project. `text` is the content of its `.wdignore`
121
- * ('' or undefined when it has none).
122
- *
123
- * `ignores(relPath, isDirectory)` says whether a path is left out.
124
- * `relPath` is a POSIX path from the project root, with no leading slash;
125
- * pass `isDirectory` as true for a folder (a pattern ending in `/` only
126
- * matches folders). A path inside an ignored folder is ignored. A path
127
- * that isn't a valid project-relative path is ignored too - the safe
128
- * answer. Matching ignores letter case, as it does on the file systems
129
- * most projects are written on.
130
- *
131
- * `isLocked(relPath, isDirectory)` says whether LOCKED_PATTERNS is the
132
- * reason - a path `.wdignore` can't bring back. */
133
- export function createWdignore(text = '') {
134
- const own = clean(text);
135
- const locked = ignore().add(LOCKED_PATTERNS);
136
- const everywhere = ignore().add(DEFAULT_PATTERNS).add(own);
137
- const inPublic = ignore().add(own);
138
-
139
- const target = (relPath, isDirectory) => {
140
- const normal = normalize(relPath);
141
- return normal === null ? null : isDirectory ? `${normal}/` : normal;
142
- };
143
-
144
- return {
145
- ignores(relPath, isDirectory = false) {
146
- const p = target(relPath, isDirectory);
147
- if (p === null) return true;
148
- if (locked.ignores(p)) return true;
149
- const underPublic = p.toLowerCase().startsWith(`${PUBLIC_DIR}/`);
150
- return (underPublic ? inPublic : everywhere).ignores(p);
151
- },
152
- isLocked(relPath, isDirectory = false) {
153
- const p = target(relPath, isDirectory);
154
- return p !== null && locked.ignores(p);
155
- },
156
- };
157
- }
158
-
159
- /** Splits a list of file paths by the rules: `kept` are the files a sync
160
- * delivers and a build may publish; `ignored` are left out. `buildInputs`
161
- * are the ignored ones the build still has to receive (BUILD_INPUT_PATHS).
162
- * Every list keeps the order of `paths`. */
163
- export function partitionPaths(paths, text = '') {
164
- const rules = createWdignore(text);
165
- const inputs = new Set(BUILD_INPUT_PATHS);
166
- const kept = [];
167
- const ignored = [];
168
- const buildInputs = [];
169
- for (const p of paths) {
170
- if (!rules.ignores(p)) kept.push(p);
171
- else {
172
- ignored.push(p);
173
- if (inputs.has(p)) buildInputs.push(p);
174
- }
175
- }
176
- return { kept, ignored, buildInputs };
177
- }
1
+ // Which of a project's files are left out: never published, never read as
2
+ // content. Three layers, in this order:
3
+ //
4
+ // LOCKED_PATTERNS - secrets. Always left out; no `.wdignore` line brings
5
+ // one back.
6
+ // DEFAULT_PATTERNS - tooling and data that a docs repository holds but a
7
+ // site rarely means to publish. Left out unless the
8
+ // project's `.wdignore` re-includes them with `!`.
9
+ // the project's `.wdignore` - its own patterns, in .gitignore syntax.
10
+ //
11
+ // Files under the top-level `public/` folder are the exception to the
12
+ // second layer: putting a file there is already saying "publish this", so
13
+ // only LOCKED_PATTERNS and the project's own `.wdignore` apply to them
14
+ // (`public/.well-known/security.txt` is published; `public/.env` is not).
15
+ //
16
+ // THIS FILE IS A CONTRACT. The WriteDocs platform imports it
17
+ // (`@writedocs/generator/wdignore`) and applies the same rules when it
18
+ // syncs a project, so a `.env` never reaches its storage. It runs in a
19
+ // Cloudflare Worker there: nothing from Node (`fs`, `path`, `process`,
20
+ // `Buffer`) may be imported or used here - only `ignore`, which is plain
21
+ // JavaScript. It takes paths and the text of `.wdignore`; whoever calls it
22
+ // does the reading. scripts/wdignore.test.js bundles it for a browser to
23
+ // prove it, and runs every case in wdignore-cases.json, which the platform
24
+ // runs too.
25
+ //
26
+ // The two lists below are the only place the default exclusions are
27
+ // written. The docs (site/ and docs/dev/) describe them; nothing else
28
+ // repeats them.
29
+ import ignore from 'ignore';
30
+
31
+ /** The project's own ignore file, at its root. */
32
+ export const WDIGNORE_FILE = '.wdignore';
33
+
34
+ /** Never published and never synced, whatever `.wdignore` says. */
35
+ export const LOCKED_PATTERNS = [
36
+ // Environment files: API keys and passwords.
37
+ '.env',
38
+ '.env.*',
39
+ // The repository's own history.
40
+ '.git/',
41
+ // npm's configuration, which can hold a registry token.
42
+ '.npmrc',
43
+ // Private keys and the containers that hold them.
44
+ '*.pem',
45
+ '*.key',
46
+ '*.p12',
47
+ '*.pfx',
48
+ 'id_rsa*',
49
+ 'id_dsa*',
50
+ 'id_ecdsa*',
51
+ 'id_ed25519*',
52
+ ];
53
+
54
+ /** Left out by default; a `.wdignore` line starting with `!` brings one back. */
55
+ export const DEFAULT_PATTERNS = [
56
+ // Every file and folder whose name starts with a dot: .gitignore,
57
+ // .gitmodules, .gitattributes, .github/, .vscode/, .DS_Store, .wdignore,
58
+ // .writedocs/ ...
59
+ '.*',
60
+ // Package manifests and lockfiles.
61
+ 'package.json',
62
+ 'package-lock.json',
63
+ 'yarn.lock',
64
+ 'pnpm-lock.yaml',
65
+ 'bun.lockb',
66
+ 'bun.lock',
67
+ 'composer.json',
68
+ 'composer.lock',
69
+ // Dependencies and build output, at any depth.
70
+ 'node_modules/',
71
+ 'dist/',
72
+ // Tooling and hosting configuration.
73
+ 'tsconfig.json',
74
+ 'jsconfig.json',
75
+ 'vercel.json',
76
+ 'netlify.json',
77
+ 'netlify.toml',
78
+ 'wrangler.json',
79
+ 'wrangler.jsonc',
80
+ 'wrangler.toml',
81
+ 'Dockerfile',
82
+ 'docker-compose*.yml',
83
+ 'docker-compose*.yaml',
84
+ // Certificates and key stores.
85
+ '*.crt',
86
+ '*.jks',
87
+ '*.keystore',
88
+ // Databases and dumps.
89
+ '*.sqlite',
90
+ '*.sqlite3',
91
+ '*.db',
92
+ '*.sql',
93
+ // Logs.
94
+ '*.log',
95
+ ];
96
+
97
+ /** Paths that are left out of the site (the patterns above match them) but
98
+ * that the build reads. A sync that drops ignored files must still deliver
99
+ * these, or the build runs with different rules than the sync did. */
100
+ export const BUILD_INPUT_PATHS = ['.wdignore', '.mintignore', '.writedocs/asset-dimensions.json'];
101
+
102
+ /** The top-level folder whose files skip DEFAULT_PATTERNS. */
103
+ const PUBLIC_DIR = 'public';
104
+
105
+ function clean(text) {
106
+ return typeof text === 'string' ? text.replace(/^\uFEFF/, '') : '';
107
+ }
108
+
109
+ /** A project-relative POSIX path ("docs/a.pdf", no leading slash) with any
110
+ * trailing slash removed, or null when it isn't one: empty, absolute,
111
+ * with a backslash, or with a `.`/`..` segment. */
112
+ function normalize(relPath) {
113
+ if (typeof relPath !== 'string') return null;
114
+ const trimmed = relPath.replace(/\/+$/, '');
115
+ if (!trimmed || trimmed.startsWith('/') || trimmed.includes('\\')) return null;
116
+ if (trimmed.split('/').some((segment) => segment === '' || segment === '.' || segment === '..')) return null;
117
+ return trimmed;
118
+ }
119
+
120
+ /** The rules for one project. `text` is the content of its `.wdignore`
121
+ * ('' or undefined when it has none).
122
+ *
123
+ * `ignores(relPath, isDirectory)` says whether a path is left out.
124
+ * `relPath` is a POSIX path from the project root, with no leading slash;
125
+ * pass `isDirectory` as true for a folder (a pattern ending in `/` only
126
+ * matches folders). A path inside an ignored folder is ignored. A path
127
+ * that isn't a valid project-relative path is ignored too - the safe
128
+ * answer. Matching ignores letter case, as it does on the file systems
129
+ * most projects are written on.
130
+ *
131
+ * `isLocked(relPath, isDirectory)` says whether LOCKED_PATTERNS is the
132
+ * reason - a path `.wdignore` can't bring back. */
133
+ export function createWdignore(text = '') {
134
+ const own = clean(text);
135
+ const locked = ignore().add(LOCKED_PATTERNS);
136
+ const everywhere = ignore().add(DEFAULT_PATTERNS).add(own);
137
+ const inPublic = ignore().add(own);
138
+
139
+ const target = (relPath, isDirectory) => {
140
+ const normal = normalize(relPath);
141
+ return normal === null ? null : isDirectory ? `${normal}/` : normal;
142
+ };
143
+
144
+ return {
145
+ ignores(relPath, isDirectory = false) {
146
+ const p = target(relPath, isDirectory);
147
+ if (p === null) return true;
148
+ if (locked.ignores(p)) return true;
149
+ const underPublic = p.toLowerCase().startsWith(`${PUBLIC_DIR}/`);
150
+ return (underPublic ? inPublic : everywhere).ignores(p);
151
+ },
152
+ isLocked(relPath, isDirectory = false) {
153
+ const p = target(relPath, isDirectory);
154
+ return p !== null && locked.ignores(p);
155
+ },
156
+ };
157
+ }
158
+
159
+ /** Splits a list of file paths by the rules: `kept` are the files a sync
160
+ * delivers and a build may publish; `ignored` are left out. `buildInputs`
161
+ * are the ignored ones the build still has to receive (BUILD_INPUT_PATHS).
162
+ * Every list keeps the order of `paths`. */
163
+ export function partitionPaths(paths, text = '') {
164
+ const rules = createWdignore(text);
165
+ const inputs = new Set(BUILD_INPUT_PATHS);
166
+ const kept = [];
167
+ const ignored = [];
168
+ const buildInputs = [];
169
+ for (const p of paths) {
170
+ if (!rules.ignores(p)) kept.push(p);
171
+ else {
172
+ ignored.push(p);
173
+ if (inputs.has(p)) buildInputs.push(p);
174
+ }
175
+ }
176
+ return { kept, ignored, buildInputs };
177
+ }
@@ -1,63 +1,63 @@
1
- ---
2
- // Astro's own file-based convention: a static build (`output: 'static'`,
3
- // this package's only supported mode - see astro.config.mjs) emits this
4
- // file's output as a literal `404.html` at the site root, and most static
5
- // hosts (Netlify, Vercel, GitHub Pages, Cloudflare Pages, ...) serve it
6
- // automatically for any unmatched path. No params, no getStaticPaths -
7
- // this is a single fixed route, same category as llms.txt.ts/
8
- // llms-full.txt.ts (see their own comments on Astro auto-prerendering a
9
- // non-dynamic page at its literal path).
10
- import { loadDocsConfig } from '../lib/config';
11
- import BaseLayout from '../layout/BaseLayout.astro';
12
- import { siteHref } from '../lib/site-base';
13
-
14
- const contentDir = process.env.WRITEDOCS_CONTENT_DIR || process.cwd();
15
- const config = loadDocsConfig(contentDir);
16
-
17
- // writedocs.json's `notFound.{title,description}` (notFoundSchema in
18
- // lib/config.ts) - both optional, with the hardcoded fallbacks below, so
19
- // a site gets a reasonably branded 404 page without having to configure
20
- // anything.
21
- const title = config.notFound.title ?? 'Page not found';
22
- const description = config.notFound.description ?? "The page you're looking for doesn't exist or has moved.";
23
- ---
24
- <BaseLayout config={config} title={title} description={description} path="/404/" seo={{ noindex: true }} mode="frame">
25
- <div class="wd-404">
26
- <p class="wd-404-eyebrow">404</p>
27
- <h1>{title}</h1>
28
- <p class="wd-404-description">{description}</p>
29
- <a class="wd-404-home" href={siteHref("/")}>&larr; Back to home</a>
30
- </div>
31
- </BaseLayout>
32
-
33
- <style>
34
- .wd-404 {
35
- max-width: 560px;
36
- margin: 0 auto;
37
- padding: 5rem 1.5rem 6rem;
38
- text-align: center;
39
- }
40
- .wd-404-eyebrow {
41
- margin: 0 0 0.5rem;
42
- font-size: 0.85rem;
43
- font-weight: 600;
44
- letter-spacing: 0.08em;
45
- color: var(--wd-primary);
46
- }
47
- .wd-404 h1 {
48
- margin: 0 0 0.75rem;
49
- font-size: 1.75rem;
50
- }
51
- .wd-404-description {
52
- margin: 0 0 2rem;
53
- color: var(--wd-text-muted);
54
- }
55
- .wd-404-home {
56
- color: var(--wd-primary);
57
- text-decoration: none;
58
- font-weight: 500;
59
- }
60
- .wd-404-home:hover {
61
- text-decoration: underline;
62
- }
63
- </style>
1
+ ---
2
+ // Astro's own file-based convention: a static build (`output: 'static'`,
3
+ // this package's only supported mode - see astro.config.mjs) emits this
4
+ // file's output as a literal `404.html` at the site root, and most static
5
+ // hosts (Netlify, Vercel, GitHub Pages, Cloudflare Pages, ...) serve it
6
+ // automatically for any unmatched path. No params, no getStaticPaths -
7
+ // this is a single fixed route, same category as llms.txt.ts/
8
+ // llms-full.txt.ts (see their own comments on Astro auto-prerendering a
9
+ // non-dynamic page at its literal path).
10
+ import { loadDocsConfig } from '../lib/config';
11
+ import BaseLayout from '../layout/BaseLayout.astro';
12
+ import { siteHref } from '../lib/site-base';
13
+
14
+ const contentDir = process.env.WRITEDOCS_CONTENT_DIR || process.cwd();
15
+ const config = loadDocsConfig(contentDir);
16
+
17
+ // writedocs.json's `notFound.{title,description}` (notFoundSchema in
18
+ // lib/config.ts) - both optional, with the hardcoded fallbacks below, so
19
+ // a site gets a reasonably branded 404 page without having to configure
20
+ // anything.
21
+ const title = config.notFound.title ?? 'Page not found';
22
+ const description = config.notFound.description ?? "The page you're looking for doesn't exist or has moved.";
23
+ ---
24
+ <BaseLayout config={config} title={title} description={description} path="/404/" seo={{ noindex: true }} mode="frame">
25
+ <div class="wd-404">
26
+ <p class="wd-404-eyebrow">404</p>
27
+ <h1>{title}</h1>
28
+ <p class="wd-404-description">{description}</p>
29
+ <a class="wd-404-home" href={siteHref("/")}>&larr; Back to home</a>
30
+ </div>
31
+ </BaseLayout>
32
+
33
+ <style>
34
+ .wd-404 {
35
+ max-width: 560px;
36
+ margin: 0 auto;
37
+ padding: 5rem 1.5rem 6rem;
38
+ text-align: center;
39
+ }
40
+ .wd-404-eyebrow {
41
+ margin: 0 0 0.5rem;
42
+ font-size: 0.85rem;
43
+ font-weight: 600;
44
+ letter-spacing: 0.08em;
45
+ color: var(--wd-primary);
46
+ }
47
+ .wd-404 h1 {
48
+ margin: 0 0 0.75rem;
49
+ font-size: 1.75rem;
50
+ }
51
+ .wd-404-description {
52
+ margin: 0 0 2rem;
53
+ color: var(--wd-text-muted);
54
+ }
55
+ .wd-404-home {
56
+ color: var(--wd-primary);
57
+ text-decoration: none;
58
+ font-weight: 500;
59
+ }
60
+ .wd-404-home:hover {
61
+ text-decoration: underline;
62
+ }
63
+ </style>