From 13c231ee0d0ff477969e14b47332ec94329bf80c Mon Sep 17 00:00:00 2001 From: vin Date: Tue, 22 Oct 2024 14:23:15 -0400 Subject: initial commit with converted pages --- layouts/_default/single.html | 11 +++++++++++ layouts/blog/rss.xml | 39 +++++++++++++++++++++++++++++++++++++++ layouts/blog/section.html | 10 ++++++++++ layouts/blog/single.html | 15 +++++++++++++++ layouts/index.html | 15 +++++++++++++++ layouts/partials/foot.html | 4 ++++ layouts/partials/head.html | 14 ++++++++++++++ 7 files changed, 108 insertions(+) create mode 100644 layouts/_default/single.html create mode 100644 layouts/blog/rss.xml create mode 100644 layouts/blog/section.html create mode 100644 layouts/blog/single.html create mode 100644 layouts/index.html create mode 100644 layouts/partials/foot.html create mode 100644 layouts/partials/head.html (limited to 'layouts') diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..cc2c399 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,11 @@ +{{ partial "head.html" . }} + +

+ {{$.Title}} +

+ +
+ {{.Content}} +
+ +{{ partial "foot.html" }} diff --git a/layouts/blog/rss.xml b/layouts/blog/rss.xml new file mode 100644 index 0000000..3d3ae80 --- /dev/null +++ b/layouts/blog/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 }} + https://open.crates.im + 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/layouts/blog/section.html b/layouts/blog/section.html new file mode 100644 index 0000000..9466f77 --- /dev/null +++ b/layouts/blog/section.html @@ -0,0 +1,10 @@ + + + +{{.Title}} +{{ $style := resources.Get "main.scss" | css.Sass | resources.Minify | resources.Fingerprint }} + + +
+ {{.Content}} +
diff --git a/layouts/blog/single.html b/layouts/blog/single.html new file mode 100644 index 0000000..2ca4ce1 --- /dev/null +++ b/layouts/blog/single.html @@ -0,0 +1,15 @@ +{{ partial "head.html" . }} +

+ {{$.Title}} + + {{.Date.Format "January 2, 2006"}} + on + {{.Site.Title}} + +

+
+
+ {{.Content}} +
+
+{{ partial "foot.html" }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..36ead9a --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,15 @@ +{{ partial "head.html" . }} + +
+
+
+

{{$.Title}}

+ {{ range (where .Site.RegularPages "Section" "blog") }} +
+ {{.Date.Format "2006-01-02"}} + {{.Title}} +
+ {{ end }} +
+
+
diff --git a/layouts/partials/foot.html b/layouts/partials/foot.html new file mode 100644 index 0000000..203510a --- /dev/null +++ b/layouts/partials/foot.html @@ -0,0 +1,4 @@ + diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..3e6ccaa --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,14 @@ + + + + + + {{ if $.Params.noindex }} + + {{ end }} + {{$.Title}} + + + {{ $style := resources.Get "main.scss" | css.Sass | resources.Fingerprint }} + + -- cgit v1.2.3