summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/blog/post.html.template1
-rw-r--r--templates/blog/posts/2024-10-22_nix_flakes.html.template2
-rw-r--r--templates/index.html.template6
-rw-r--r--templates/outline.html.template2
4 files changed, 7 insertions, 4 deletions
diff --git a/templates/blog/post.html.template b/templates/blog/post.html.template
index ba5e81f..d250fee 100644
--- a/templates/blog/post.html.template
+++ b/templates/blog/post.html.template
@@ -1,4 +1,5 @@
<article>
<a href="/">⬅️Home</a>
+ <h1>{{template "title" .}}</h1>
{{template "post"}}
</article>
diff --git a/templates/blog/posts/2024-10-22_nix_flakes.html.template b/templates/blog/posts/2024-10-22_nix_flakes.html.template
index b9b2ca0..d191908 100644
--- a/templates/blog/posts/2024-10-22_nix_flakes.html.template
+++ b/templates/blog/posts/2024-10-22_nix_flakes.html.template
@@ -1,4 +1,4 @@
-<h1>nix flakes for busy people</h1>
+{{define "title"}}nix flakes for busy people{{end}}
<h2>TL;DR</h2>
diff --git a/templates/index.html.template b/templates/index.html.template
index 5c8d11b..43e35f9 100644
--- a/templates/index.html.template
+++ b/templates/index.html.template
@@ -1,3 +1,5 @@
+{{define "title"}}roseh.moe{{end}}
+
<div style="background-image:url(/static/index/stars.gif);background-repeat:repeat;height:500px;display:flex;justify-content:center;align-items:center">
<h1>roseh.moe</h1>
</div>
@@ -10,8 +12,8 @@
<p><a href="/pong">Games?</a> (Warning: loud)</p>
</article>
-{{range .Posts}}
+{{range .}}
<article>
- <a href="/blog/{{.}}"><h2>{{name .}}</h2></a>
+ <a href="/blog/{{.Slug}}"><h2>{{.Name}}</h2></a>
</article>
{{end}}
diff --git a/templates/outline.html.template b/templates/outline.html.template
index be739c3..9dd6730 100644
--- a/templates/outline.html.template
+++ b/templates/outline.html.template
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <title>{{.Title}}</title>
+ <title>{{template "title" .}}</title>
<link rel="icon" href="/static/icon.png">
<link rel="stylesheet" href="/static/styles.css">
</head>