Skip to content

Commit

Permalink
Fix dynamic editUrl path for documentation subfolder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Codexnever committed Oct 5, 2024
1 parent fd93663 commit 00c2cb2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ const config = {
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: './sidebars.js',
// Please change this to your repo.
editUrl:
'https://github.com/open-sauced/intro',
sidebarPath: require.resolve('./sidebars.js'),
path: './docs',
// Dynamic editUrl construction
editUrl: ({ versionDocsDirPath, docPath }) =>
`https://github.com/open-sauced/intro/edit/main/${versionDocsDirPath}/${docPath}`,
routeBasePath: '/',
},
theme: {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 00c2cb2

Please sign in to comment.