* perf: community code

* update doc
This commit is contained in:
Archer
2024-10-14 14:36:28 +08:00
committed by GitHub
parent bc70428d89
commit 3f01cc9c63
8 changed files with 17 additions and 6 deletions

View File

@@ -3,7 +3,7 @@
{{ $.Scratch.Set "pathName" (printf "%s" (.Site.Params.docs.pathName | default "docs")) }}
<!-- social_list -->
<!-- change -->
{{ $social_params := slice "github" "twitter" "instagram" "rss" "wechat" }}
{{ $social_params := slice "github" "twitter" "instagram" "rss" "wechat" "lark" }}
{{ range $social_params }}
{{ if isset site.Params.social . }}
{{ $.Scratch.Add "social_list" (slice .) }}

View File

@@ -52,7 +52,12 @@
{{ $path := printf "images/social/%s.%s" . "svg" }}
<li class="list-inline-item mb-0">
<!-- change -->
<a href="{{ if eq . `rss` }} {{ `index.xml` | absURL }} {{ else if eq . `wechat` }} {{ index site.Params.social . | absURL }} {{ else }} https://{{ . }}.com/{{ index site.Params.social . }} {{ end }}" alt="{{ . }}" rel="noopener noreferrer" target="_blank">
<a href="{{ if eq . `rss` }} {{ `index.xml` | absURL }}
{{ else if eq . `wechat` }} {{ index site.Params.social . | absURL }}
{{ else if eq . `lark` }} {{ index site.Params.social . | absURL }}
{{ else }} https://{{ . }}.com/{{ index site.Params.social . }}
{{ end }}"
alt="{{ . }}" rel="noopener noreferrer" target="_blank">
<div class="btn btn-icon btn-default border-0">
{{ with resources.Get $path }}
{{ .Content | safeHTML }}