From 7f192dcabaa9f97e11e0373565a16bccbb97cb80 Mon Sep 17 00:00:00 2001 From: adnano Date: Tue, 24 Nov 2020 20:08:31 -0500 Subject: [PATCH] Add default templates --- templates/atom.xml | 14 ++++++++++++++ templates/index.gmi | 9 +++++++++ templates/output.html | 6 ++++++ templates/page.gmi | 6 ++++++ 4 files changed, 35 insertions(+) create mode 100644 templates/atom.xml create mode 100644 templates/index.gmi create mode 100644 templates/output.html create mode 100644 templates/page.gmi diff --git a/templates/atom.xml b/templates/atom.xml new file mode 100644 index 0000000..5aad2e4 --- /dev/null +++ b/templates/atom.xml @@ -0,0 +1,14 @@ + + +{{ site.URL }}{{ .Path }} +{{ .Title }} +{{ .Updated.Format "2006-01-02T15:04:05Z07:00" }} + +{{ range .Entries }} + {{ site.URL }}{{ .Path }} + {{ .Title }} + {{ .Date.Format "2006-01-02T15:04:05Z07:00" }} + + +{{ end -}} + diff --git a/templates/index.gmi b/templates/index.gmi new file mode 100644 index 0000000..2de410a --- /dev/null +++ b/templates/index.gmi @@ -0,0 +1,9 @@ +# {{ .Title }} +{{ if .Content }} +{{ .Content }}{{ end }} +{{ if .Dirs }}{{ range .Dirs }}=> {{ .Path }}{{ if .Title }} {{ .Title }}{{ end }} +{{ end }} +{{ end -}} +{{ range .Pages }}=> {{ .Path }} {{ if not .Date.IsZero -}} +{{.Date.Format "2006-01-02"}} {{end}}{{.Title}} +{{ end -}} diff --git a/templates/output.html b/templates/output.html new file mode 100644 index 0000000..513c17c --- /dev/null +++ b/templates/output.html @@ -0,0 +1,6 @@ + + + +{{ .Title }} + +{{ .Content }} diff --git a/templates/page.gmi b/templates/page.gmi new file mode 100644 index 0000000..bd4662e --- /dev/null +++ b/templates/page.gmi @@ -0,0 +1,6 @@ +# {{ .Title }} +{{- if not .Date.IsZero }} +Posted on {{ .Date.Format "2006-01-02" }} +{{- if site.Title }} on {{ site.Title }}{{ end }}{{ end }} + +{{ .Content }}