You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2024/12/09 19:54:00 UTC

(superset) branch master updated: fix(docs): add custom editUrl path for intro page (#31334)

This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 878c7f0267 fix(docs): add custom editUrl path for intro page (#31334)
878c7f0267 is described below

commit 878c7f0267d165d50a45b59fb1cf99c01b65851d
Author: Daniel Grossberg <dw...@gmail.com>
AuthorDate: Mon Dec 9 14:53:54 2024 -0500

    fix(docs): add custom editUrl path for intro page (#31334)
    
    Co-authored-by: Evan Rusackas <ev...@preset.io>
---
 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 7cfd903cac..f27d10e0c6 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'),