From 9c7895f5cdd27aeadcaa7128682a047cfc4fb3f8 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Wed, 23 Oct 2024 17:24:54 -0700 Subject: Don't pre-render templates. --- templates/blog/post.html.template | 1 + templates/blog/posts/2024-10-22_nix_flakes.html.template | 2 +- templates/index.html.template | 6 ++++-- templates/outline.html.template | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) (limited to 'templates') 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 @@
⬅️Home +

{{template "title" .}}

{{template "post"}}
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 @@ -

nix flakes for busy people

+{{define "title"}}nix flakes for busy people{{end}}

TL;DR

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

roseh.moe

@@ -10,8 +12,8 @@

Games? (Warning: loud)

-{{range .Posts}} +{{range .}}
-

{{name .}}

+

{{.Name}}

{{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 @@ - {{.Title}} + {{template "title" .}} -- cgit v1.3.1