about summary refs log tree commit diff stats
path: root/internal/content
diff options
context:
space:
mode:
authorAlan Pearce2024-06-18 20:19:05 +0200
committerAlan Pearce2024-06-18 20:19:05 +0200
commit1f9f24e2cef08f40fe2597b3644d08b28e31d370 (patch)
treeb5157b49e8777335b54738ceada783450e8570e4 /internal/content
parentb27c96688785372787eb5c3c71a32767fab71ac4 (diff)
downloadwebsite-1f9f24e2cef08f40fe2597b3644d08b28e31d370.tar.lz
website-1f9f24e2cef08f40fe2597b3644d08b28e31d370.tar.zst
website-1f9f24e2cef08f40fe2597b3644d08b28e31d370.zip
pass rendered html to homepage
Diffstat (limited to 'internal/content')
-rw-r--r--internal/content/posts.go4
1 files changed, 2 insertions, 2 deletions
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
 			}