From d10b832f3f5713014807702a1d1a690ce852f284 Mon Sep 17 00:00:00 2001 From: Spencer Brower <6729162+sbrow@users.noreply.github.com> Date: Sat, 11 Jul 2026 10:39:07 -0400 Subject: [PATCH] feat: Added comment support. --- TODOS.md | 1 - render.odin | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/TODOS.md b/TODOS.md index 0fd26a8..136f044 100644 --- a/TODOS.md +++ b/TODOS.md @@ -15,4 +15,3 @@ - [ ] Nix build integration — main flake runs thor + tailwindcss instead of Hugo - [ ] Copy-to-clipboard button on code blocks (was in Hugo's custom-head.html) - [ ] OpenGraph meta tags -- [ ] utteranc.es comments on posts diff --git a/render.odin b/render.odin index a3178bf..b0b5bee 100644 --- a/render.odin +++ b/render.odin @@ -66,17 +66,30 @@ render_site :: proc(pages: []Page, content_path: string, output_dir: string, bas } render_page_html :: proc(page: Page, site_title: string) -> string { + comments := "" + if page.type == .Post { + comments = ` + ` + } + body := fmt.aprintf( `

%s

%s %s -
+ %s
`, page.title, render_date(page), page.body_html, + comments, ) title := fmt.tprintf("%s | %s", page.title, site_title) return render_chrome(title, body)