From bf64e61e1da92a829ae172cde608371a3335b602 Mon Sep 17 00:00:00 2001 From: gabrielgio Date: Sun, 12 Jul 2020 00:59:51 +0200 Subject: Adds two pages from previous jekyll project --- themes/flamingo/layouts/_default/baseof.html | 3 +++ themes/flamingo/layouts/_default/rss.xml | 39 +++++++++++++++++++++++++++ themes/flamingo/layouts/_default/single.html | 5 +++- themes/flamingo/layouts/_default/summary.html | 17 +----------- 4 files changed, 47 insertions(+), 17 deletions(-) create mode 100644 themes/flamingo/layouts/_default/rss.xml (limited to 'themes/flamingo/layouts/_default') diff --git a/themes/flamingo/layouts/_default/baseof.html b/themes/flamingo/layouts/_default/baseof.html index 86a82c1..3475f47 100644 --- a/themes/flamingo/layouts/_default/baseof.html +++ b/themes/flamingo/layouts/_default/baseof.html @@ -23,6 +23,9 @@ {{ partial "meta" . }} + {{ if .RSSLink }} + + {{ end }}
diff --git a/themes/flamingo/layouts/_default/rss.xml b/themes/flamingo/layouts/_default/rss.xml new file mode 100644 index 0000000..ea5fd95 --- /dev/null +++ b/themes/flamingo/layouts/_default/rss.xml @@ -0,0 +1,39 @@ +{{- $pctx := . -}} +{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} +{{- $pages := slice -}} +{{- if or $.IsHome $.IsSection -}} +{{- $pages = $pctx.RegularPages -}} +{{- else -}} +{{- $pages = $pctx.Pages -}} +{{- end -}} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 1 -}} +{{- $pages = $pages | first $limit -}} +{{- end -}} +{{- printf "" | safeHTML }} + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range $pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ .Content | html }} + + {{ end }} + + diff --git a/themes/flamingo/layouts/_default/single.html b/themes/flamingo/layouts/_default/single.html index 99ec989..6261b4b 100644 --- a/themes/flamingo/layouts/_default/single.html +++ b/themes/flamingo/layouts/_default/single.html @@ -4,7 +4,10 @@

{{ .Title }}

{{ if .Date }} - +
+ {{ end }} + {{ if .Lastmod }} + {{ end }} {{ partial "tagbar.html" }} diff --git a/themes/flamingo/layouts/_default/summary.html b/themes/flamingo/layouts/_default/summary.html index e010313..519da2b 100644 --- a/themes/flamingo/layouts/_default/summary.html +++ b/themes/flamingo/layouts/_default/summary.html @@ -2,22 +2,7 @@
{{ .Title }}
- - - - - {{ .Date.Format "2" }}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22) .Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }} {{ .Date.Format "Jan, 2006" }} + {{ .Date.Format "02 Jan 2006" }} - - -- cgit v1.2.3