Skip to content

Commit 01b871c

Browse files
committed
docs: Fix Source and Page source links
1 parent cd54b98 commit 01b871c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sites/docs/src/routes/docs/+layout.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
import { goto } from '$app/navigation';
3939
import { page } from '$app/stores';
4040
41-
$: [type, name] = $page.url.pathname.split('/').slice(2) ?? [];
41+
$: [packageName, name] = $page.url.pathname.split('/').slice(2) ?? [];
4242
$: title = $page.data.meta?.title ?? name;
43-
$: pageUrl = `src/routes/docs/${type}/${name}/+page.svelte?plain=1`;
44-
$: sourceUrl = `src/lib/${type}/${name}.${type === 'components' ? 'svelte' : 'ts'}`;
43+
$: pageUrl = `${packageName}/${name}/+page.svelte?plain=1`;
44+
$: sourceUrl = `${packageName}/src/lib/${name}.ts`;
4545
$: ({
4646
description,
4747
features,
@@ -101,7 +101,7 @@
101101
<div class="inline-block text-xs font-bold text-surface-content/50 capitalize">Docs</div>
102102
<Icon data={mdiChevronRight} class="divider opacity-25" />
103103
<div class="inline-block text-xs font-bold text-primary capitalize">
104-
{type}
104+
{packageName}
105105
</div>
106106
</div>
107107

@@ -131,7 +131,7 @@
131131
label="Source"
132132
{source}
133133
href={sourceUrl
134-
? `https://github.com/techniq/svelte-ux/blob/main/packages/svelte-ux/${sourceUrl}`
134+
? `https://github.com/techniq/layerstack/blob/main/packages/${sourceUrl}`
135135
: ''}
136136
icon={mdiCodeTags}
137137
/>
@@ -140,7 +140,7 @@
140140
label="Page source"
141141
source={pageSource}
142142
href={pageUrl
143-
? `https://github.com/techniq/svelte-ux/blob/main/packages/svelte-ux/${pageUrl}`
143+
? `https://github.com/techniq/layerstack/blob/main/sites/docs/src/routes/docs/${pageUrl}`
144144
: ''}
145145
icon={mdiFileDocumentEditOutline}
146146
/>

0 commit comments

Comments
 (0)