From 878c7f0267d165d50a45b59fb1cf99c01b65851d Mon Sep 17 00:00:00 2001 From: Daniel Grossberg Date: Mon, 9 Dec 2024 14:53:54 -0500 Subject: [PATCH] fix(docs): add custom editUrl path for intro page (#31334) Co-authored-by: Evan Rusackas --- docs/docusaurus.config.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 7cfd903cac11c..f27d10e0c6c90 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -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'),