diff --git a/domain/model/siteconfig.go b/domain/model/siteconfig.go index 1f3e99f..f5b9e08 100644 --- a/domain/model/siteconfig.go +++ b/domain/model/siteconfig.go @@ -32,4 +32,6 @@ type SiteConfig struct { Secret string AvatarUrl string FullUrl string + HtmlHeadExtra string + FooterExtra string } diff --git a/render/templates/base.tmpl b/render/templates/base.tmpl index 213149d..e7d1bfe 100644 --- a/render/templates/base.tmpl +++ b/render/templates/base.tmpl @@ -60,7 +60,8 @@ object-fit: cover; } - + + {{ .SiteConfig.HtmlHeadExtra }}
@@ -115,6 +116,7 @@ {{ end }} + {{ .SiteConfig.FooterExtra}} diff --git a/render/templates/views/site_config.tmpl b/render/templates/views/site_config.tmpl index 745ac9b..6715d8f 100644 --- a/render/templates/views/site_config.tmpl +++ b/render/templates/views/site_config.tmpl @@ -34,6 +34,12 @@ + + + + + + diff --git a/web/siteconfig_handler.go b/web/siteconfig_handler.go index f70a8cd..3ea13d8 100644 --- a/web/siteconfig_handler.go +++ b/web/siteconfig_handler.go @@ -47,6 +47,8 @@ func (h *SiteConfigHandler) HandlePost(c *fiber.Ctx) error { siteConfig.AuthorName = c.FormValue("AuthorName") siteConfig.AvatarUrl = c.FormValue("AvatarUrl") siteConfig.FullUrl = c.FormValue("FullUrl") + siteConfig.HtmlHeadExtra = c.FormValue("HtmlHeadExtra") + siteConfig.FooterExtra = c.FormValue("FooterExtra") err = h.siteConfigRepo.Update(config.SITE_CONFIG, siteConfig) if err != nil {