diff --git a/exampleSite/config/_default/module.toml b/exampleSite/config/_default/module.toml index 3df4300..39ccf30 100644 --- a/exampleSite/config/_default/module.toml +++ b/exampleSite/config/_default/module.toml @@ -53,6 +53,9 @@ path = "github.com/gethugothemes/hugo-modules/components/social-share" [[imports]] path = "github.com/gethugothemes/hugo-modules/components/cookie-consent" +[[imports]] +path = "github.com/gethugothemes/hugo-modules/components/announcement" + [[imports]] path = "github.com/gethugothemes/hugo-modules/components/custom-script" diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index fbada1a..c7786cd 100755 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -52,6 +52,12 @@ show_description = true show_tags = true show_categories = true +# announcement +# announcement module: https://github.com/gethugothemes/hugo-modules/tree/master/components/announcement +[announcement] +enable = true +expire_days = 7 +content = "You must replace the **baseURL** in **hugo.toml** file when deploying, you can manage this announcement from the **params.toml** file." # seo meta data for OpenGraph / Twitter Card # seo module: https://github.com/gethugothemes/hugo-modules/tree/master/seo-tools/basic-seo diff --git a/exampleSite/go.mod b/exampleSite/go.mod index c42a55b..41655ba 100644 --- a/exampleSite/go.mod +++ b/exampleSite/go.mod @@ -5,6 +5,7 @@ go 1.20 require ( github.com/gethugothemes/hugo-modules/accordion v0.0.0-20240414052440-de0e16b3cfb6 // indirect github.com/gethugothemes/hugo-modules/adsense v0.0.0-20240414052440-de0e16b3cfb6 // indirect + github.com/gethugothemes/hugo-modules/components/announcement v0.0.0-20240416110631-04e45537e954 // indirect github.com/gethugothemes/hugo-modules/components/cookie-consent v0.0.0-20240414052440-de0e16b3cfb6 // indirect github.com/gethugothemes/hugo-modules/components/custom-script v0.0.0-20240414052440-de0e16b3cfb6 // indirect github.com/gethugothemes/hugo-modules/components/preloader v0.0.0-20240414052440-de0e16b3cfb6 // indirect @@ -25,4 +26,5 @@ require ( github.com/gethugothemes/hugo-modules/tab v0.0.0-20240414052440-de0e16b3cfb6 // indirect github.com/gethugothemes/hugo-modules/table-of-contents v0.0.0-20240414052440-de0e16b3cfb6 // indirect github.com/gethugothemes/hugo-modules/videos v0.0.0-20240414052440-de0e16b3cfb6 // indirect + github.com/zeon-studio/hugoplate v0.0.0-20240417025955-2f8cd66481e2 // indirect ) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index b4a8a10..d48949c 100755 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -29,6 +29,10 @@ {{ end }} + + {{ partialCached "announcement.html" . }} + + {{ partial "essentials/header.html" . }} {{ partial "search-modal.html" (dict "Context" . ) }} diff --git a/layouts/partials/essentials/script.html b/layouts/partials/essentials/script.html index 2201e40..4d11a0d 100755 --- a/layouts/partials/essentials/script.html +++ b/layouts/partials/essentials/script.html @@ -52,3 +52,7 @@ {{ partialCached "adsense-script.html" . }} + + + +{{ partialCached "announcement-script.html" . }}