Meta Description Bugfix #1
All checks were successful
release-tag / release-image (push) Successful in 2m9s

This commit is contained in:
2025-05-05 21:08:06 +02:00
parent 38fa612a18
commit b1536ad724

View File

@@ -109,6 +109,7 @@ func LoadDir(root string) ([]Article, error) {
type StaticPage struct {
Title string
Slug string
Description string
Body template.HTML
}
@@ -168,6 +169,7 @@ func LoadStatic(dir string) (map[string]StaticPage, error) {
var meta struct {
Title string `json:"title"`
Slug string `json:"slug"`
Description string `json:"description"`
}
if err := json.Unmarshal(headerJSON, &meta); err != nil {
return nil, fmt.Errorf("%s: %w", path, err)
@@ -189,6 +191,7 @@ func LoadStatic(dir string) (map[string]StaticPage, error) {
pages[meta.Slug] = StaticPage{
Title: meta.Title,
Slug: meta.Slug,
Description: meta.Description,
Body: template.HTML(body),
}
}