Skip to content

Commit 7294dc1

Browse files
chilleniousclaude
andcommitted
Fix docs site links to use custom domain paths
- Remove hardcoded GitHub Pages URLs from examples links - Update docs site base path to support custom domain - Change mockup browser URL display to show custom domain - Links now use relative paths that work with both local dev and custom domain Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5a9a937 commit 7294dc1

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

packages/docs-site/src/lib/components/SiteHeader.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
// Note: docs-site is prerendered; avoid creating an internal prerender-crawled link to /examples
66
// (that path is served by a separate app, merged into the final Pages artifact).
7-
const examplesHref = dev ? `${base}/examples/` : 'https://pie-framework.github.io/pie-qti/examples/';
7+
const examplesHref = `${base}/examples/`;
88
</script>
99

1010
<header class="border-b border-base-200 bg-base-100/80 backdrop-blur">

packages/docs-site/src/routes/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
// Note: docs-site is prerendered; avoid creating an internal prerender-crawled link to /examples
66
// (that path is served by a separate app, merged into the final Pages artifact).
7-
const examplesHref = dev ? `${base}/examples/` : 'https://pie-framework.github.io/pie-qti/examples/';
7+
const examplesHref = `${base}/examples/`;
88
</script>
99

1010
<svelte:head>
@@ -72,7 +72,7 @@
7272
<div class="card-body">
7373
<div class="mockup-browser border border-base-300 bg-base-200">
7474
<div class="mockup-browser-toolbar">
75-
<div class="input border border-base-300 bg-base-100">pie-framework.github.io/pie-qti/examples</div>
75+
<div class="input border border-base-300 bg-base-100">qti.pie-framework.org/examples</div>
7676
</div>
7777
<div class="bg-base-100 p-3">
7878
<img

packages/docs-site/svelte.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ const config = {
1414
strict: false
1515
}),
1616
paths: {
17-
base: process.env.NODE_ENV === 'production' ? '/pie-qti' : ''
17+
// No base path needed for custom domain (qti.pie-framework.org)
18+
// Use GITHUB_PAGES_SUBPATH env var if deploying to GitHub Pages URL
19+
base: process.env.GITHUB_PAGES_SUBPATH === 'true' && process.env.NODE_ENV === 'production'
20+
? '/pie-qti'
21+
: ''
1822
},
1923
prerender: {
2024
entries: ['*'],

0 commit comments

Comments
 (0)