From fecc9b268410c8fefcd1ca32bc4228bba9002178 Mon Sep 17 00:00:00 2001 From: GNUxeava Date: Fri, 11 Mar 2022 10:32:10 +0530 Subject: use theme --- layouts/404.html | 18 +++ layouts/_default/baseof.html | 46 ++++++++ layouts/_default/section.html | 50 ++++++++ layouts/_default/single.html | 7 ++ layouts/_default/single.md | 1 + layouts/_default/taxonomy.html | 46 ++++++++ layouts/_default/terms.html | 44 ++++++++ layouts/index.html | 24 ++++ layouts/partials/comments.html | 138 +++++++++++++++++++++++ layouts/partials/footer.html | 53 +++++++++ layouts/partials/head.html | 91 +++++++++++++++ layouts/partials/header.html | 21 ++++ layouts/partials/header/language-selector.html | 25 ++++ layouts/partials/icons.html | 6 + layouts/partials/post/copyright.html | 35 ++++++ layouts/partials/post/outdated-info-warning.html | 28 +++++ layouts/partials/post/reward.html | 21 ++++ layouts/partials/post/toc.html | 9 ++ layouts/partials/scripts.html | 135 ++++++++++++++++++++++ layouts/partials/slideout.html | 27 +++++ layouts/post/single.html | 72 ++++++++++++ layouts/post/summary.html | 28 +++++ layouts/robots.txt | 2 + layouts/shortcodes/admonition.html | 37 ++++++ layouts/shortcodes/bilibili.html | 23 ++++ layouts/shortcodes/center.html | 3 + layouts/shortcodes/icons.html | 6 + layouts/shortcodes/left.html | 3 + layouts/shortcodes/music.html | 62 ++++++++++ layouts/shortcodes/right.html | 3 + layouts/sitemap.xml | 11 ++ 31 files changed, 1075 insertions(+) create mode 100644 layouts/404.html create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/section.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/_default/single.md create mode 100644 layouts/_default/taxonomy.html create mode 100644 layouts/_default/terms.html create mode 100644 layouts/index.html create mode 100644 layouts/partials/comments.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/header/language-selector.html create mode 100644 layouts/partials/icons.html create mode 100644 layouts/partials/post/copyright.html create mode 100644 layouts/partials/post/outdated-info-warning.html create mode 100644 layouts/partials/post/reward.html create mode 100644 layouts/partials/post/toc.html create mode 100644 layouts/partials/scripts.html create mode 100644 layouts/partials/slideout.html create mode 100644 layouts/post/single.html create mode 100644 layouts/post/summary.html create mode 100644 layouts/robots.txt create mode 100644 layouts/shortcodes/admonition.html create mode 100644 layouts/shortcodes/bilibili.html create mode 100644 layouts/shortcodes/center.html create mode 100644 layouts/shortcodes/icons.html create mode 100644 layouts/shortcodes/left.html create mode 100644 layouts/shortcodes/music.html create mode 100644 layouts/shortcodes/right.html create mode 100644 layouts/sitemap.xml (limited to 'layouts') diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..171fe09 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,18 @@ +{{- define "title" }}404 page not found - {{ .Site.Title }}{{ end -}} + +{{- define "content" -}} +
+

+

/* 404 page not found. */

+ +
+ +{{- end -}} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..1dc8cdc --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,46 @@ +{{ if ne .Site.Params.version "4.x" -}} + {{ errorf "\n\nThere are two possible situations that led to this error:\n 1. You haven't copied the config.toml yet. See https://github.com/olOwOlo/hugo-theme-even#installation \n 2. You have an incompatible update. See https://github.com/olOwOlo/hugo-theme-even/blob/master/CHANGELOG.md#400-2018-11-06 \n\n有两种可能的情况会导致这个错误发生:\n 1. 你还没有复制 config.toml 参考 https://github.com/olOwOlo/hugo-theme-even/blob/master/README-zh.md#installation \n 2. 你进行了一次不兼容的更新 参考 https://github.com/olOwOlo/hugo-theme-even/blob/master/CHANGELOG.md#400-2018-11-06 \n" -}} +{{ end -}} + + + + + + + {{- block "title" . -}} + {{ if .IsPage }}{{ .Title }} - {{ .Site.Title }}{{ else }}{{ .Site.Title }}{{ end }} + {{- end -}} + + {{ partial "head.html" . }} + + + {{ partial "slideout.html" . }} +
+ {{ if not .Params.hideHeaderAndFooter -}} + + {{- end }} + +
+
+
+ {{ block "content" . }}{{ end }} +
+ {{ partial "comments.html" . }} +
+
+ + {{ if not .Params.hideHeaderAndFooter -}} +
+ {{ partial "footer.html" . }} +
+ {{- end }} + +
+ +
+
+ {{ partial "scripts.html" . }} + + diff --git a/layouts/_default/section.html b/layouts/_default/section.html new file mode 100644 index 0000000..b61e67e --- /dev/null +++ b/layouts/_default/section.html @@ -0,0 +1,50 @@ +{{- define "title" }}{{ T "archive" }} - {{ .Site.Title }}{{ end -}} + +{{- define "content" }} +{{- $paginator := .Paginate .Data.Pages.ByDate.Reverse .Site.Params.archivePaginate }} +
+ {{- if and (not $paginator.HasPrev) .Site.Params.showArchiveCount }} +
+ + {{ T "archiveCounter" (len .Data.Pages) }} + +
+ {{- end -}} + + {{- range $index, $element := $paginator.Pages -}} + {{- $thisYear := $element.Date.Format "2006" }} + {{- $lastElement := $index | add -1 | index $paginator.Pages }} + {{- if or (eq $index 0) ( ne ($lastElement.Date.Format "2006") $thisYear ) }} +
+

{{ $thisYear }}

+
+ {{- end }} + +
+ + {{ $element.Date.Format "01-02" }} + + + + {{ .Title }} + + +
+ {{- end -}} +
+ + +{{- end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..96fe3bf --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,7 @@ +{{ define "content" -}} +
+
+ {{ .Content }} +
+
+{{- end }} \ No newline at end of file diff --git a/layouts/_default/single.md b/layouts/_default/single.md new file mode 100644 index 0000000..57705e2 --- /dev/null +++ b/layouts/_default/single.md @@ -0,0 +1 @@ +{{ .RawContent }} \ No newline at end of file diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html new file mode 100644 index 0000000..346c2bf --- /dev/null +++ b/layouts/_default/taxonomy.html @@ -0,0 +1,46 @@ +{{- define "title" }}{{ .Title }} · {{ .Site.Title }}{{ end -}} + +{{- define "content" }} +{{- $paginator := .Paginate .Data.Pages .Site.Params.archivePaginate -}} +
+ {{ if not $paginator.HasPrev -}} + {{ if eq .Data.Plural "tags" -}} +
+

{{ .Title }}

+
+ {{- else if eq .Data.Plural "categories" -}} +
+

{{ .Title }}

+
+ {{- end }} + {{- end }} + + {{ range $paginator.Pages -}} +
+ + {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} + + + + {{ .Title }} + + +
+ {{- end }} +
+ + +{{- end }} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html new file mode 100644 index 0000000..e76cde8 --- /dev/null +++ b/layouts/_default/terms.html @@ -0,0 +1,44 @@ +{{- define "title" }}{{ T .Data.Plural }} - {{ .Site.Title }}{{ end -}} + +{{- define "content" -}} + {{ $name := .Data.Plural -}} + {{ $terms := .Data.Terms.ByCount -}} + {{ $length := len $terms -}} + {{ if eq $name "categories" -}} +
+
+ {{ if eq $length 0 -}} + {{ T "zeroCategoryCounter" }} + {{- else -}} + {{ T "categoryCounter" $length }} + {{- end }} +
+
+ {{ range $key, $value := $terms -}} + + {{ $value.Term }} + {{ len $value.Pages }} + + {{ end -}} +
+
+ {{- else if eq $name "tags" -}} +
+
+ {{ if eq $length 0 -}} + {{ T "zeroTagCounter" }} + {{- else -}} + {{ T "tagCounter" $length }} + {{- end }} +
+
+ {{- range $key, $value := $terms }} + + {{ $value.Term }} + {{ len $value.Pages }} + + {{ end -}} +
+
+ {{- end }} +{{- end }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..3970758 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,24 @@ +{{- define "content" -}} +
+ {{/* (index .Site.Paginate) */}} + {{- $paginator := .Paginate (where (where .Site.RegularPages "Type" "post") ".Params.hiddenfromhomepage" "!=" true) }} + {{- range $paginator.Pages -}} + {{ .Render "summary" }} + {{ end -}} +
+ + +{{- end -}} diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html new file mode 100644 index 0000000..7fd6676 --- /dev/null +++ b/layouts/partials/comments.html @@ -0,0 +1,138 @@ +{{ if and .IsPage (ne .Params.comment false) -}} + + {{- if .Site.DisqusShortname -}} +
+ + + {{- end -}} + + + {{- if and .Site.Params.changyanAppid .Site.Params.changyanAppkey -}} +
+ + {{- end -}} + + + {{- if .Site.Params.livereUID -}} +
+ + +
+ {{- end -}} + + + {{- if .Site.Params.gitment.owner -}} +
+ + + + + {{- end -}} + + + {{- if .Site.Params.gitalk.owner -}} +
+ + + + + {{- end }} + + + {{- if .Site.Params.valine.enable -}} + + {{- if .Site.Params.valine.visitor -}} + + + 0 +

+
+ {{- end }} +
+ + + + {{- end }} + + + {{- if .Site.Params.utterances.owner}} + + + {{- end }} + +{{- end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..9dea06d --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,53 @@ + + + diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..483339d --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + +{{- if .Description -}} + +{{- else if .IsPage -}} + +{{- else if .Site.Params.description -}} + +{{- end -}} + +{{- if .Keywords -}} + {{ $length := len .Keywords | add -1 -}} + +{{- else if .Site.Params.keywords -}} + {{ $length := len .Site.Params.keywords | add -1 -}} + +{{- end }} + + +{{ with .Site.Params.baiduVerification }}{{ end }} +{{ with .Site.Params.googleVerification }}{{ end }} + + + + + + +{{- with .OutputFormats.Get "RSS" }} + + +{{- end -}} + + + + + + + + + +{{- if .Site.Params.debug -}} + + +{{- end -}} + + +{{- if .Site.Params.busuanzi.enable -}} + +{{- end -}} + + +{{ $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint }} + +{{ if .Site.Params.publicCDN.enable -}} + {{ if .Site.Params.fancybox }}{{ .Site.Params.publicCDN.fancyboxCSS | safeHTML }}{{ end }} +{{- else -}} + {{ if .Site.Params.fancybox }}{{ end }} +{{- end -}} + + +{{ range .Site.Params.customCSS -}} + +{{ end }} + +{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/spf13/hugo/blob/master/tpl/tplimpl/template_embedded.go#L158 */}} +{{- template "_internal/opengraph.html" . -}} +{{- template "_internal/google_news.html" . -}} +{{- template "_internal/schema.html" . -}} +{{- template "_internal/twitter_cards.html" . -}} + + +{{ `` | safeHTML }} + +{{ `` | safeHTML }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..24d5b37 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,21 @@ +
+ +
+ +{{ partial "header/language-selector.html" . }} + + diff --git a/layouts/partials/header/language-selector.html b/layouts/partials/header/language-selector.html new file mode 100644 index 0000000..e28650e --- /dev/null +++ b/layouts/partials/header/language-selector.html @@ -0,0 +1,25 @@ + +{{ if (and (.Site.IsMultiLingual) ($.Site.Params.showLanguageSelector)) }} +
+ +
+{{ end }} diff --git a/layouts/partials/icons.html b/layouts/partials/icons.html new file mode 100644 index 0000000..9c1f5df --- /dev/null +++ b/layouts/partials/icons.html @@ -0,0 +1,6 @@ + + {{- $fname:=print "icons/" . ".svg" -}} + {{- $path:=" \ No newline at end of file diff --git a/layouts/partials/post/copyright.html b/layouts/partials/post/copyright.html new file mode 100644 index 0000000..35a7609 --- /dev/null +++ b/layouts/partials/post/copyright.html @@ -0,0 +1,35 @@ +{{ if or .Params.postMetaInFooter (and .Site.Params.postMetaInFooter (ne .Params.postMetaInFooter false)) -}} +
+ + + {{ if $.Site.Params.linkToMarkDown -}} + {{ with $.OutputFormats.Get "markdown" -}} + + {{- end }} + {{- end }} + {{ if or .Params.contentCopyright (and .Site.Params.contentCopyright (ne .Params.contentCopyright false)) -}} + + {{- end }} +
+{{- end }} diff --git a/layouts/partials/post/outdated-info-warning.html b/layouts/partials/post/outdated-info-warning.html new file mode 100644 index 0000000..3736c13 --- /dev/null +++ b/layouts/partials/post/outdated-info-warning.html @@ -0,0 +1,28 @@ +{{- if or .Params.enableOutdatedInfoWarning (and .Site.Params.outdatedInfoWarning.enable (ne .Params.enableOutdatedInfoWarning false)) }} + {{- $daysAgo := div (sub now.Unix .Lastmod.Unix) 86400 }} + {{- $hintThreshold := .Site.Params.outdatedInfoWarning.hint | default 30 }} + {{- $warnThreshold := .Site.Params.outdatedInfoWarning.warn | default 180 }} + + {{- $updateTime := .Lastmod }} + {{- if .GitInfo }} + {{- if lt .GitInfo.AuthorDate.Unix .Lastmod.Unix }} + {{- $updateTime := .GitInfo.AuthorDate }} + {{- end }} + {{- end -}} + + {{- if gt $daysAgo $hintThreshold }} +
+ {{- if gt $daysAgo $warnThreshold }} +
+ {{- else }} +
+ {{- end }} +

{{ T "outdatedInfoWarningBefore" -}} + + {{- dateFormat "January 2, 2006" $updateTime -}} + {{ T "outdatedInfoWarningAfter" -}} +

+
+
+ {{- end -}} +{{- end -}} diff --git a/layouts/partials/post/reward.html b/layouts/partials/post/reward.html new file mode 100644 index 0000000..baceac7 --- /dev/null +++ b/layouts/partials/post/reward.html @@ -0,0 +1,21 @@ +{{ if or .Params.reward (and .Site.Params.reward.enable (ne .Params.reward false)) -}} +
+ + +
+ {{ $qrCode := .Site.Params.reward }} + {{ with $qrCode.wechat -}} + + {{- end }} + {{ with $qrCode.alipay -}} + + {{- end }} +
+
+{{- end }} \ No newline at end of file diff --git a/layouts/partials/post/toc.html b/layouts/partials/post/toc.html new file mode 100644 index 0000000..759ad43 --- /dev/null +++ b/layouts/partials/post/toc.html @@ -0,0 +1,9 @@ +{{ if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}} +
+

{{ T "toc" }}

+ {{- $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default false }} +
+ {{.TableOfContents}} +
+
+{{- end }} \ No newline at end of file diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html new file mode 100644 index 0000000..71fe659 --- /dev/null +++ b/layouts/partials/scripts.html @@ -0,0 +1,135 @@ + +{{- if .Site.Params.highlightInClient -}} + +{{- end -}} + + +{{- if .Site.Params.publicCDN.enable }} + {{ .Site.Params.publicCDN.jquery | safeHTML }} + {{ .Site.Params.publicCDN.slideout | safeHTML }} + {{ if .Site.Params.fancybox }}{{ .Site.Params.publicCDN.fancyboxJS | safeHTML }}{{ end }} +{{- else -}} + + + {{ if .Site.Params.fancybox }}{{ end }} +{{- end -}} + + +{{- if and (or .Params.enableOutdatedInfoWarning (and .Site.Params.outdatedInfoWarning.enable (ne .Params.enableOutdatedInfoWarning false))) (or .IsPage .IsHome) }} + {{- if .Site.Params.publicCDN.enable }} + {{ .Site.Params.publicCDN.timeagoJS | safeHTML }} + {{ .Site.Params.publicCDN.timeagoLocalesJS | safeHTML }} + {{- else }} + + + {{- end }} + +{{- end -}} + + +{{- if and (or .Params.flowchartDiagrams.enable (and .Site.Params.flowchartDiagrams.enable (ne .Params.flowchartDiagrams.enable false))) (or .IsPage .IsHome) -}} + + {{- if .Site.Params.publicCDN.enable -}} + {{ .Site.Params.publicCDN.flowchartDiagramsJS | safeHTML }} + {{- else -}} + + + {{- end -}} +{{- end -}} + + +{{- if and (or .Params.sequenceDiagrams.enable (and .Site.Params.sequenceDiagrams.enable (ne .Params.sequenceDiagrams.enable false))) (or .IsPage .IsHome) -}} + + {{- if .Site.Params.publicCDN.enable -}} + {{ .Site.Params.publicCDN.sequenceDiagramsJS | safeHTML }} + {{ .Site.Params.publicCDN.sequenceDiagramsCSS | safeHTML }} + {{- else -}} + + + + + + {{- end -}} +{{- end }} +{{ $even := resources.Get "js/even.js" }} +{{ $main := resources.Get "js/main.js" }} +{{ $js := slice $even $main | resources.Concat "js/main.js" | minify | fingerprint }} + + +{{- if and (or .Params.mathjax (and .Site.Params.mathjax (ne .Params.mathjax false))) (or .IsPage .IsHome) }} + + {{ if .Site.Params.mathjaxUseLocalFiles -}} + + {{- else -}} + + {{- end }} +{{- end }} + + +{{- if (in (slice (getenv "HUGO_ENV") hugo.Environment) "production") | and .Site.GoogleAnalytics -}} + {{ template "_internal/google_analytics_async.html" . }} +{{- end -}} + +{{- with .Site.Params.baiduAnalytics -}} + +{{- end }} + + +{{- if .Site.Params.baiduPush -}} + +{{- end }} + + +{{ range .Site.Params.customJS -}} + +{{ end }} diff --git a/layouts/partials/slideout.html b/layouts/partials/slideout.html new file mode 100644 index 0000000..da0885c --- /dev/null +++ b/layouts/partials/slideout.html @@ -0,0 +1,27 @@ + + diff --git a/layouts/post/single.html b/layouts/post/single.html new file mode 100644 index 0000000..d138eef --- /dev/null +++ b/layouts/post/single.html @@ -0,0 +1,72 @@ +{{ define "content" -}} +
+ +
+

{{ .Title }}

+ + +
+ + + {{- partial "post/toc.html" . -}} + + + {{- partial "post/outdated-info-warning.html" . -}} + + +
+ {{ .Content }} +
+ + + {{- partial "post/copyright.html" . -}} + + + {{- partial "post/reward.html" . -}} + + +
+{{- end }} diff --git a/layouts/post/summary.html b/layouts/post/summary.html new file mode 100644 index 0000000..38c45f4 --- /dev/null +++ b/layouts/post/summary.html @@ -0,0 +1,28 @@ +
+
+

{{ .Title }}

+ +
+ +
+
+ {{ .Summary }} +
+ +
+
diff --git a/layouts/robots.txt b/layouts/robots.txt new file mode 100644 index 0000000..e89778e --- /dev/null +++ b/layouts/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Sitemap: {{ "sitemap.xml" | absURL }} diff --git a/layouts/shortcodes/admonition.html b/layouts/shortcodes/admonition.html new file mode 100644 index 0000000..fa5aacb --- /dev/null +++ b/layouts/shortcodes/admonition.html @@ -0,0 +1,37 @@ +{{ if .IsNamedParams -}} + + {{ if eq (.Get "details") "true" -}} + +
+ {{- with .Get "title" }}{{ . }}{{ end }} + {{ .Inner }} +
+ + {{- else -}} + +
+ {{- with .Get "title" }}

{{ . }}

{{ end }} + {{ .Inner }} +
+ + {{- end }} + +{{- else -}} + + {{ if eq (.Get 2) "true" -}} + +
+ {{- with .Get 1 }}{{ . }}{{ end }} + {{ .Inner }} +
+ + {{- else -}} + +
+ {{- with .Get 1 }}

{{ . }}

{{ end }} + {{ .Inner }} +
+ + {{- end }} + +{{- end }} \ No newline at end of file diff --git a/layouts/shortcodes/bilibili.html b/layouts/shortcodes/bilibili.html new file mode 100644 index 0000000..005eccb --- /dev/null +++ b/layouts/shortcodes/bilibili.html @@ -0,0 +1,23 @@ + +{{ $videoID := index .Params 0 }} +{{ $pageNum := index .Params 1 | default 1 }} + +{{ if (findRE "^[bB][vV][0-9a-zA-Z]+$" $videoID) }} +
+{{ else }} +
+{{ end }} + + diff --git a/layouts/shortcodes/center.html b/layouts/shortcodes/center.html new file mode 100644 index 0000000..e9022d0 --- /dev/null +++ b/layouts/shortcodes/center.html @@ -0,0 +1,3 @@ +
+ {{ .Inner }} +
\ No newline at end of file diff --git a/layouts/shortcodes/icons.html b/layouts/shortcodes/icons.html new file mode 100644 index 0000000..2279580 --- /dev/null +++ b/layouts/shortcodes/icons.html @@ -0,0 +1,6 @@ + + {{- $fname:=print "icons/" ( .Get 0 ) ".svg" -}} + {{- $path:=" \ No newline at end of file diff --git a/layouts/shortcodes/left.html b/layouts/shortcodes/left.html new file mode 100644 index 0000000..c2c5102 --- /dev/null +++ b/layouts/shortcodes/left.html @@ -0,0 +1,3 @@ +
+ {{ .Inner }} +
\ No newline at end of file diff --git a/layouts/shortcodes/music.html b/layouts/shortcodes/music.html new file mode 100644 index 0000000..22b2268 --- /dev/null +++ b/layouts/shortcodes/music.html @@ -0,0 +1,62 @@ + {{/* + ## Music 163 + + ### Params: + + - `id` + + required param + you can extract from music url + url format "http://music.163.com/#/song?id=3950552" + + - Fiddle `auto` + + optional param + default value 0 + you can overwrite it with 1 + + ### Examples: + + - Simple + + {{% music "3950552" %}} + {{% music "3950552" "1" %}} + + - Named Params + + {{% music id="3950552" %}} + {{% music id="3950552" auto="1" %}} + + */}} + + {{- /* DEFAULTS */ -}} + {{ $auto := "0" }} + + {{- if .IsNamedParams -}} + + + + {{- else -}} + + + + {{- end -}} + \ No newline at end of file diff --git a/layouts/shortcodes/right.html b/layouts/shortcodes/right.html new file mode 100644 index 0000000..37a9a33 --- /dev/null +++ b/layouts/shortcodes/right.html @@ -0,0 +1,3 @@ +
+ {{ .Inner }} +
\ No newline at end of file diff --git a/layouts/sitemap.xml b/layouts/sitemap.xml new file mode 100644 index 0000000..19dd68d --- /dev/null +++ b/layouts/sitemap.xml @@ -0,0 +1,11 @@ +{{ "" | safeHTML }} + + {{ range .Data.Pages }} + + {{ .Permalink }}{{ if not .Lastmod.IsZero }} + {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} + {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} + {{ .Sitemap.Priority }}{{ end }} + + {{ end }} + \ No newline at end of file -- cgit v1.2.3