Add default templates

This commit is contained in:
Adnan Maolood 2020-11-24 20:08:31 -05:00
parent 4c2d9a7f5a
commit 121b91990a
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 }}