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 bcc276e fix: build script optimize
bcc276e is described below
commit bcc276e3f4e361d6e3bcf29fcb842d259709c100
Author: Li Li <[email protected]>
AuthorDate: Fri Apr 1 14:53:34 2022 +0800
fix: build script optimize
Signed-off-by: Li Li <[email protected]>
---
site2/website-next/docusaurus.config.js | 29 +++++++++++++----------
site2/website-next/scripts/split-version-build.sh | 4 ++--
2 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/site2/website-next/docusaurus.config.js
b/site2/website-next/docusaurus.config.js
index b1e0f42..249ea0c 100644
--- a/site2/website-next/docusaurus.config.js
+++ b/site2/website-next/docusaurus.config.js
@@ -20,7 +20,12 @@ const versionsMap = {
},
};
-const buildVersions = require("./.build-versions.json");
+let buildVersions = ["current"];
+try {
+ buildVersions = require("./.build-versions.json");
+} catch (error) {
+ //do nothing
+}
const oldUrl = "https://pulsar.apache.org";
const url = "https://pulsar.apache.org";
@@ -175,37 +180,37 @@ module.exports = {
type: "dropdown",
label: "Community",
position: "right",
- className: 'community-dropdown',
+ className: "community-dropdown",
items: [
{
to: "/community#section-welcome",
label: "Welcome",
- className: 'scroll-link scroll-welcome',
- id: 'scroll-welcome'
+ className: "scroll-link scroll-welcome",
+ id: "scroll-welcome",
},
{
to: "/community#section-discussions",
label: "Discussions",
- className: 'scroll-link scroll-discussions',
- id: 'scroll-discussions'
+ className: "scroll-link scroll-discussions",
+ id: "scroll-discussions",
},
{
to: "/community#section-governance",
label: "Governance",
- className: 'scroll-link',
- id: 'scroll-governance'
+ className: "scroll-link",
+ id: "scroll-governance",
},
{
to: "/community#section-community",
label: "Meet the Community",
- className: 'scroll-link',
- id: 'scroll-community'
+ className: "scroll-link",
+ id: "scroll-community",
},
{
to: "/community#section-contribute",
label: "Contribute",
- className: 'scroll-link',
- id: 'scroll-contribute'
+ className: "scroll-link",
+ id: "scroll-contribute",
},
{
to: "https://github.com/apache/pulsar/wiki",
diff --git a/site2/website-next/scripts/split-version-build.sh
b/site2/website-next/scripts/split-version-build.sh
index e3e1978..14c2c1f 100755
--- a/site2/website-next/scripts/split-version-build.sh
+++ b/site2/website-next/scripts/split-version-build.sh
@@ -60,12 +60,12 @@ done <scripts/.versions
while read version; do
if [ -d "build-$version" ]; then
- mv build-$version/* build/docs
+ mv -r build-$version/* build/docs
rm -rf build-$version
for language in ${locals[@]}; do
if [ -d "build-$language-$version" ]; then
- mv build-$language-$version/* build/$language/docs
+ mv -r build-$language-$version/* build/$language/docs
rm -rf build-$language-$version
fi
done