This is an automated email from the ASF dual-hosted git repository.
mmarshall 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 2d2d54fe8c1 Fix replace script for clientVersionUrls (#144)
2d2d54fe8c1 is described below
commit 2d2d54fe8c13aff24fa8b91ba16c532945518887
Author: Michael Marshall <[email protected]>
AuthorDate: Sat Jul 9 11:43:27 2022 -0500
Fix replace script for clientVersionUrls (#144)
In https://github.com/apache/pulsar-site/pull/138, I forgot to add the `(`
to the replaced string. Without the right paren, the links were rendering
incorrectly on the website. This PR fixes those links.
---
site2/website-next/scripts/replace.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/site2/website-next/scripts/replace.js
b/site2/website-next/scripts/replace.js
index 7eac124e82b..93b6e7aac3e 100644
--- a/site2/website-next/scripts/replace.js
+++ b/site2/website-next/scripts/replace.js
@@ -95,9 +95,9 @@ function clientVersionUrl(version, type) {
var majorVersion = parseInt(versions[0])
var minorVersion = parseInt(versions[1])
if ((majorVersion === 2 && minorVersion < 5) || (type === "python" &&
minorVersion >= 7)) {
- return `${siteConfig.url}/api/${type}/${version}`;
+ 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}/${majorVersion}.${minorVersion}.0-SNAPSHOT`
}
}