Skip to content

Commit 6a6c723

Browse files
Update docs examples to use placeholder links
Remove the prerender handleHttpError guard that silenced 404s for example links in the docs site.
1 parent e0613e8 commit 6a6c723

File tree

3 files changed

+14
-24
lines changed

3 files changed

+14
-24
lines changed

apps/docs/src/routes/docs/layout/dashboard/+page.svelte

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
code={`<body data-layout="dashboard">
1818
<header>
1919
<nav>
20-
<a href="/"><strong>App Name</strong></a>
20+
<a href="#"><strong>App Name</strong></a>
2121
<ul>
22-
<li><a href="/dashboard">Dashboard</a></li>
23-
<li><a href="/settings">Settings</a></li>
22+
<li><a href="#">Dashboard</a></li>
23+
<li><a href="#">Settings</a></li>
2424
</ul>
2525
</nav>
2626
</header>
@@ -50,11 +50,11 @@
5050
<CodePreview
5151
code={`<header>
5252
<nav>
53-
<a href="/"><strong>Admin Panel</strong></a>
53+
<a href="#"><strong>Admin Panel</strong></a>
5454
<ul>
55-
<li><a href="/users">Users</a></li>
56-
<li><a href="/analytics">Analytics</a></li>
57-
<li><a href="/settings">Settings</a></li>
55+
<li><a href="#">Users</a></li>
56+
<li><a href="#">Analytics</a></li>
57+
<li><a href="#">Settings</a></li>
5858
</ul>
5959
</nav>
6060
</header>`}

apps/docs/src/routes/docs/layout/website/+page.svelte

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
code={`<body data-layout="website">
2020
<header>
2121
<nav>
22-
<a href="/"><strong>Brand</strong></a>
22+
<a href="#"><strong>Brand</strong></a>
2323
<ul>
24-
<li><a href="/about">About</a></li>
25-
<li><a href="/contact">Contact</a></li>
24+
<li><a href="#">About</a></li>
25+
<li><a href="#">Contact</a></li>
2626
</ul>
2727
</nav>
2828
</header>
@@ -44,11 +44,11 @@
4444
<CodePreview
4545
code={`<header>
4646
<nav>
47-
<a href="/"><strong>My Site</strong></a>
47+
<a href="#"><strong>My Site</strong></a>
4848
<ul>
49-
<li><a href="/features">Features</a></li>
50-
<li><a href="/pricing">Pricing</a></li>
51-
<li><a href="/docs">Docs</a></li>
49+
<li><a href="#">Features</a></li>
50+
<li><a href="#">Pricing</a></li>
51+
<li><a href="#">Docs</a></li>
5252
</ul>
5353
</nav>
5454
</header>`}

apps/docs/svelte.config.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@ const config = {
1010
precompress: false,
1111
strict: true,
1212
}),
13-
prerender: {
14-
handleHttpError: ({ path, referrer, message }) => {
15-
// Ignore 404s for example links in documentation
16-
if (referrer && referrer.includes("/docs/")) {
17-
console.warn(`Ignoring 404 for example link: ${path}`);
18-
return;
19-
}
20-
throw new Error(message);
21-
},
22-
},
2313
},
2414
};
2515

0 commit comments

Comments
 (0)