fix(docs): add custom editUrl path for intro page (#31334)

Co-authored-by: Evan Rusackas <evan@preset.io>
This commit is contained in:
Daniel Grossberg 2024-12-09 14:53:54 -05:00 committed by GitHub
parent cb78c778dd
commit 878c7f0267
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 3 deletions

View File

@ -203,13 +203,18 @@ const config = {
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/apache/superset/edit/master/docs',
editUrl:
({versionDocsDirPath, docPath}) => {
if (docPath === 'intro.md') {
return 'https://github.com/apache/superset/edit/master/README.md'
}
return `https://github.com/apache/superset/edit/master/docs/${versionDocsDirPath}/${docPath}`
}
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
'https://github.com/facebook/docusaurus/edit/main/website/blog/',
editUrl: 'https://github.com/facebook/docusaurus/edit/main/website/blog/',
},
theme: {
customCss: require.resolve('./src/styles/custom.css'),