From 30dbc469bdf12c088f1f06d59102f05014448cf9 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Tue, 5 Dec 2023 11:19:13 +0800 Subject: [PATCH] :truck: Feat: the `type: offline` in front matter is deprecated. use `layout: offline` instead --- layouts/offline/single.html | 3 +++ layouts/page/offline.html | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 layouts/page/offline.html diff --git a/layouts/offline/single.html b/layouts/offline/single.html index 758071fe..f3337f8d 100644 --- a/layouts/offline/single.html +++ b/layouts/offline/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" -}} {{- T "offlineTitle" }} - {{ .Site.Title -}} {{- end -}} diff --git a/layouts/page/offline.html b/layouts/page/offline.html new file mode 100644 index 00000000..758071fe --- /dev/null +++ b/layouts/page/offline.html @@ -0,0 +1,19 @@ +{{- define "title" -}} + {{- T "offlineTitle" }} - {{ .Site.Title -}} +{{- end -}} + +{{- define "content" -}} +
+
+

{{- T "offlineTitle" -}}

+

+ + ERROR_INTERNET_DISCONNECTED +

+
+

{{- T "offlineText" -}}

+
+{{- end -}}