Skip to content

Commit 293b9f4

Browse files
V VV V
authored andcommitted
fix: use relative hrefs in docs sidebar for SSG path compatibility
Root-relative hrefs (/app-development) break when SSG is served under a path prefix like /apps/docs/. Relative hrefs (app-development) work correctly regardless of mount point — both /apps/docs/ prefix and subdomain root /.
1 parent ee6c694 commit 293b9f4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/docs/server/state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function toViewModel(state: DocsState, path?: string) {
3636
slug: doc.slug,
3737
title: doc.meta.title || doc.slug,
3838
active: doc.slug === slug,
39-
href: '/' + doc.slug,
39+
href: doc.slug,
4040
}));
4141

4242
return {

0 commit comments

Comments
 (0)