diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-05 22:50:27 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-05 23:18:17 +0200 |
| commit | 4e5ab025f03004d9cc5ecce53371683766495ac6 (patch) | |
| tree | b24b1188226d09db4c5cacb5514a5d9f90cd58f8 /backend/parser.go | |
| parent | 33cfc1d4e8f3b5b55202588e5b5148a48b43d427 (diff) | |
feat(backend): support file properties in generic root
Diffstat (limited to 'backend/parser.go')
| -rw-r--r-- | backend/parser.go | 5 |
1 files changed, 4 insertions, 1 deletions
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 } |
