Skip to content

Commit 8916859

Browse files
authored
fix: dynamic editUrl path for documentation subfolder structure (#247)
* Fix dynamic `editUrl` path for documentation subfolder structure * Update sidebar path * Update sidebar path * Update package-lock.json
1 parent fd93663 commit 8916859

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docusaurus.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ const config = {
4040
'classic',
4141
/** @type {import('@docusaurus/preset-classic').Options} */
4242
({
43-
docs: {
43+
docs: {
4444
sidebarPath: './sidebars.js',
45-
// Please change this to your repo.
46-
editUrl:
47-
'https://github.com/open-sauced/intro',
45+
// Dynamic editUrl construction
46+
editUrl: ({ versionDocsDirPath, docPath }) =>
47+
`https://github.com/open-sauced/intro/edit/main/${versionDocsDirPath}/${docPath}`,
4848
routeBasePath: '/',
4949
},
5050
theme: {

0 commit comments

Comments
 (0)