diff --git a/hugo-blox-builder.code-workspace b/hugo-blox-builder.code-workspace
index 1dab6e1c..e974c885 100644
--- a/hugo-blox-builder.code-workspace
+++ b/hugo-blox-builder.code-workspace
@@ -24,7 +24,8 @@
"**/pagefind/**": true
},
"explorer.excludeGitIgnore": true,
-
+ "workbench.editor.labelFormat": "medium",
+ "breadcrumbs.enabled": true,
"npm.packageManager": "pnpm",
"editor.formatOnSave": true,
diff --git a/modules/blox-tailwind/layouts/_partials/blox/collection.html b/modules/blox-tailwind/blox/collection/block.html
similarity index 100%
rename from modules/blox-tailwind/layouts/_partials/blox/collection.html
rename to modules/blox-tailwind/blox/collection/block.html
diff --git a/modules/blox-tailwind/layouts/_partials/blox/cta-button-list.html b/modules/blox-tailwind/blox/cta-button-list/block.html
similarity index 100%
rename from modules/blox-tailwind/layouts/_partials/blox/cta-button-list.html
rename to modules/blox-tailwind/blox/cta-button-list/block.html
diff --git a/modules/blox-tailwind/layouts/_partials/blox/cta-card.html b/modules/blox-tailwind/blox/cta-card/block.html
similarity index 100%
rename from modules/blox-tailwind/layouts/_partials/blox/cta-card.html
rename to modules/blox-tailwind/blox/cta-card/block.html
diff --git a/modules/blox-tailwind/layouts/_partials/blox/cta-image-paragraph.html b/modules/blox-tailwind/blox/cta-image-paragraph/block.html
similarity index 100%
rename from modules/blox-tailwind/layouts/_partials/blox/cta-image-paragraph.html
rename to modules/blox-tailwind/blox/cta-image-paragraph/block.html
diff --git a/modules/blox-tailwind/layouts/_partials/blox/features.html b/modules/blox-tailwind/blox/features/block.html
similarity index 100%
rename from modules/blox-tailwind/layouts/_partials/blox/features.html
rename to modules/blox-tailwind/blox/features/block.html
diff --git a/modules/blox-tailwind/layouts/_partials/blox/hero.html b/modules/blox-tailwind/blox/hero/block.html
similarity index 100%
rename from modules/blox-tailwind/layouts/_partials/blox/hero.html
rename to modules/blox-tailwind/blox/hero/block.html
diff --git a/modules/blox-tailwind/layouts/_partials/blox/markdown.html b/modules/blox-tailwind/blox/markdown/block.html
similarity index 100%
rename from modules/blox-tailwind/layouts/_partials/blox/markdown.html
rename to modules/blox-tailwind/blox/markdown/block.html
diff --git a/modules/blox-tailwind/layouts/_partials/blox/resume-awards.html b/modules/blox-tailwind/blox/resume-awards/block.html
similarity index 100%
rename from modules/blox-tailwind/layouts/_partials/blox/resume-awards.html
rename to modules/blox-tailwind/blox/resume-awards/block.html
diff --git a/modules/blox-tailwind/layouts/_partials/blox/resume-biography-3.html b/modules/blox-tailwind/blox/resume-biography-3/block.html
similarity index 100%
rename from modules/blox-tailwind/layouts/_partials/blox/resume-biography-3.html
rename to modules/blox-tailwind/blox/resume-biography-3/block.html
diff --git a/modules/blox-tailwind/layouts/_partials/blox/resume-biography.html b/modules/blox-tailwind/blox/resume-biography/block.html
similarity index 100%
rename from modules/blox-tailwind/layouts/_partials/blox/resume-biography.html
rename to modules/blox-tailwind/blox/resume-biography/block.html
diff --git a/modules/blox-tailwind/layouts/_partials/blox/resume-experience.html b/modules/blox-tailwind/blox/resume-experience/block.html
similarity index 100%
rename from modules/blox-tailwind/layouts/_partials/blox/resume-experience.html
rename to modules/blox-tailwind/blox/resume-experience/block.html
diff --git a/modules/blox-tailwind/layouts/_partials/blox/resume-languages.html b/modules/blox-tailwind/blox/resume-languages/block.html
similarity index 100%
rename from modules/blox-tailwind/layouts/_partials/blox/resume-languages.html
rename to modules/blox-tailwind/blox/resume-languages/block.html
diff --git a/modules/blox-tailwind/layouts/_partials/blox/resume-skills.html b/modules/blox-tailwind/blox/resume-skills/block.html
similarity index 100%
rename from modules/blox-tailwind/layouts/_partials/blox/resume-skills.html
rename to modules/blox-tailwind/blox/resume-skills/block.html
diff --git a/modules/blox-tailwind/layouts/_partials/blox/stats.html b/modules/blox-tailwind/blox/stats/block.html
similarity index 100%
rename from modules/blox-tailwind/layouts/_partials/blox/stats.html
rename to modules/blox-tailwind/blox/stats/block.html
diff --git a/modules/blox-tailwind/layouts/_partials/blox/testimonials.html b/modules/blox-tailwind/blox/testimonials/block.html
similarity index 100%
rename from modules/blox-tailwind/layouts/_partials/blox/testimonials.html
rename to modules/blox-tailwind/blox/testimonials/block.html
diff --git a/modules/blox-tailwind/hugo.yaml b/modules/blox-tailwind/hugo.yaml
index b530c50c..73398b54 100644
--- a/modules/blox-tailwind/hugo.yaml
+++ b/modules/blox-tailwind/hugo.yaml
@@ -65,30 +65,6 @@ minify:
keepSpecialComments: true
sitemap:
changefreq: weekly
-module:
- hugoVersion:
- min: '0.148.2'
- extended: true
- imports:
- - path: github.com/HugoBlox/hugo-blox-builder/modules/blox-analytics
- mounts:
- - source: content
- target: content
- - source: static
- target: static
- - source: layouts
- target: layouts
- - source: data
- target: data
- - source: assets
- target: assets
- - source: i18n
- target: i18n
- - source: archetypes
- target: archetypes
- - disableWatch: true
- source: hugo_stats.json
- target: assets/notwatching/hugo_stats.json
security:
funcs:
getenv:
@@ -113,3 +89,62 @@ params:
date_format: 'Jan 2, 2006'
time_format: '3:04 PM'
address_format: en-us
+module:
+ hugoVersion:
+ min: '0.148.2'
+ extended: true
+ imports:
+ - path: github.com/HugoBlox/hugo-blox-builder/modules/blox-analytics
+ mounts:
+ - source: content
+ target: content
+ - source: static
+ target: static
+ - source: layouts
+ target: layouts
+ - source: data
+ target: data
+ - source: assets
+ target: assets
+ - source: i18n
+ target: i18n
+ - source: archetypes
+ target: archetypes
+ - disableWatch: true
+ source: hugo_stats.json
+ target: assets/notwatching/hugo_stats.json
+
+ # BLOX A) Server-rendered block templates (Go HTML)
+ - source: blox
+ target: layouts/partials/hbx/blocks
+ includeFiles:
+ - '**/block.html'
+
+ # BLOX B) Client islands (compiled with js.Build/js.Batch)
+ - source: blox
+ target: assets/js/hbx/blocks
+ includeFiles:
+ - '**/*.js'
+ - '**/*.ts'
+ - '**/*.jsx'
+ - '**/*.tsx'
+
+ # BLOX C) Block-specific CSS
+ - source: blox
+ target: assets/css/hbx/blocks
+ includeFiles:
+ - '**/*.css'
+
+ # BLOX D) Shared assets (optional)
+ - source: blox/shared/js
+ target: assets/js/hbx/shared
+ - source: blox/shared/css
+ target: assets/css/hbx/shared
+ - source: blox
+ target: assets/img/hbx/blocks
+ includeFiles:
+ - '**/*.png'
+ - '**/*.jpg'
+ - '**/*.jpeg'
+ - '**/*.svg'
+ - '**/*.webp'
diff --git a/modules/blox-tailwind/i18n/ar.yaml b/modules/blox-tailwind/i18n/ar.yaml
index 88e2de7f..b5d2e96a 100644
--- a/modules/blox-tailwind/i18n/ar.yaml
+++ b/modules/blox-tailwind/i18n/ar.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/ca.yaml b/modules/blox-tailwind/i18n/ca.yaml
index f73ca3d3..e1f0559c 100644
--- a/modules/blox-tailwind/i18n/ca.yaml
+++ b/modules/blox-tailwind/i18n/ca.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/cs.yaml b/modules/blox-tailwind/i18n/cs.yaml
index 9c505c0b..f1676fc6 100644
--- a/modules/blox-tailwind/i18n/cs.yaml
+++ b/modules/blox-tailwind/i18n/cs.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/da.yaml b/modules/blox-tailwind/i18n/da.yaml
index e1dcfb7f..231d0182 100644
--- a/modules/blox-tailwind/i18n/da.yaml
+++ b/modules/blox-tailwind/i18n/da.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/el.yaml b/modules/blox-tailwind/i18n/el.yaml
index 01b3d3d6..9a8e353b 100644
--- a/modules/blox-tailwind/i18n/el.yaml
+++ b/modules/blox-tailwind/i18n/el.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/en.yaml b/modules/blox-tailwind/i18n/en.yaml
index 4b89d06f..025ffbc0 100644
--- a/modules/blox-tailwind/i18n/en.yaml
+++ b/modules/blox-tailwind/i18n/en.yaml
@@ -322,7 +322,7 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
# Feedback widget
diff --git a/modules/blox-tailwind/i18n/es.yaml b/modules/blox-tailwind/i18n/es.yaml
index 969b3abf..c13f45d8 100644
--- a/modules/blox-tailwind/i18n/es.yaml
+++ b/modules/blox-tailwind/i18n/es.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/et.yaml b/modules/blox-tailwind/i18n/et.yaml
index 8e1147f3..6872017f 100644
--- a/modules/blox-tailwind/i18n/et.yaml
+++ b/modules/blox-tailwind/i18n/et.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/eu.yaml b/modules/blox-tailwind/i18n/eu.yaml
index 279a346f..bfd78566 100644
--- a/modules/blox-tailwind/i18n/eu.yaml
+++ b/modules/blox-tailwind/i18n/eu.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/fa.yaml b/modules/blox-tailwind/i18n/fa.yaml
index 4f7125a1..4c3cf356 100644
--- a/modules/blox-tailwind/i18n/fa.yaml
+++ b/modules/blox-tailwind/i18n/fa.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/fi.yaml b/modules/blox-tailwind/i18n/fi.yaml
index f7c7acbd..5284d083 100644
--- a/modules/blox-tailwind/i18n/fi.yaml
+++ b/modules/blox-tailwind/i18n/fi.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/hu.yaml b/modules/blox-tailwind/i18n/hu.yaml
index 7c50de80..d7f6813d 100644
--- a/modules/blox-tailwind/i18n/hu.yaml
+++ b/modules/blox-tailwind/i18n/hu.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/it.yaml b/modules/blox-tailwind/i18n/it.yaml
index 9bf7bd07..2286ab33 100644
--- a/modules/blox-tailwind/i18n/it.yaml
+++ b/modules/blox-tailwind/i18n/it.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/ja.yaml b/modules/blox-tailwind/i18n/ja.yaml
index f5884693..ebc97a6a 100644
--- a/modules/blox-tailwind/i18n/ja.yaml
+++ b/modules/blox-tailwind/i18n/ja.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/km.yaml b/modules/blox-tailwind/i18n/km.yaml
index 2462eff5..a6c162d6 100644
--- a/modules/blox-tailwind/i18n/km.yaml
+++ b/modules/blox-tailwind/i18n/km.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/ko.yaml b/modules/blox-tailwind/i18n/ko.yaml
index 48bcdf22..bb3dc7ca 100644
--- a/modules/blox-tailwind/i18n/ko.yaml
+++ b/modules/blox-tailwind/i18n/ko.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/lt.yaml b/modules/blox-tailwind/i18n/lt.yaml
index d3755abd..f72709a7 100644
--- a/modules/blox-tailwind/i18n/lt.yaml
+++ b/modules/blox-tailwind/i18n/lt.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/lv.yaml b/modules/blox-tailwind/i18n/lv.yaml
index 35cab2e4..9119bc6e 100644
--- a/modules/blox-tailwind/i18n/lv.yaml
+++ b/modules/blox-tailwind/i18n/lv.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/nl.yaml b/modules/blox-tailwind/i18n/nl.yaml
index e746e94f..969d7fb7 100644
--- a/modules/blox-tailwind/i18n/nl.yaml
+++ b/modules/blox-tailwind/i18n/nl.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/pl.yaml b/modules/blox-tailwind/i18n/pl.yaml
index 0d0a3ef5..55bb890d 100644
--- a/modules/blox-tailwind/i18n/pl.yaml
+++ b/modules/blox-tailwind/i18n/pl.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/pt.yaml b/modules/blox-tailwind/i18n/pt.yaml
index e2499c8a..fb92f20e 100644
--- a/modules/blox-tailwind/i18n/pt.yaml
+++ b/modules/blox-tailwind/i18n/pt.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/ro.yaml b/modules/blox-tailwind/i18n/ro.yaml
index fde6b7b3..ba315acd 100644
--- a/modules/blox-tailwind/i18n/ro.yaml
+++ b/modules/blox-tailwind/i18n/ro.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/ru.yaml b/modules/blox-tailwind/i18n/ru.yaml
index d56e14e1..8f4923e1 100644
--- a/modules/blox-tailwind/i18n/ru.yaml
+++ b/modules/blox-tailwind/i18n/ru.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/so.yaml b/modules/blox-tailwind/i18n/so.yaml
index ce159dfc..8f63234a 100644
--- a/modules/blox-tailwind/i18n/so.yaml
+++ b/modules/blox-tailwind/i18n/so.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/sv.yaml b/modules/blox-tailwind/i18n/sv.yaml
index b9f4057c..1af157a9 100644
--- a/modules/blox-tailwind/i18n/sv.yaml
+++ b/modules/blox-tailwind/i18n/sv.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/tr.yaml b/modules/blox-tailwind/i18n/tr.yaml
index a9e82015..3da983dd 100644
--- a/modules/blox-tailwind/i18n/tr.yaml
+++ b/modules/blox-tailwind/i18n/tr.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/uk.yaml b/modules/blox-tailwind/i18n/uk.yaml
index 0a7809ba..bbce6be2 100644
--- a/modules/blox-tailwind/i18n/uk.yaml
+++ b/modules/blox-tailwind/i18n/uk.yaml
@@ -262,4 +262,4 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
diff --git a/modules/blox-tailwind/i18n/vi.yaml b/modules/blox-tailwind/i18n/vi.yaml
index 2fc7f3fd..d92899d3 100644
--- a/modules/blox-tailwind/i18n/vi.yaml
+++ b/modules/blox-tailwind/i18n/vi.yaml
@@ -262,7 +262,7 @@
# Published with
- id: published_with
- translation: Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators.
+ translation: Made with {hugoblox}.
# Feedback widget
diff --git a/modules/blox-tailwind/layouts/_partials/functions/parse_block_v2.html b/modules/blox-tailwind/layouts/_partials/functions/parse_block_v2.html
index 62356f4d..7605b579 100644
--- a/modules/blox-tailwind/layouts/_partials/functions/parse_block_v2.html
+++ b/modules/blox-tailwind/layouts/_partials/functions/parse_block_v2.html
@@ -9,14 +9,9 @@
{{ range $r := site.Data.blox_aliases.renames }}
{{ $block_type = cond (eq $block_type $r.old) $r.new $block_type }}
{{ end }}
-{{ $block_path := printf "blox/%s.html" $block_type }}
+{{ $block_path := printf "hbx/blocks/%s/block.html" $block_type }}
{{ if not (templates.Exists (printf "_partials/%s" $block_path)) }}
- {{ $block_path_community := printf "blox/community/%s.html" $block_type }}
- {{ if not (templates.Exists (printf "_partials/%s" $block_path_community)) }}
- {{ errorf "%s uses a `%s` blox but the `%s` blox was not found. Check the name of the blox and try again. For a custom or community blox, upload it first to `hugo-blox/blox/community/%s.html`. For an All Access blox, upload it first to `hugo-blox/blox/all-access/%s.html`" $page.File.Path $block_type $block_type $block_type $block_type }}
- {{ else }}
- {{ $block_path = $block_path_community }}
- {{ end }}
+ {{ errorf "%s uses a `%s` block but the `%s` block was not found at `%s`. Check the name of the block and ensure it exists in the blox/%s/ directory." $page.File.Path $block_type $block_type $block_path $block_type }}
{{ end }}
{{/* Mermaid block: Workaround to make Hugo's .Page.Store.Set cascade up to the parent of headless pages */}}
diff --git a/modules/blox-tailwind/layouts/_partials/hbx/resolve.html b/modules/blox-tailwind/layouts/_partials/hbx/resolve.html
new file mode 100644
index 00000000..9113b781
--- /dev/null
+++ b/modules/blox-tailwind/layouts/_partials/hbx/resolve.html
@@ -0,0 +1,15 @@
+{{/* HBX resolver: maps a section { block: "
- {{ $is_sponsor := site.Params.i_am_a_sponsor | default false }}
- {{ $hide_published_with_footer := site.Params.power_ups.hide_published_with | default true }}
- {{ if not (and $is_sponsor $hide_published_with_footer) }}
- {{ $default := "Published with {hugoblox} — the free, {repo_link}open source{/repo_link} website builder that empowers creators." }}
- {{ $i18n_published_with := i18n "published_with" | default $default }}
- {{ if not (findRE "{hugoblox}" $i18n_published_with) }}
- {{ warnf "Please attribute Hugo Blox using `{hugoblox}` in the `published_with` text." }}
- {{ $i18n_published_with = $default }}
+ {{/* Attribution - PLEASE DO NOT REMOVE THIS, SUPPORT OPEN SOURCE */}}
+ {{- if not (site.Params.i_am_a_sponsor | default false) -}}
+ {{- $base := "https://hugoblox.com" -}}
+ {{- $tid := "" -}}
+ {{- $ref := .Site.Params.affiliate_ref | default "" -}}
+
+ {{/* Detect Template */}}
+ {{ $hugoblox_file := "" }}
+ {{ if fileExists "hugoblox.yaml" }}
+ {{ $hugoblox_file = readFile "hugoblox.yaml" }}
+ {{ if $hugoblox_file }}
+ {{ $hugoblox_data := $hugoblox_file | transform.Unmarshal }}
+ {{ $tid = $hugoblox_data.template.id | default "" }}
{{ end }}
- {{ $i18n_published_with = replace $i18n_published_with "{hugoblox}" "Hugo Blox Builder" | safeHTML }}
+ {{ end }}
+
+ {{/* Per-site variant selection */}}
+ {{- $brandOptions := slice "Hugo Blox" "Hugo Blox Builder" "Hugo Blox — Open Source" -}}
+ {{- $ctaWhenTemplate := slice "Duplicate this template →" "Clone this template →" "Build yours →" "Create yours →" "Build your site →" "Create your site →" -}}
+ {{- $ctaNoTemplate := slice "Start free →" "Build yours →" "Create yours →" "Build your site →" "Create your site →" -}}
+
+ {{- $seed := .Site.BaseURL -}}
+ {{- $h := md5 $seed -}}
+ {{- $digits := replaceRE "[^0-9]" "" $h -}}
+ {{- if lt (len $digits) 6 }}{{- $digits = printf "%s123456" $digits -}}{{- end -}}
+ {{- $n := int (substr $digits 0 6) -}}
+
+ {{- $brandText := index $brandOptions (mod $n (len $brandOptions)) -}}
+ {{- $ctaText := cond (ne $tid "")
+ (index $ctaWhenTemplate (mod $n (len $ctaWhenTemplate)))
+ (index $ctaNoTemplate (mod $n (len $ctaNoTemplate))) -}}
+
+ {{- $target := cond (ne $tid "")
+ (printf "%s/templates/%s/start" $base $tid)
+ (printf "%s/start" $base) -}}
+
+ {{- $brandHref := printf "%s?utm_source=site_footer&utm_medium=referral&utm_campaign=poweredby_oss&utm_content=brand_%s"
+ $base (cond (ne $tid "") (printf "%s" $tid) "na") -}}
+ {{- $ctaHref := printf "%s?utm_source=site_footer&utm_medium=referral&utm_campaign=poweredby_oss&utm_content=cta_%s"
+ $target (cond (ne $tid "") (printf "%s" $tid) "na") -}}
+ {{- if ne $ref "" -}}
+ {{- $brandHref = printf "%s&ref=%s" $brandHref $ref -}}
+ {{- $ctaHref = printf "%s&ref=%s" $ctaHref $ref -}}
+ {{- end -}}
+
+
+ {{ $published_with := "Made with {hugoblox}." }}
+ {{ $i18n_published_with := i18n "published_with" | default $published_with }}
+ {{ $i18n_ctaText := i18n "poweredby_button" | default $ctaText }}
+ {{ if not (findRE "{hugoblox}" $i18n_published_with) }}
+ {{ warnf "Please attribute Hugo Blox using `{hugoblox}` in the i18n `published_with` text or sponsor with All Access to remove attribution." }}
+ {{ $i18n_published_with = $published_with }}
+ {{ end }}
+ {{ $i18n_published_with = replace $i18n_published_with "{hugoblox}" (printf "%s" $brandHref $brandText) | safeHTML }}
{{ $i18n_published_with = replace $i18n_published_with "{repo_link}" "" | safeHTML }}
{{ $i18n_published_with = replace $i18n_published_with "{/repo_link}" "" | safeHTML }}
- {{ $i18n_published_with | replaceRE "{year}" now.Year | markdownify | emojify | safeHTML }}
- {{ end }}
-