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/04/18 15:41:34 UTC
[skywalking-website] branch master updated: Support an alias for the document version (#432)
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 c613f1c9bc Support an alias for the document version (#432)
c613f1c9bc is described below
commit c613f1c9bcf5d5cf770ddd20ef1882ec484ead54
Author: Juntao Zhang <71...@qq.com>
AuthorDate: Mon Apr 18 23:41:31 2022 +0800
Support an alias for the document version (#432)
---
assets/scss/_custom_docs.scss | 10 ++++++++--
data/docs.yml | 2 ++
docs.js | 11 +++++++++--
themes/docsy/layouts/docs/baseof.html | 14 +++++++++++---
4 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/assets/scss/_custom_docs.scss b/assets/scss/_custom_docs.scss
index a6844eb453..c349e750c9 100644
--- a/assets/scss/_custom_docs.scss
+++ b/assets/scss/_custom_docs.scss
@@ -43,7 +43,7 @@
}
}
- .container-archived{
+ .container-archived {
padding: 0 1.25rem;
}
@@ -67,6 +67,12 @@
}
}
+ .SkyWalkingShowcase {
+ .dropdown-menu {
+ min-width: 10rem !important;
+ }
+ }
+
#Ecosystem {
padding-bottom: 0.4rem;
}
@@ -181,7 +187,7 @@
.dropdown-toggle::after {
margin-bottom: -1px;
- }
+ }
.btn:not(:disabled):not(.disabled):active:focus, .btn.active:not(:disabled):not(.disabled):focus {
box-shadow: none;
diff --git a/data/docs.yml b/data/docs.yml
index 21c6dcc4de..1ec70f8180 100644
--- a/data/docs.yml
+++ b/data/docs.yml
@@ -10,8 +10,10 @@
repoUrl: https://github.com/apache/skywalking-showcase.git
docs:
- version: latest
+ versionName: showcase for v9
link: /docs/skywalking-showcase/latest/readme/
- version: v8
+ versionName: showcase for v8
link: /docs/skywalking-showcase/v8/readme/
commitId: 0641591aa102da68a895c50de6b9c71d17c68729
diff --git a/docs.js b/docs.js
index 0f6d0d6426..f0070ff898 100644
--- a/docs.js
+++ b/docs.js
@@ -158,8 +158,15 @@ async function traverseDocsList(result) {
<h5>Documentation:
<select class="version-select">
{{range .Site.Data.docSidebar.${menuFileName}.repoDocs}}
- {{$version := .version}}
- <option {{ cond (eq $currentVersion $version) "selected" "" }} value="{{$version}}">{{$version}}</option>
+ {{$version := .version}}
+ {{$versionName := .versionName}}
+ <option {{ cond (eq $currentVersion $version) "selected" "" }} value="{{$version}}">
+ {{if $versionName}}
+ {{$versionName}}
+ {{else}}
+ {{$version}}
+ {{end}}
+ </option>
{{end}}
</select>
</h5>
diff --git a/themes/docsy/layouts/docs/baseof.html b/themes/docsy/layouts/docs/baseof.html
index ebdb21fcef..59719afe40 100644
--- a/themes/docsy/layouts/docs/baseof.html
+++ b/themes/docsy/layouts/docs/baseof.html
@@ -52,7 +52,7 @@
</div>
</div>
{{else}}
- <div class="card item">
+ <div class="card item {{$id}}">
<div class="card-body">
{{if .icon}}
<img width="36" height="36" src="/images/project/{{.icon}}.svg" alt="{{.icon}}">
@@ -65,7 +65,7 @@
</a>
</div>
<p>{{.description}}</p>
- </div>
+ </div>
<div class="doc-box">
<iframe src="https://ghbtns.com/github-btn.html?user={{.user}}&repo={{.repo}}&type=star&count=true&size=large" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe>
{{if .docs}}
@@ -76,7 +76,15 @@
<div class="dropdown-menu scroll-bar">
<div>
{{range .docs}}
- <a class="dropdown-item" target="_blank" href="{{.link}}">{{.version}}</a>
+ {{$version := .version}}
+ {{$versionName := .versionName}}
+ <a class="dropdown-item" target="_blank" href="{{.link}}">
+ {{if .versionName}}
+ {{.versionName}}
+ {{else}}
+ {{.version}}
+ {{end}}
+ </a>
{{end}}
</div>
</div>