This is an automated email from the ASF dual-hosted git repository.
yilinzeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-website.git
The following commit(s) were added to refs/heads/master by this push:
new 46052ba fix: Remove editUrl for older versioned docs (#885)
46052ba is described below
commit 46052ba51e4c0f85861db84a9483cd792b77af29
Author: oil欧呦 <[email protected]>
AuthorDate: Mon Feb 21 14:10:48 2022 +0800
fix: Remove editUrl for older versioned docs (#885)
---
website/docusaurus.config.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index fbf8f48..6b19e96 100644
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -7,8 +7,7 @@ const getEditUrl = ({
docPath,
defaultBranch = "master"
}) => {
- const branch = version === 'current' ? defaultBranch : `release/${version}`;
- return
`https://github.com/apache/${projectName}/edit/${branch}/docs/${locale}/latest/${docPath}`;
+ return version === 'current' ?
`https://github.com/apache/${projectName}/edit/${defaultBranch}/docs/${locale}/latest/${docPath}`
: null;
}
module.exports = {