You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ur...@apache.org on 2022/04/22 09:45:55 UTC

[pulsar-site] branch main updated: fix: edit url fix

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

urfree pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


The following commit(s) were added to refs/heads/main by this push:
     new 9b19b03475 fix: edit url fix
9b19b03475 is described below

commit 9b19b034753cbe0f92ade23e0b8f08f6804b7e88
Author: Li Li <ur...@apache.org>
AuthorDate: Fri Apr 22 17:45:33 2022 +0800

    fix: edit url fix
    
    Signed-off-by: Li Li <ur...@apache.org>
---
 site2/website-next/docusaurus.config.js | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/site2/website-next/docusaurus.config.js b/site2/website-next/docusaurus.config.js
index 7a07d93660..29811e7181 100644
--- a/site2/website-next/docusaurus.config.js
+++ b/site2/website-next/docusaurus.config.js
@@ -346,7 +346,16 @@ module.exports = {
         docs: {
           path: "docs",
           sidebarPath: require.resolve("./sidebars.js"),
-          editUrl: `${githubUrl}/edit/master/site2`,
+          // editUrl: `${githubUrl}/edit/master/site2`,
+          editUrl: ({
+            version,
+            versionDocsDirPath,
+            docPath,
+            permalink,
+            locale,
+          }) => {
+            return `${githubUrl}/edit/master/site2/docs/${docPath}`;
+          },
           remarkPlugins: [
             linkifyRegex(
               /{\@inject\:\s?(((?!endpoint)[^}])+):([^}]+):([^}]+)}/,
@@ -362,7 +371,7 @@ module.exports = {
         },
         blog: {
           showReadingTime: true,
-          editUrl: `${githubUrl}/edit/master/site2/website-next`,
+          editUrl: `${githubUrl}/edit/master/site2/website`,
         },
         theme: {
           customCss: require.resolve("./src/css/custom.css"),