From 8d7e708d98a3a46ba3ba08f9c8deeb4838bb8ca5 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Fri, 17 May 2024 23:37:43 +0200 Subject: Render posts completely using common rendering methods The aim is to reduce reliance on custom logic in the handlers for every protocol, eventually outsourcing all of it into `render.Methods`, leaving each protocol to simply direct calls to the correct template. --- src/gmi/tpl/posts/post.gmi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gmi/tpl/posts/post.gmi') diff --git a/src/gmi/tpl/posts/post.gmi b/src/gmi/tpl/posts/post.gmi index 0234395..b568044 100644 --- a/src/gmi/tpl/posts/post.gmi +++ b/src/gmi/tpl/posts/post.gmi @@ -1,4 +1,4 @@ -{{ $post := .GetPostByID (.GetQueryValue "id" "") -}} +{{ $post := .GetThisPost -}} {{ if eq $post.Format "md" -}} This post has been translated from it's original markdown format, if it seems busted it might appear better over HTTP: @@ -14,7 +14,7 @@ This post has been translated from it's original markdown format, if it seems bu {{ end -}} -{{ .PostBody $post }} +{{ .PostGemtextBody $post }} ======================================== -- cgit v1.2.3