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 be04cc9 feat: replace docs link and client api link be04cc9 is described below commit be04cc9c03221e93baa7f9dd419ad0e9b8c9b264 Author: LiLi <urf...@apache.org> AuthorDate: Tue Mar 15 10:27:15 2022 +0800 feat: replace docs link and client api link Signed-off-by: LiLi <urf...@apache.org> --- site2/website-next/docusaurus.config.js | 19 +++++++++--------- site2/website-next/scripts/replace.js | 35 +++++++++++++++++---------------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/site2/website-next/docusaurus.config.js b/site2/website-next/docusaurus.config.js index aa9099c..4a3f51f 100644 --- a/site2/website-next/docusaurus.config.js +++ b/site2/website-next/docusaurus.config.js @@ -109,7 +109,7 @@ module.exports = { }, themeConfig: { colorMode: { - disableSwitch: false + disableSwitch: false, }, navbar: { title: "", @@ -140,8 +140,9 @@ module.exports = { ], }, { - type: "doc", - docId: "about", + // type: "doc", + // docId: "about", + to: "/docs/next/about", position: "right", label: "Docs", }, @@ -256,11 +257,11 @@ module.exports = { position: "right", }, { - to: '/download', - label: 'Download', - position: 'right', - className: 'download-btn pill-btn', - } + to: "/download", + label: "Download", + position: "right", + className: "download-btn pill-btn", + }, ], }, footer: { @@ -337,7 +338,7 @@ module.exports = { }, }, stylesheets: [ - 'https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@300;400;600,900&display=swap' + "https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@300;400;600,900&display=swap", ], presets: [ [ diff --git a/site2/website-next/scripts/replace.js b/site2/website-next/scripts/replace.js index 8bfd17d..ca225df 100644 --- a/site2/website-next/scripts/replace.js +++ b/site2/website-next/scripts/replace.js @@ -88,23 +88,24 @@ function debDistUrl(version, type) { } function clientVersionUrl(version, type) { - var versions = version.split("."); - var majorVersion = parseInt(versions[0]); - var minorVersion = parseInt(versions[1]); - if (majorVersion === 2 && minorVersion < 5) { - return `${siteConfig.url}/api/` + type + `/` + version + "/"; - } else if (majorVersion >= 2 && minorVersion >= 5) { - return ( - `${siteConfig.url}/api/` + - type + - `/` + - majorVersion + - `.` + - minorVersion + - `.0` + - `-SNAPSHOT/` - ); - } + return `${siteConfig.url}/api/${type}`; + // var versions = version.split("."); + // var majorVersion = parseInt(versions[0]); + // var minorVersion = parseInt(versions[1]); + // if (majorVersion === 2 && minorVersion < 5) { + // return `${siteConfig.url}/api/` + type + `/` + version + "/"; + // } else if (majorVersion >= 2 && minorVersion >= 5) { + // return ( + // `${siteConfig.url}/api/` + + // type + + // `/` + + // majorVersion + + // `.` + + // minorVersion + + // `.0` + + // `-SNAPSHOT/` + // ); + // } } function doReplace(options) {