1
0
Fork 0
mirror of https://git.sr.ht/~adnano/kiln synced 2024-06-01 13:46:07 +02:00

Add default templates

This commit is contained in:
adnano 2020-11-24 20:08:31 -05:00
parent ecde4b8fa5
commit 7f192dcaba
4 changed files with 35 additions and 0 deletions

14
templates/atom.xml Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ site.URL }}{{ .Path }}</id>
<title>{{ .Title }}</title>
<updated>{{ .Updated.Format "2006-01-02T15:04:05Z07:00" }}</updated>
<link href="{{ site.URL }}{{ .Path }}" rel="alternate">
{{ range .Entries }}<entry>
<id>{{ site.URL }}{{ .Path }}</id>
<title>{{ .Title }}</title>
<updated>{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}</updated>
<link href="{{ site.URL }}{{ .Path }}" rel="alternate">
</entry>
{{ end -}}
</feed>

9
templates/index.gmi Normal file
View File

@ -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 -}}

6
templates/output.html Normal file
View File

@ -0,0 +1,6 @@
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>{{ .Title }}</title>
{{ .Content }}

6
templates/page.gmi Normal file
View File

@ -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 }}