diff options
Diffstat (limited to 'internal/router')
| -rw-r--r-- | internal/router/handlers/root.go | 7 | ||||
| -rw-r--r-- | internal/router/router.go | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/internal/router/handlers/root.go b/internal/router/handlers/root.go index 6a011e4..4fc4e31 100644 --- a/internal/router/handlers/root.go +++ b/internal/router/handlers/root.go @@ -47,11 +47,8 @@ func (r *RootHandler) AddMeta(c *fiber.Ctx, supplements *router.Supplements, lan {Property: "og:url", Content: fmt.Sprint(templateMap["CanonicalEndpoint"]) + "/"}, {Property: "og:type", Content: "website"}, } - if supplements.Meta.GoogleSiteVerification != "" { - meta = append(meta, router.MetaField{Name: "google-site-verification", Content: supplements.Meta.GoogleSiteVerification}) - } - if supplements.Meta.YandexVerification != "" { - meta = append(meta, router.MetaField{Name: "yandex-verification", Content: supplements.Meta.YandexVerification}) + for _, field := range supplements.Meta { + meta = append(meta, router.MetaField{Name: field.Name, Content: field.Value}) } return meta, nil } diff --git a/internal/router/router.go b/internal/router/router.go index c8b5686..a11a934 100644 --- a/internal/router/router.go +++ b/internal/router/router.go @@ -102,7 +102,7 @@ type Supplements struct { BlogTrigger *blogtrigger.BlogTriggerScheduler TemplateManager *templatemanager.TemplateManager MarkdownRenderer goldmark.Markdown - Meta config.MetaConfig + Meta []config.MetaConfig PhotoStorage config.PhotoStorageConfig StaticStorage config.StaticStorageConfig } |