cache image on ci deploy

pull/2/head
Septs 2022-12-02 14:37:36 +08:00
parent 683aa04858
commit 90b143509a
No known key found for this signature in database
GPG Key ID: 65144037AFA516E1
4 changed files with 13 additions and 2 deletions

View File

@ -63,3 +63,7 @@ languages:
contentDir: content.zh-hk
languageName: 香港繁體
weight: 3
security:
funcs:
getenv: ['^HUGO_', CI]

View File

@ -9,7 +9,6 @@ description: 欢迎来到 MtF.wiki 附属的“女性倾向跨性别者科学”
为便于翻阅、减少翻译工作量,本站译者会从上百篇原文当中精心挑选一部分进行翻译;同时,边翻译边学习,促进 MtF.wiki 内容的完善。因此,本站内容可视作对 MtF.wiki 药物板块的先行或拓展参考。\
由于原文内容随时会修订,而本站译者不一定有时间与精力实时跟进;因此,译文修订间隔暂定为 3 - 12 个月。如有不便,敬请谅解。
本站图片引用自 *Transfeminine Science* 原站与维基百科,可能加载较慢以至不加载。\
可见“[关于]({{< ref "about" >}})”一页以了解更多详情。
> 本站除簡體中文外,還提供繁體中文版本,以便港澳台用戶閱覽;需要注意,此版本從簡體中文底稿自動轉換而來,或與港澳台地區語言習慣不符。

View File

@ -1,3 +1,11 @@
{{- $destination := .Destination -}}
{{- if eq (getenv "CI") "true" -}}
{{- if hasPrefix $destination "http" -}}
{{- with resources.GetRemote $destination -}}
{{- $destination = .Permalink -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if .Title }}
<div class="card">
<div class="card-image"><figure class="image"><img src="{{ .Destination | safeURL }}" alt="{{ .Text }}"></figure></div>

View File

@ -11,6 +11,6 @@
{{- with .Params.twitter | default .Site.Social.twitter }}
<meta name="twitter:creator" content="{{ . }}">
{{- end }}
{{- with resources.GetMatch "favicon**" | fingerprint }}
{{- with resources.GetMatch "favicon**" }}
<meta name="twitter:image" content="{{ .Permalink }}">
{{- end }}