From 4e5ab025f03004d9cc5ecce53371683766495ac6 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Sun, 5 Oct 2025 22:50:27 +0200 Subject: feat(backend): support file properties in generic root --- backend/parser.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'backend/parser.go') diff --git a/backend/parser.go b/backend/parser.go index a0cb01f..5ef6c05 100644 --- a/backend/parser.go +++ b/backend/parser.go @@ -18,7 +18,7 @@ type EntryInfo struct { PubLocalDate toml.LocalDate `toml:"publication_date"` } -func parse(b []byte, info *EntryInfo) (template.HTML, bool) { +func parse(b []byte, info *EntryInfo, d *data) (template.HTML, bool) { var dd string splits := strings.SplitN(string(b), "---", 2) if len(splits) == 2 && info != nil { @@ -39,5 +39,8 @@ func parse(b []byte, info *EntryInfo) (template.HTML, bool) { fmt.Println(errMd.Pretty()) return "", false } + d.PageDescription = info.Description + d.title = info.Title + d.Image = info.Img.Src return content, true } -- cgit v1.2.3