Skip to content

Commit

Permalink
fix(vitepress): correctly handle base sidebar paths in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Jan 7, 2025
1 parent 51245fd commit 53a52e5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 0 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"@devtools/*",
"typedoc-github-wiki-theme",
"typedoc-gitlab-wiki-theme",
"typedoc-vitepress-theme",
"typedoc-plugin-frontmatter"
]
}
5 changes: 5 additions & 0 deletions .changeset/rude-readers-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'typedoc-vitepress-theme': patch
---

- Correctly handle base sidebar paths in windows (#756).
2 changes: 1 addition & 1 deletion packages/typedoc-vitepress-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"test:update": "npm run build && npm test -- -u"
},
"peerDependencies": {
"typedoc-plugin-markdown": ">=4.4.1"
"typedoc-plugin-markdown": ">=4.4.0"
},
"license": "MIT",
"keywords": [
Expand Down
5 changes: 3 additions & 2 deletions packages/typedoc-vitepress-theme/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ export function load(app: MarkdownApplication) {
if (sidebarOptions.autoConfiguration && output.navigation) {
const outDir = app.options.getValue('out');
const sidebarPath = path.resolve(outDir, 'typedoc-sidebar.json');
const basePath = path.relative(app.options.getValue('docsRoot'), outDir);

const basePath = path
.relative(app.options.getValue('docsRoot'), outDir)
.replace(/\\/g, '/');
const sidebarJson = getSidebar(
output.navigation,
basePath,
Expand Down

0 comments on commit 53a52e5

Please sign in to comment.