From 1cfabbe8bcf5dc7c63a86bd83a577f947f49ec51 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Tue, 5 Dec 2023 11:00:54 +0800 Subject: [PATCH] :truck: Feat: the `type: friends` in front matter is deprecated. use `layout: friends` instead --- layouts/friends/single.html | 3 +++ layouts/page/friends.html | 38 +++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 layouts/page/friends.html diff --git a/layouts/friends/single.html b/layouts/friends/single.html index ebb71bbb..a4be08c1 100644 --- a/layouts/friends/single.html +++ b/layouts/friends/single.html @@ -1,3 +1,6 @@ +{{- /* TODO remove this template */ -}} +{{- warnf "The `type:offline` in front matter is deprecated. Use `layout:offline` instead.\n" -}} +{{- warnf "Front matter 参数 `type:offline` 已弃用。请改用 `layout:offline`。" -}} {{- define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end -}} {{- define "content" -}} diff --git a/layouts/page/friends.html b/layouts/page/friends.html new file mode 100644 index 00000000..ebb71bbb --- /dev/null +++ b/layouts/page/friends.html @@ -0,0 +1,38 @@ +{{- define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end -}} + +{{- define "content" -}} +{{- $params := .Scratch.Get "params" -}} +
+
+ {{- /* Title */ -}} +

{{- .Title -}}

+ {{- /* Subtitle */ -}} + {{- with $params.subtitle -}}

{{ . }}

{{- end -}} +
+ + {{- /* Friend links */ -}} + + + + {{- /* Content */ -}} +
+ {{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}} +
+ + {{- /* Comment */ -}} + {{- partial "single/comment.html" . -}} +
+{{- end -}}