Skip to content

Commit 6a7dd3e

Browse files
committed
fix: main page in case it was created from exception
1 parent 59a2937 commit 6a7dd3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/site-transforms.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ export const useKiwixLandingPage = async (
322322
}
323323

324324
// Fixup relative paths, if needed
325-
const depth = (options.kiwixMainPage.match(/\//g) || []).length
325+
const depth = (kiwixMainPageSrc.substring(wikiFolder.length + 1).match(/\//g) || []).length
326326
if (depth) {
327327
const fixRelativeLinksUp = (filePath: string, depth: number) => {
328328
const fileBytes = readFileSync(filePath)

0 commit comments

Comments
 (0)