summaryrefslogtreecommitdiff
path: root/layouts/posts
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2021-12-15 10:45:58 +0100
committerPatrick Spek <p.spek@tyil.nl>2021-12-15 10:45:58 +0100
commit5c086bc52fa3a226bcf706b1f420a5d98ea377dd (patch)
treeda5b28238542247efbe36c49cbc6cfd4e49f3e36 /layouts/posts
parent64e0495846f8b680288280920cba6bcb28e4092f (diff)
Redo most of the blog in Hugo
Missing posts will have to be added later
Diffstat (limited to 'layouts/posts')
-rw-r--r--layouts/posts/list.html20
-rw-r--r--layouts/posts/single.html20
2 files changed, 40 insertions, 0 deletions
diff --git a/layouts/posts/list.html b/layouts/posts/list.html
new file mode 100644
index 0000000..1bacf24
--- /dev/null
+++ b/layouts/posts/list.html
@@ -0,0 +1,20 @@
+{{ define "main" }}
+<h1>{{ .Title }}</h1>
+{{ .Content }}
+{{ range .Sections }}
+ <h2>{{ .Title }}</h2>
+ <ul>
+ {{ range .Pages }}
+ <li>
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+ <small>
+ {{ .Date | dateFormat "2006-01-02" }}
+ {{- range .Params.tags }}
+ <a href="/tags/{{ . | lower }}">#{{ . }}</a>
+ {{- end }}
+ </small>
+ </li>
+ {{ end }}
+ </ul>
+ {{ end }}
+{{ end }}
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
new file mode 100644
index 0000000..cb63cbf
--- /dev/null
+++ b/layouts/posts/single.html
@@ -0,0 +1,20 @@
+{{ define "main" }}
+<article>
+ <header>
+ <h1>{{ .Title }}</h1>
+ {{- range .Params.tags }}
+ <a href="/tags/{{ . | lower }}">#{{ . }}</a>
+ {{- end }}
+ </header>
+ <main>
+ {{ .Content }}
+ </main>
+ <footer>
+ <p class="text-center">
+ <a class="image-link" rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">
+ <img alt="Creative Commons License" style="border-width:0" src="/img/cc-by-sa.png">
+ </a>
+ </p>
+ </footer>
+</article>
+{{ end }}