From 1f9f24e2cef08f40fe2597b3644d08b28e31d370 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 18 Jun 2024 20:19:05 +0200 Subject: pass rendered html to homepage --- internal/content/posts.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/content') diff --git a/internal/content/posts.go b/internal/content/posts.go index c3511cf..5185d06 100644 --- a/internal/content/posts.go +++ b/internal/content/posts.go @@ -70,7 +70,7 @@ func GetPost(filename string) (*PostMatter, []byte, error) { return &matter, rest, nil } -func renderMarkdown(content []byte) (string, error) { +func RenderMarkdown(content []byte) (string, error) { var buf bytes.Buffer if err := markdown.Convert(content, &buf); err != nil { return "", errors.WithMessage(err, "could not convert markdown content") @@ -105,7 +105,7 @@ func ReadPosts(root string, inputDir string, outputDir string) ([]Post, Tags, er } log.Debug("rendering markdown in post", "post", pathFromRoot) - html, err := renderMarkdown(content) + html, err := RenderMarkdown(content) if err != nil { return nil, nil, err } -- cgit 1.4.1