Files
HugoBlox-kit/modules
George Cushen bdd3820f27 feat(gallery): sidecar files, EXIF/IPTC, and page-bundle auto-discovery
Adds the metadata pipeline that makes the gallery block self-curating.
Per-image metadata now resolves through a four-tier waterfall, first
non-empty source wins:

  1. Frontmatter (items[].caption etc.)
  2. Sidecar file next to the image - tries six patterns:
     <name>.yaml / .yml / .json and <basename>.yaml / .yml / .json,
     looked up in both site assets and the page bundle (covers album
     mode and page-resource mode alike).
  3. Embedded IPTC/EXIF via Hugo's .Exif.Tags - caption from
     Caption-Abstract / ImageDescription / XPSubject / Description,
     credit from By-line / Artist / Creator. Wrapped in `try` so
     non-EXIF formats and bad metadata never break the build.
  4. Humanised filename - alt fallback only; captions stay empty
     rather than fabricated from filenames.

Also adds a third source mode - content.page_resources: true -
auto-discovers image resources attached to the current page bundle.
Drop-in for blog posts and project pages where photos live next to
index.md; sidecar lookup works inside the bundle too.

Fixes a leading-slash quirk: Resource.Name returns "/media/..." for
site assets but a bare path for page-bundle resources; the path is
now normalised so sidecar lookups land in either layout.

Test site adds two sidecar YAML files (04-cabin.jpg.yaml and
06-mountain.jpg.yaml) - the masonry album demo now picks up titles,
markdown captions, and links from those sidecars without listing any
items[].
2026-05-17 23:45:27 +01:00
..
2026-01-02 22:01:47 +00:00
2026-01-02 22:19:16 +00:00

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

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