added announcement module

This commit is contained in:
Somrat 2024-04-17 09:21:08 +06:00
parent 2f8cd66481
commit 5d1e77ab6a
5 changed files with 19 additions and 0 deletions

View File

@ -53,6 +53,9 @@ path = "github.com/gethugothemes/hugo-modules/components/social-share"
[[imports]] [[imports]]
path = "github.com/gethugothemes/hugo-modules/components/cookie-consent" path = "github.com/gethugothemes/hugo-modules/components/cookie-consent"
[[imports]]
path = "github.com/gethugothemes/hugo-modules/components/announcement"
[[imports]] [[imports]]
path = "github.com/gethugothemes/hugo-modules/components/custom-script" path = "github.com/gethugothemes/hugo-modules/components/custom-script"

View File

@ -52,6 +52,12 @@ show_description = true
show_tags = true show_tags = true
show_categories = 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 meta data for OpenGraph / Twitter Card
# seo module: https://github.com/gethugothemes/hugo-modules/tree/master/seo-tools/basic-seo # seo module: https://github.com/gethugothemes/hugo-modules/tree/master/seo-tools/basic-seo

View File

@ -5,6 +5,7 @@ go 1.20
require ( require (
github.com/gethugothemes/hugo-modules/accordion v0.0.0-20240414052440-de0e16b3cfb6 // indirect 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/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/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/custom-script v0.0.0-20240414052440-de0e16b3cfb6 // indirect
github.com/gethugothemes/hugo-modules/components/preloader 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/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/table-of-contents v0.0.0-20240414052440-de0e16b3cfb6 // indirect
github.com/gethugothemes/hugo-modules/videos 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
) )

View File

@ -29,6 +29,10 @@
{{ end }} {{ end }}
<!-- cookie consent -->
{{ partialCached "announcement.html" . }}
<!-- header (don't cache it) --> <!-- header (don't cache it) -->
{{ partial "essentials/header.html" . }} {{ partial "essentials/header.html" . }}
{{ partial "search-modal.html" (dict "Context" . ) }} {{ partial "search-modal.html" (dict "Context" . ) }}

View File

@ -52,3 +52,7 @@
<!-- google adsense --> <!-- google adsense -->
{{ partialCached "adsense-script.html" . }} {{ partialCached "adsense-script.html" . }}
<!-- cookie consent -->
{{ partialCached "announcement-script.html" . }}