aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-12-21 16:57:48 +0100
committerAnhgelus Morhtuuzh <william@herges.fr>2025-12-21 16:57:48 +0100
commit1c86bdda2a3067ade9aa765d8d87fe27151dd895 (patch)
tree936f0feda31e3c05246d15931a30db952c10d71c /backend
parentdcde389e65de707b262ffbb56866ee51d353cc4b (diff)
feat(backend): set content to display like a poem
Diffstat (limited to 'backend')
-rw-r--r--backend/parser.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/parser.go b/backend/parser.go
index f2537d5..9165c71 100644
--- a/backend/parser.go
+++ b/backend/parser.go
@@ -17,6 +17,7 @@ type EntryInfo struct {
Description string `toml:"description"`
Img image `toml:"image"`
PubLocalDate toml.LocalDate `toml:"publication_date"`
+ Poem bool `toml:"poem"`
}
func renderLinkFunc(url string) func(string, string) template.HTML {
@@ -52,6 +53,7 @@ func parse(b []byte, info *EntryInfo, d *data) (template.HTML, bool) {
}
opt := defaultMarkdownOption
opt.RenderLink = renderLinkFunc(d.URL)
+ opt.Poem = info.Poem
content, err := markdown.Parse(dd, &opt)
var errMd *markdown.ParseError
errors.As(err, &errMd)