mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-05 18:14:12 +00:00
Hardened 1st batch of five homepage blocks by normalizing config types, clamping unsafe values, and guarding bad inputs so user‑supplied params fail safe without template errors. Changes coerce_bool.html and coerce_int.html: added shared coercion helpers for consistent, safe defaults across blocks. block.html: sanitized content/design inputs, robust user_groups parsing, safer role/affiliation/interest/link handling, and CTA URL validation. block.html: guarded avatar/banner/name/headings/bio, safe button/link resolution, and resilient parsing for affiliations, education, interests, and social links. block.html: hardened filters (kinds/folders/tags), safer sort/order handling, clamped numeric params, and archive link safety/fallbacks. block.html and block.html: defensive content rendering, clamped overlay opacity, and safe button link handling. schema.json, schema.json, schema.json: added view enum entries, added new_tab, and Biome formatting applied.
HugoBlox Kit Modules
Install HugoBlox features as Hugo Modules.
Quick start (most sites)
Add HugoBlox Kit core to config/_default/module.yaml (or hugo.yaml):
module:
imports:
- path: github.com/HugoBlox/kit/modules/blox
That’s it — analytics is already included when you use modules/blox.
Module map
- Core framework:
github.com/HugoBlox/kit/modules/blox- Layouts, blocks (Blox), Tailwind pipeline, shortcodes, defaults
- Includes:
github.com/HugoBlox/kit/modules/analytics
- Slides (content type):
github.com/HugoBlox/kit/modules/slides- Markdown slide decks (powered by Reveal.js)
- Integrations:
github.com/HugoBlox/kit/modules/integrations/*- Netlify:
github.com/HugoBlox/kit/modules/integrations/netlify
- Netlify:
Optional installs
Slides
module:
imports:
- path: github.com/HugoBlox/kit/modules/blox
- path: github.com/HugoBlox/kit/modules/slides
Netlify integration (security headers + redirects outputs)
module:
imports:
- path: github.com/HugoBlox/kit/modules/blox
- path: github.com/HugoBlox/kit/modules/integrations/netlify
Then enable Hugo outputs for Netlify:
outputs:
home: [HTML, RSS, headers, redirects]
Updating
hugo mod get -u github.com/HugoBlox/kit/modules/blox@main
hugo mod tidy