You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/09/10 14:37:08 UTC
[skywalking-website] branch master updated: Modify the version alias from `latest` to `Next` (#501)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-website.git
The following commit(s) were added to refs/heads/master by this push:
new c58a0929d2 Modify the version alias from `latest` to `Next` (#501)
c58a0929d2 is described below
commit c58a0929d2848daa9afb6811128db72def1d47cc
Author: Juntao Zhang <71...@qq.com>
AuthorDate: Sat Sep 10 22:37:04 2022 +0800
Modify the version alias from `latest` to `Next` (#501)
---
data/docs.yml | 44 ++++++++++++++++----------------
doc.sh | 2 +-
docs.js | 4 +--
layouts/404.html | 21 ++++++++++-----
themes/docsy/assets/js/algolia-search.js | 2 +-
themes/docsy/layouts/404.html | 12 ++++-----
6 files changed, 47 insertions(+), 38 deletions(-)
diff --git a/data/docs.yml b/data/docs.yml
index d4c18dad6d..a7f32eab62 100644
--- a/data/docs.yml
+++ b/data/docs.yml
@@ -9,9 +9,9 @@
repo: skywalking-showcase
repoUrl: https://github.com/apache/skywalking-showcase.git
docs:
- - version: latest
+ - version: Next
versionName: showcase for v9
- link: /docs/skywalking-showcase/latest/readme/
+ link: /docs/skywalking-showcase/next/readme/
- version: v8
versionName: showcase for v8
link: /docs/skywalking-showcase/v8/readme/
@@ -31,8 +31,8 @@
- login: github-actions[bot]
- login: dependabot[bot]
docs:
- - version: latest
- link: /docs/main/latest/readme/
+ - version: Next
+ link: /docs/main/next/readme/
- version: v9.2.0
link: /docs/main/v9.2.0/readme/
commitId: cb8845a1dd8a0efaa8a6c8e6cb3b7c378729a401
@@ -71,8 +71,8 @@
repo: skywalking-java
repoUrl: https://github.com/apache/skywalking-java.git
docs:
- - version: latest
- link: /docs/skywalking-java/latest/readme/
+ - version: Next
+ link: /docs/skywalking-java/next/readme/
- version: v8.12.0
link: /docs/skywalking-java/v8.12.0/readme/
commitId: 5719d47a612569001a131b9b98a0ed7e6a88a1a9
@@ -96,8 +96,8 @@
repo: skywalking-python
repoUrl: https://github.com/apache/skywalking-python.git
docs:
- - version: latest
- link: /docs/skywalking-python/latest/readme/
+ - version: Next
+ link: /docs/skywalking-python/next/readme/
- version: v0.8.0
link: /docs/skywalking-python/v0.8.0/readme/
commitId: 5c0b30f4f4588262d329676a545e48ed403905ba
@@ -144,7 +144,7 @@
user: apache
repo: skywalking-rust
docs:
- - version: latest
+ - version: Next
link: https://github.com/apache/skywalking-rust
- version: v0.4.0
link: https://github.com/apache/skywalking-rust/tree/v0.4.0
@@ -155,7 +155,7 @@
user: apache
repo: skywalking-php
docs:
- - version: latest
+ - version: Next
link: https://github.com/apache/skywalking-php
- name: SkyWalking Satellite
@@ -165,8 +165,8 @@
repo: skywalking-satellite
repoUrl: https://github.com/apache/skywalking-satellite.git
docs:
- - version: latest
- link: /docs/skywalking-satellite/latest/readme/
+ - version: Next
+ link: /docs/skywalking-satellite/next/readme/
- version: v1.0.0
link: /docs/skywalking-satellite/v1.0.0/readme/
commitId: 7f38043b453a3fbaa2f5873c3330fab7b9755cef
@@ -177,7 +177,7 @@
user: apache
repo: skywalking-kubernetes-event-exporter
docs:
- - version: latest
+ - version: Next
link: https://github.com/apache/skywalking-kubernetes-event-exporter/tree/main#configurations
- name: SkyWalking Rover
@@ -187,8 +187,8 @@
repo: skywalking-rover
repoUrl: https://github.com/apache/skywalking-rover.git
docs:
- - version: latest
- link: /docs/skywalking-rover/latest/readme/
+ - version: Next
+ link: /docs/skywalking-rover/next/readme/
- version: v0.2.0
link: /docs/skywalking-rover/v0.2.0/readme/
commitId: 49529367b9efce580852294603f1f7dac28622a3
@@ -221,8 +221,8 @@
repo: skywalking-swck
repoUrl: https://github.com/apache/skywalking-swck.git
docs:
- - version: latest
- link: /docs/skywalking-swck/latest/readme/
+ - version: Next
+ link: /docs/skywalking-swck/next/readme/
- version: v0.6.1
link: /docs/skywalking-swck/v0.6.1/readme/
commitId: 601785ed05433af8de8c14caf07c4a79ae11116d
@@ -258,8 +258,8 @@
repo: skywalking-banyandb
repoUrl: https://github.com/apache/skywalking-banyandb.git
docs:
- - version: latest
- link: /docs/skywalking-banyandb/latest/readme/
+ - version: Next
+ link: /docs/skywalking-banyandb/next/readme/
- version: v0.1.0
link: /docs/skywalking-banyandb/v0.1.0/readme/
commitId: 73946814b596bba0b979e7b3cad3166b86c54794
@@ -269,7 +269,7 @@
user: apache
repo: skywalking-banyandb-java-client
docs:
- - version: latest
+ - version: Next
link: https://github.com/apache/skywalking-banyandb-java-client/blob/main/README.md
- version: v0.1.0
link: https://github.com/apache/skywalking-banyandb-java-client/blob/v0.1.0/README.md
@@ -299,8 +299,8 @@
repo: skywalking-infra-e2e
repoUrl: https://github.com/apache/skywalking-infra-e2e.git
docs:
- - version: latest
- link: /docs/skywalking-infra-e2e/latest/readme/
+ - version: Next
+ link: /docs/skywalking-infra-e2e/next/readme/
- version: v1.1.0
link: /docs/skywalking-infra-e2e/v1.1.0/readme/
commitId: 996ed8902e941e2883fcf0ac5b3090364942d205
diff --git a/doc.sh b/doc.sh
index 47eb3a3e6f..16c09d37d9 100755
--- a/doc.sh
+++ b/doc.sh
@@ -20,7 +20,7 @@ fi
mkdir ./${repo}
cd ./${repo}
-if [ "$commitId" = "latest" ]; then
+if [ "$commitId" = "Next" ]; then
git clone --depth=1 ${repoUrl} .
else
git init
diff --git a/docs.js b/docs.js
index 03ffc785da..dbc7200f08 100644
--- a/docs.js
+++ b/docs.js
@@ -7,7 +7,7 @@ const {execSync} = require('child_process');
const {promises} = fs;
const docConfig = './data/docs.yml';
const layoutTemplateFile = '/themes/docsy/layouts/projectDoc/baseof.html';
-const LATEST = 'latest';
+const NEXT = 'Next';
init();
@@ -184,7 +184,7 @@ async function traverseDocsList(result) {
execSync(`"./doc.sh" ${repo} ${repoUrl} ${commitId} ${localPath} ${menuFileName}`);
const sha = execSync(`git -C ./tmp/${repo} rev-parse HEAD`);
- if(version === LATEST && sha){
+ if(version === NEXT && sha){
commitId = sha.toString().replace('\n', '');
}
docsInfo.push({localPath, repoUrl, commitId, docName, version})
diff --git a/layouts/404.html b/layouts/404.html
index b78fc7a856..8a45297c90 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,8 +1,17 @@
{{ define "main"}}
- <main id="main">
- <div class="mt-4 text-center">
- <h1 id="title">Not found</h1>
- <p>Oops! This page doesn't exist. Try going back to our <a href="{{ "/" | relURL }}">home page</a>.</p>
- </div>
- </main>
+<main id="main">
+ <div class="mt-4 text-center">
+ <h1 id="title">Not found</h1>
+ <p>Oops! This page doesn't exist. Try going back to our <a href="{{ "/" | relURL }}">home page</a>.</p>
+ </div>
+</main>
+<script>
+ var reg = /\/docs\/[a-zA-Z\-]+\/([\w|\.]+)\//;
+ var res = reg.exec(location.href);
+ var version = res && res[1];
+ if (version === 'latest') {
+ var newUrl = location.href.replace('/latest/', '/next/');
+ window.location.href = newUrl
+ }
+</script>
{{ end }}
diff --git a/themes/docsy/assets/js/algolia-search.js b/themes/docsy/assets/js/algolia-search.js
index 3663c57400..cea008a8a8 100644
--- a/themes/docsy/assets/js/algolia-search.js
+++ b/themes/docsy/assets/js/algolia-search.js
@@ -1,7 +1,7 @@
$(function () {
var reg = /\/docs\/[a-zA-Z\-]+\/([\w|\.]+)\//;
var res = reg.exec(location.href);
- var version = res && res[1] || "latest";
+ var version = res && res[1] || "next";
docsearch({
container: '#docsearch',
diff --git a/themes/docsy/layouts/404.html b/themes/docsy/layouts/404.html
index f648800b5c..906a6645cd 100644
--- a/themes/docsy/layouts/404.html
+++ b/themes/docsy/layouts/404.html
@@ -1,8 +1,8 @@
{{ define "main"}}
- <main id="main">
- <div>
- <h1 id="title">Not found</h1>
- <p>Oops! This page doesn't exist. Try going back to our <a href="{{ "/" | relURL }}">home page</a>.</p>
- </div>
- </main>
+<main id="main">
+ <div>
+ <h1 id="title">Not found</h1>
+ <p>Oops! This page doesn't exist. Try going back to our <a href="{{ "/" | relURL }}">home page</a>.</p>
+ </div>
+</main>
{{ end }}