mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 07:18:57 +00:00
🚚 Feat: migrate offline page to build-in page
remove offline type and layput
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
---
|
||||
layout: offline
|
||||
description: '{{ T "offlineTitle" }} | {{ .Site.Title }}'
|
||||
keywords:
|
||||
- PWA
|
||||
- {{ T "offlineTitle" }}
|
||||
---
|
||||
|
||||
<!-- You need do nothing for this page. -->
|
||||
+1
-1
Submodule docs updated: fda1a078d3...19740c3719
@@ -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"]
|
||||
|
||||
@@ -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" -}}
|
||||
<article class="page" id="content-offline">
|
||||
<div class="header">
|
||||
<h1 class="offline-title animate__animated animate__pulse animate__faster">{{- T "offlineTitle" -}}</h1>
|
||||
<p class="offline-subtitle animate__animated animate__headShake">
|
||||
<i class="fa-stack fa-xs" aria-hidden="true">
|
||||
<i class="fa-solid fa-wifi fa-stack-1x" aria-hidden="true"></i>
|
||||
<i class="fa-solid fa-ban fa-stack-2x" aria-hidden="true"></i>
|
||||
</i>
|
||||
<span>ERROR_INTERNET_DISCONNECTED</span>
|
||||
</p>
|
||||
</div>
|
||||
<p class="error-text">{{- T "offlineText" -}}</p>
|
||||
</article>
|
||||
{{- end -}}
|
||||
@@ -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 -}}
|
||||
|
||||
Reference in New Issue
Block a user