diff --git a/modules/blox-analytics/layouts/_partials/blox-analytics/services/baidu_tongji.html b/modules/blox-analytics/layouts/_partials/blox-analytics/services/baidu_tongji.html index eb2a25cf..9f60d70d 100644 --- a/modules/blox-analytics/layouts/_partials/blox-analytics/services/baidu_tongji.html +++ b/modules/blox-analytics/layouts/_partials/blox-analytics/services/baidu_tongji.html @@ -1,4 +1,4 @@ -{{ $baidu_tongji := site.Params.marketing.analytics.baidu_tongji | default "" }} +{{ $baidu_tongji := site.Params.hugoblox.analytics.baidu.site_id | default "" }} {{ if hugo.IsProduction | and $baidu_tongji }} diff --git a/modules/blox-analytics/layouts/_partials/blox-analytics/services/google_analytics.html b/modules/blox-analytics/layouts/_partials/blox-analytics/services/google_analytics.html index 71e2394a..dde79895 100644 --- a/modules/blox-analytics/layouts/_partials/blox-analytics/services/google_analytics.html +++ b/modules/blox-analytics/layouts/_partials/blox-analytics/services/google_analytics.html @@ -1,8 +1,8 @@ -{{ $ga := site.Params.marketing.analytics.google_analytics | default "" }} +{{ $ga := site.Params.hugoblox.analytics.google.measurement_id | default "" }} {{ if hugo.IsProduction | and $ga }} -{{ $gtag_config := cond (site.Params.features.privacy_pack.enable | default false) "{ 'anonymize_ip': true }" "{}" }} +{{ $gtag_config := cond (site.Params.hugoblox.privacy.anonymize_analytics | default true) "{ 'anonymize_ip': true }" "{}" }} diff --git a/modules/blox-analytics/layouts/_partials/blox-analytics/services/plausible.html b/modules/blox-analytics/layouts/_partials/blox-analytics/services/plausible.html index 4822f8d0..47cf517b 100644 --- a/modules/blox-analytics/layouts/_partials/blox-analytics/services/plausible.html +++ b/modules/blox-analytics/layouts/_partials/blox-analytics/services/plausible.html @@ -1,4 +1,4 @@ -{{ $plausible := site.Params.marketing.analytics.plausible | default "" }} +{{ $plausible := site.Params.hugoblox.analytics.plausible.domain | default "" }} {{ if hugo.IsProduction | and $plausible }} diff --git a/modules/blox-analytics/layouts/_partials/blox-analytics/verification.html b/modules/blox-analytics/layouts/_partials/blox-analytics/verification.html index 9be42502..ea50d845 100644 --- a/modules/blox-analytics/layouts/_partials/blox-analytics/verification.html +++ b/modules/blox-analytics/layouts/_partials/blox-analytics/verification.html @@ -1,25 +1,25 @@ {{/* Site Verification with Third Party Services */}} -{{- with site.Params.marketing.verification.google -}} +{{- with site.Params.hugoblox.verification.google -}} {{- end -}} -{{- with site.Params.marketing.verification.bing -}} +{{- with site.Params.hugoblox.verification.bing -}} {{- end -}} -{{- with site.Params.marketing.verification.yandex -}} +{{- with site.Params.hugoblox.verification.yandex -}} {{- end -}} -{{- with site.Params.marketing.verification.pinterest -}} +{{- with site.Params.hugoblox.verification.pinterest -}} {{- end -}} -{{- with site.Params.marketing.verification.baidu -}} +{{- with site.Params.hugoblox.verification.baidu -}} {{- end -}} -{{ with site.Params.marketing.verification.naver }} +{{ with site.Params.hugoblox.verification.naver }} {{- end -}} \ No newline at end of file diff --git a/modules/blox-plugin-netlify/src/layouts/index.headers b/modules/blox-plugin-netlify/src/layouts/index.headers index 4132d275..26ac457c 100644 --- a/modules/blox-plugin-netlify/src/layouts/index.headers +++ b/modules/blox-plugin-netlify/src/layouts/index.headers @@ -1,8 +1,9 @@ -{{- $csp_policy := site.Params.security.csp.policy | default "" -}} -{{- $csp_report_only := site.Params.security.csp.report_only | default false -}} -{{- $allow_frame := site.Params.security.allow_frame | default false -}} +{{- $csp_policy := site.Params.hugoblox.security.csp.policy | default "" -}} +{{- $csp_report_only := site.Params.hugoblox.security.csp.report_only | default false -}} +{{- $frame_options := site.Params.hugoblox.security.frame_options | default "deny" -}} +{{- $allow_frame := eq $frame_options "allow" -}} {{- $default_perms := "accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()" -}} -{{- $permissions_policy := site.Params.security.permissions.policy | default $default_perms -}} +{{- $permissions_policy := site.Params.hugoblox.security.permissions_policy | default $default_perms -}} # Netlify headers # Automatically generated # Documentation: https://docs.hugoblox.com/hugo-tutorials/security/ diff --git a/modules/blox-tailwind/layouts/_partials/comments.html b/modules/blox-tailwind/layouts/_partials/comments.html index c364dcaf..3c9ce4a2 100644 --- a/modules/blox-tailwind/layouts/_partials/comments.html +++ b/modules/blox-tailwind/layouts/_partials/comments.html @@ -1,4 +1,4 @@ -{{ $provider := trim (site.Params.features.comment.provider | lower) " " }} +{{ $provider := trim (site.Params.hugoblox.comments.provider | lower) " " }} {{ if $provider }} {{ $provider_tpl := printf "comments/%s.html" $provider }} diff --git a/modules/blox-tailwind/layouts/_partials/comments/commento.html b/modules/blox-tailwind/layouts/_partials/comments/commento.html index 1c9e2d06..97596af4 100644 --- a/modules/blox-tailwind/layouts/_partials/comments/commento.html +++ b/modules/blox-tailwind/layouts/_partials/comments/commento.html @@ -1,3 +1,3 @@
-{{ $url := (printf "%s/js/commento.js" (site.Params.features.comment.commento.url | default "https://cdn.commento.io")) }} +{{ $url := (printf "%s/js/commento.js" (site.Params.hugoblox.comments.commento.url | default "https://cdn.commento.io")) }} diff --git a/modules/blox-tailwind/layouts/_partials/comments/disqus.html b/modules/blox-tailwind/layouts/_partials/comments/disqus.html index 2fe6f1f3..ec1af0e6 100644 --- a/modules/blox-tailwind/layouts/_partials/comments/disqus.html +++ b/modules/blox-tailwind/layouts/_partials/comments/disqus.html @@ -1,4 +1,4 @@ -{{ if site.Params.features.comment.disqus.shortname }} +{{ if site.Params.hugoblox.comments.disqus.shortname }}
diff --git a/modules/blox-tailwind/layouts/_partials/jsonld/main.html b/modules/blox-tailwind/layouts/_partials/jsonld/main.html index 2c0e51ce..0bebb29d 100644 --- a/modules/blox-tailwind/layouts/_partials/jsonld/main.html +++ b/modules/blox-tailwind/layouts/_partials/jsonld/main.html @@ -1,6 +1,6 @@ {{ $page := .page }} {{ $summary := .summary }} -{{ $site_type := site.Params.marketing.seo.site_type | default "Person" }} +{{ $site_type := site.Params.hugoblox.identity.type | humanize | default "Person" }} {{- if $page.IsHome -}} diff --git a/modules/blox-tailwind/layouts/_partials/jsonld/website.html b/modules/blox-tailwind/layouts/_partials/jsonld/website.html index ec84542a..8a144d7c 100644 --- a/modules/blox-tailwind/layouts/_partials/jsonld/website.html +++ b/modules/blox-tailwind/layouts/_partials/jsonld/website.html @@ -2,7 +2,7 @@ { "@context": "https://schema.org", "@type": "WebSite", - {{- if site.Params.features.search.provider }} + {{- if site.Params.hugoblox.search.enable }} "potentialAction": { "@type": "SearchAction", "target": {{ printf "%s?q={search_term_string}" site.BaseURL }}, diff --git a/modules/blox-tailwind/layouts/_partials/libraries.html b/modules/blox-tailwind/layouts/_partials/libraries.html index a46ecfd5..92eb3fa2 100644 --- a/modules/blox-tailwind/layouts/_partials/libraries.html +++ b/modules/blox-tailwind/layouts/_partials/libraries.html @@ -30,7 +30,7 @@ {{ end }} {{/* Show site search? */}} -{{ $show_search := site.Params.header.navbar.show_search | default false }} +{{ $show_search := site.Params.hugoblox.header.search | default false }} {{/* Load Alpine JS extension? */}} {{/* Alpine is needed for search modal and other interactive components */}} @@ -85,7 +85,7 @@ {{ end }} {{/* Katex */}} -{{ if (.Page.HasShortcode "math") | or .Params.math | or site.Params.features.math.enable }} +{{ if (.Page.HasShortcode "math") | or .Params.math | or site.Params.hugoblox.content.math.enable }} {{ $katex_css := resources.Get "dist/lib/katex/katex.min.css" }} {{ $katex_css = $katex_css | resources.Fingerprint "sha256" }} diff --git a/modules/blox-tailwind/layouts/_partials/page_author_card.html b/modules/blox-tailwind/layouts/_partials/page_author_card.html index d0c9df05..eee366cf 100644 --- a/modules/blox-tailwind/layouts/_partials/page_author_card.html +++ b/modules/blox-tailwind/layouts/_partials/page_author_card.html @@ -1,6 +1,6 @@ {{ $page := .page }} {{ $author_page := .author_page }} -{{ $site_type := site.Params.marketing.seo.site_type | default "Person" }} +{{ $site_type := site.Params.hugoblox.identity.type | humanize | default "Person" }} {{- $has_profile := not (eq nil $author_page.Params.superuser) -}} {{/* Check an author profile exists. */}} @@ -11,7 +11,7 @@ {{ $profile_url = site.BaseURL }} {{ end }} {{ $avatar := ($author_page.Resources.ByType "image").GetMatch "*avatar*" }} - {{ $avatar_shape := site.Params.features.avatar.shape | default "circle" }} + {{ $avatar_shape := site.Params.hugoblox.layout.avatar_shape | default "circle" }}
{{ if $avatar }} diff --git a/modules/blox-tailwind/layouts/_partials/page_edit.html b/modules/blox-tailwind/layouts/_partials/page_edit.html index 0adf4bcb..4b879caa 100644 --- a/modules/blox-tailwind/layouts/_partials/page_edit.html +++ b/modules/blox-tailwind/layouts/_partials/page_edit.html @@ -1,17 +1,17 @@ {{/* Add link to let visitors edit the page on GitHub. */}} {{/* Perform short-circuit check that page is backed by a file. */}} -{{ if and .File .Params.editable | and site.Params.features.repository.url }} +{{ if and .File .Params.editable | and site.Params.hugoblox.repository.url }} {{/* Get language subfolder for multilingual sites. */}} {{/* Limitations: the subfolder param, `.contentDir`, is unexposed in the Hugo `site` API so we attempt to workaround this issue. */}} {{ $content_dir := "content" }} -{{ if site.Params.features.repository.content_dir }} - {{ $content_dir = site.Params.features.repository.content_dir }} +{{ if site.Params.hugoblox.repository.content_dir }} + {{ $content_dir = site.Params.hugoblox.repository.content_dir }} {{else}} {{/* Attempt to get content dir from the LanguagePrefix URI, but defaultContentLanguageInSubdir can break this assumption. */}} {{ $content_dir = cond site.IsMultiLingual (cond (ne .Site.LanguagePrefix "") (printf "%s%s" $content_dir .Site.LanguagePrefix) $content_dir) $content_dir }} {{end}}

- + 📝 {{ i18n "edit_page" | default "Edit this page" }}

diff --git a/modules/blox-tailwind/layouts/_partials/site_footer.html b/modules/blox-tailwind/layouts/_partials/site_footer.html index a124b446..1f2a6661 100644 --- a/modules/blox-tailwind/layouts/_partials/site_footer.html +++ b/modules/blox-tailwind/layouts/_partials/site_footer.html @@ -3,7 +3,7 @@ {{ partial "functions/get_hook" (dict "hook" "footer-start" "context" .) }} {{/* Load footer block */}} - {{- $footer_config := site.Params.footer | default dict -}} + {{- $footer_config := site.Params.hugoblox.footer | default dict -}} {{- $footer_section_name := partial "hbx/resolve-block-param" (dict "config" $footer_config "context" "footer") | default "minimal" -}} {{ $footer_section_path := printf "components/footers/%s.html" $footer_section_name }} {{ if not (templates.Exists (printf "_partials/%s" $footer_section_path)) }} @@ -12,10 +12,37 @@ {{ partial $footer_section_path . }} {{/* Attribution - PLEASE DO NOT REMOVE THIS, SUPPORT OPEN SOURCE */}} - {{- if not (site.Params.i_am_a_sponsor | default false) -}} + + {{/* Check for Pro license key */}} + {{- $license_key := getenv "HUGO_BLOX_LICENSE" -}} + {{- $has_pro_license := false -}} + + {{- if $license_key -}} + {{/* Validate UUID v4 format */}} + {{- $uuid_pattern := "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" -}} + {{- $is_valid_format := findRE $uuid_pattern (lower $license_key) -}} + {{- $has_pro_license = gt (len $is_valid_format) 0 -}} + {{- end -}} + + {{/* Check user preference */}} + {{- $wants_to_hide := site.Params.hugoblox.pro.hide_attribution | default false -}} + + {{/* Determine if we show attribution */}} + {{- $show_attribution := true -}} + + {{- if $has_pro_license -}} + {{/* Pro user - respect their choice */}} + {{- $show_attribution = not $wants_to_hide -}} + {{- else if $wants_to_hide -}} + {{/* Free user trying to hide - show warning and attribution */}} + {{- warnf "Attribution removal requires a Pro subscription. Get Pro at https://hugoblox.com/pro \nAlready subscribed to Pro? Reach out in the Pro Discord channel for support." -}} + {{- $show_attribution = true -}} + {{- end -}} + + {{- if $show_attribution -}} {{- $base := "https://hugoblox.com" -}} {{- $tid := "" -}} - {{- $ref := .Site.Params.affiliate_ref | default "" -}} + {{- $ref := .Site.Params.hugoblox.pro.affiliate_code | default "" -}} {{/* Detect Template */}} {{ $hugoblox_file := "" }} @@ -82,6 +109,6 @@ {{ $i18n_ctaText }}

- {{- end -}} + {{- end -}}{{/* end $show_attribution */}} diff --git a/modules/blox-tailwind/layouts/_partials/site_footer_license.html b/modules/blox-tailwind/layouts/_partials/site_footer_license.html index 52bd446e..bc52bfd3 100644 --- a/modules/blox-tailwind/layouts/_partials/site_footer_license.html +++ b/modules/blox-tailwind/layouts/_partials/site_footer_license.html @@ -1,8 +1,8 @@ {{/* Display copyright license. */}} {{ $branding := partialCached "functions/get_branding" . "branding" }} -{{ $copyright_license := .Params.copyright.license | default site.Params.footer.copyright.license }} -{{ $notice := .Params.copyright.notice | default site.Params.footer.copyright.notice }} +{{ $copyright_license := .Params.copyright.license | default site.Params.hugoblox.copyright.license }} +{{ $notice := .Params.copyright.notice | default site.Params.hugoblox.copyright.notice }} {{ if ($copyright_license.enable | default false) }} diff --git a/modules/blox-tailwind/layouts/_partials/site_head.html b/modules/blox-tailwind/layouts/_partials/site_head.html index d88d90ad..48827ed1 100644 --- a/modules/blox-tailwind/layouts/_partials/site_head.html +++ b/modules/blox-tailwind/layouts/_partials/site_head.html @@ -28,8 +28,8 @@ {{/* Generate page description. */}} {{ $desc := "" }} {{ $desc = partial "functions/get_summary" . }} - {{ if site.Params.marketing.seo.description | and (not $desc) }} - {{ $desc = site.Params.marketing.seo.description }} + {{ if site.Params.hugoblox.identity.description | and (not $desc) }} + {{ $desc = site.Params.hugoblox.identity.description }} {{ end }} {{ if not $desc }} {{ $desc = $superuser_role }} @@ -47,7 +47,7 @@ {{ partial "functions/theme_generator.html" $theme_config }} {{/* Demo Theme Pack Styles (if enabled) */}} - {{ if site.Params.header.navbar.show_theme_picker }} + {{ if site.Params.hugoblox.header.theme_picker }} {{ partial "functions/demo_theme_styles.html" (dict "typography" $theme_config.typography "layout" $theme_config.layout) }} {{ end }} @@ -150,7 +150,7 @@ {{ if ne $title $branding.site_title }}{{ $title = printf "%s | %s" $title $branding.site_title }}{{ end }} {{ end }} - {{ with site.Params.marketing.seo.twitter }} + {{ with site.Params.hugoblox.identity.social.twitter }} {{ end }} diff --git a/modules/blox-tailwind/layouts/_partials/views/card.html b/modules/blox-tailwind/layouts/_partials/views/card.html index c987580a..5bcd8acb 100644 --- a/modules/blox-tailwind/layouts/_partials/views/card.html +++ b/modules/blox-tailwind/layouts/_partials/views/card.html @@ -173,7 +173,7 @@ {{ end }} {{ if $showDate }} {{ end }} {{ if and $showDate $showReadTime }} diff --git a/modules/blox-tailwind/layouts/_partials/views/citation.html b/modules/blox-tailwind/layouts/_partials/views/citation.html index 79f73791..6c1c1eb7 100644 --- a/modules/blox-tailwind/layouts/_partials/views/citation.html +++ b/modules/blox-tailwind/layouts/_partials/views/citation.html @@ -5,7 +5,7 @@ {{/* APA Style */}} - {{ if eq (site.Params.publications.citation_style | default "apa") "apa" }} + {{ if eq (site.Params.hugoblox.content.citations.style | default "apa") "apa" }}