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 f6edf01c49e Add edit this page and update committer list (#702)
f6edf01c49e is described below

commit f6edf01c49e1f0e19ea040fd55536e03b6bfd423
Author: Starry <[email protected]>
AuthorDate: Sun Apr 21 09:07:55 2024 +0800

    Add edit this page and update committer list (#702)
---
 content/team/_index.md                            | 27 ++++++------
 themes/docsy/layouts/partials/edit-this-page.html | 51 +++++++++++++++++++++++
 themes/docsy/layouts/projectDoc/content.html      | 27 +-----------
 themes/docsy/layouts/projectDoc/single.html       |  1 +
 4 files changed, 67 insertions(+), 39 deletions(-)

diff --git a/content/team/_index.md b/content/team/_index.md
index f37a7e510e0..54b0a783379 100644
--- a/content/team/_index.md
+++ b/content/team/_index.md
@@ -96,19 +96,20 @@ The SkyWalking team is comprised of Members and 
Contributors, and the growth has
 </div>
 <div class="table-box">
 
-| Name              | Apache ID   |                                            
      |
-| ----------------- | ----------- | 
------------------------------------------------ |
-| Ruixian Wang      | ax1an       | <i class="iconfont icon-twitter"></i> 
[Ax1anRISE](https://twitter.com/Ax1anRISE)       |
-| Sheng Wang        | wangsheng   |                                            
      |
-| Tomasz Pytel      | tompytel    |                                            
      |
-| Wei Hua           | alonelaval  |                                            
      |
-| Wei Jin           | kvn         |                                            
      |
-| Weijie Zou        | kdump       | <i class="iconfont icon-twitter"></i> 
[RootShellExp](https://twitter.com/RootShellExp) |
-| Weiyi Liu         | wayilau     |                                            
      |
-| Xiang Wei         | weixiang1862|                                            
      |
-| Yueqin Zhang      | yswdqz      |                                            
      |
-| Yuntao Li         | liyuntao    |                                            
      |
-| Zhusheng Xu       | aderm       |                                            
      |
+| Name         | Apache ID    |                                                
                                          |
+|--------------|--------------|------------------------------------------------------------------------------------------|
+| Ruixian Wang | ax1an        | <i class="iconfont icon-twitter"></i> 
[Ax1anRISE](https://twitter.com/Ax1anRISE)         |
+| Sheng Wang   | wangsheng    |                                                
                                          |
+| Tomasz Pytel | tompytel     |                                                
                                          |
+| Wei Hua      | alonelaval   |                                                
                                          |
+| Wei Jin      | kvn          |                                                
                                          |
+| Weijie Zou   | kdump        | <i class="iconfont icon-twitter"></i> 
[RootShellExp](https://twitter.com/RootShellExp)   |
+| Weiyi Liu    | wayilau      |                                                
                                          |
+| Xiang Wei    | weixiang1862 |                                                
                                          |
+| Yueqin Zhang | yswdqz       |                                                
                                          |
+| Yuntao Li    | liyuntao     |                                                
                                          |
+| Zhusheng Xu  | aderm        |                                                
                                          |
+| Zixin Zhou   | zhouzixin    | <i class="iconfont icon-twitter"></i> 
[starry_loveee](https://twitter.com/starry_loveee) |
 
 </div>
 </div>
diff --git a/themes/docsy/layouts/partials/edit-this-page.html 
b/themes/docsy/layouts/partials/edit-this-page.html
new file mode 100644
index 00000000000..7d1e52290b1
--- /dev/null
+++ b/themes/docsy/layouts/partials/edit-this-page.html
@@ -0,0 +1,51 @@
+<div>
+  {{ $File := .File }}
+  {{ $Site := .Site }}
+  {{ with $File.Path }}
+  <div id="edit-github">
+    <svg
+      fill="currentColor"
+      height="20"
+      width="20"
+      viewBox="0 0 40 40"
+      aria-hidden="true"
+      style="margin-right: 0.1em;vertical-align: sub; color: #3176d9">
+      <g>
+        <path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 
3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 
18.4h-6.3v-6.2z" />
+      </g>
+    </svg>
+    <a class="github-link" title="Edit this page" href="" target="_blank">
+      <span id="edit-github-text">Edit this page</span>
+    </a>
+  </div>
+  {{ end }}
+</div>
+<script>
+  let reg = /\/docs\/[a-zA-Z\-]+\/([\w|\.]+)\//;
+  let res = reg.exec(location.href);
+  let version = res && res[1];
+  let editGithub = document.getElementById("edit-github");
+  if (editGithub) {
+    editGithub.style.display = version === "next" ? "block" : "none";
+  }
+  
+  if (version === "next") {
+    reg = /\/docs\/(.+?)\//;
+    let repoRes = reg.exec(location.href);
+    let repo = repoRes && repoRes[1];
+    if (repo === "main") {
+      repo = "skywalking"
+    }
+    reg = /\/next\/(.+)/;
+    let docs = reg.exec(location.href);
+    let docsUrl = docs && docs[1];
+    if (docsUrl) {
+      docsUrl = docsUrl.replace(/readme/i, 'README');
+    }
+    let prefixUrl = "https://github.com/apache/"; + repo + "/blob/master/docs/";
+    let editGithubLink = document.querySelector("#edit-github a");
+    if (editGithubLink) {
+      editGithubLink.href = prefixUrl + docsUrl.replace(/\/$/, ".md");
+    }
+  }
+</script>
\ No newline at end of file
diff --git a/themes/docsy/layouts/projectDoc/content.html 
b/themes/docsy/layouts/projectDoc/content.html
index e86a00e962c..14fdc3559ca 100644
--- a/themes/docsy/layouts/projectDoc/content.html
+++ b/themes/docsy/layouts/projectDoc/content.html
@@ -1,28 +1,3 @@
 <div class="td-content">
-<!--   <h1>{{ .Title }}</h1>-->
-<!--   {{ with .Params.description }}<div class="lead">{{ . | markdownify 
}}</div>{{ end }}-->
-<!--   <div class="td-byline mb-4">-->
-<!--           {{ with .Params.author }}{{ T "post_byline_by" }} <b>{{ . | 
markdownify }}</b> |{{ end}}-->
-<!--           <time datetime="{{  $.Date.Format "2006-01-02" }}" 
class="text-muted">{{ $.Date.Format $.Site.Params.time_format_blog  }}</time>-->
-
-
-<!--           {{ with .Params.tags }}-->
-<!--           <p class="mt-1 tags-box">-->
-<!--                   <i class="fas fa-tags" aria-hidden="true"></i>Tags |-->
-<!--                   {{ range . }}-->
-<!--                   <span> <a href="{{ "tags" | absURL }}/{{ . | urlize 
}}">{{ . }}</a></span>-->
-<!--                   {{ end }}-->
-<!--           </p>-->
-<!--           {{ end }}-->
-
-
-<!--   </div>-->
        {{ .Content }}
-<!--   {{ if (.Site.DisqusShortname) }}-->
-<!--           <br />-->
-<!--           {{ partial "disqus-comment.html" . }}-->
-<!--           <br />-->
-<!--   {{ end }}-->
-
-<!--   {{ partial "pager.html" . }}-->
-</div>
+</div>
\ No newline at end of file
diff --git a/themes/docsy/layouts/projectDoc/single.html 
b/themes/docsy/layouts/projectDoc/single.html
index 00cb3ab911b..b3f6f16ef9b 100644
--- a/themes/docsy/layouts/projectDoc/single.html
+++ b/themes/docsy/layouts/projectDoc/single.html
@@ -1,3 +1,4 @@
 {{ define "main" }}
 {{ .Render "content" }}
+{{ partial "edit-this-page.html" . }}
 {{ end }}
\ No newline at end of file

Reply via email to