Test Meta Description
All checks were successful
release-tag / release-image (push) Successful in 2m22s

This commit is contained in:
2025-05-05 20:58:17 +02:00
parent 10172d1fdc
commit 38fa612a18
3 changed files with 20 additions and 14 deletions

View File

@@ -58,10 +58,11 @@ func LoadDir(root string) ([]Article, error) {
}
var meta struct {
Title string `json:"title"`
Date string `json:"date"`
Slug string `json:"slug"`
Cover string `json:"cover"`
Title string `json:"title"`
Date string `json:"date"`
Slug string `json:"slug"`
Cover string `json:"cover"`
Description string `json:"description"`
}
if err := json.Unmarshal(headerJSON, &meta); err != nil {
return fmt.Errorf("%s: %w", path, err)
@@ -87,11 +88,12 @@ func LoadDir(root string) ([]Article, error) {
}
out = append(out, Article{
Title: meta.Title,
Slug: meta.Slug,
Date: date,
Cover: meta.Cover,
Body: template.HTML(body),
Title: meta.Title,
Slug: meta.Slug,
Date: date,
Cover: meta.Cover,
Description: meta.Description,
Body: template.HTML(body),
})
return nil
})