Skip to content

Commit

Permalink
segment
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyunhe committed Feb 11, 2024
1 parent f3faba5 commit 89597c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/build/setupDoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ export async function setupDoc(config: Config, watch?: boolean) {
`,
);

const pathSegmentsToKeep = config.doc.basename
.split('/')
.filter(Boolean).length;
await fs.outputFile(
join(process.cwd(), '.rive', 'public', '404.html'),
`
Expand Down Expand Up @@ -85,7 +88,7 @@ export async function setupDoc(config: Config, watch?: boolean) {
// https://username.github.io/repo-name/one/two?a=b&c=d#qwe becomes
// https://username.github.io/repo-name/?/one/two&a=b~and~c=d#qwe
// Otherwise, leave pathSegmentsToKeep as 0.
var pathSegmentsToKeep = 0;
var pathSegmentsToKeep = ${pathSegmentsToKeep};
var l = window.location;
l.replace(
Expand Down

0 comments on commit 89597c9

Please sign in to comment.