diff --git a/archetypes/offline.md b/archetypes/offline.md deleted file mode 100644 index 73fd738c..00000000 --- a/archetypes/offline.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -layout: offline -description: '{{ T "offlineTitle" }} | {{ .Site.Title }}' -keywords: - - PWA - - {{ T "offlineTitle" }} ---- - - diff --git a/docs b/docs index fda1a078..19740c37 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit fda1a078d3e15d3193f7a35acebfab5aaf9e54ca +Subproject commit 19740c371950563a14a9312d31312424d73cde5e diff --git a/hugo.toml b/hugo.toml index 8bf98e11..50e03732 100644 --- a/hugo.toml +++ b/hugo.toml @@ -233,6 +233,14 @@ enableEmoji = true isPlainText = false isHTML = true permalinkable = true + # FixIt 0.3.0 | NEW Options to make output /offline/index.html file + [offline] + path = "offline" + baseName = "index" + mediaType = "text/html" + isPlainText = false + isHTML = true + permalinkable = true # ------------------------------------------------------------------------------------- # Customizing Output Formats @@ -240,7 +248,7 @@ enableEmoji = true # ------------------------------------------------------------------------------------- [outputs] - home = ["HTML", "RSS", "JSON", "BaiduUrls", "archives"] + home = ["HTML", "RSS", "JSON", "BaiduUrls", "archives", "offline"] page = ["HTML", "MarkDown"] section = ["HTML", "RSS"] taxonomy = ["HTML"] diff --git a/layouts/page/offline.html b/layouts/index.offline.html similarity index 100% rename from layouts/page/offline.html rename to layouts/index.offline.html diff --git a/layouts/offline/single.html b/layouts/offline/single.html deleted file mode 100644 index 3b80ffc5..00000000 --- a/layouts/offline/single.html +++ /dev/null @@ -1,23 +0,0 @@ -{{- /* 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" -}} - {{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}} -{{- end -}} - -{{- define "content" -}} -
-
-

{{- T "offlineTitle" -}}

-

- - ERROR_INTERNET_DISCONNECTED -

-
-

{{- T "offlineText" -}}

-
-{{- end -}} diff --git a/layouts/partials/init/global.html b/layouts/partials/init/global.html index c587bb2e..4a3319bb 100644 --- a/layouts/partials/init/global.html +++ b/layouts/partials/init/global.html @@ -8,4 +8,5 @@ {{- /* Set site home relative permalink */ -}} {{- $homeRelPermalink := .Site.Home.RelPermalink -}} {{- $homeRelPermalink = strings.TrimSuffix "archives/" $homeRelPermalink -}} +{{- $homeRelPermalink = strings.TrimSuffix "offline/" $homeRelPermalink -}} {{- .Scratch.Set "homeRelPermalink" $homeRelPermalink -}}