24 Commits
Author SHA1 Message Date
George Cushen f017b3faef feat(gallery): justified, carousel, and slideshow layouts
Three new design.layout values, all driven by the existing items/resolver
infrastructure (no Hugo-side changes).

- justified: Flickr-style row-balanced layout. Each tile's flex-basis is
  derived from its precomputed aspect ratio at the configured row_height,
  flex-grow proportional to ratio so wider images claim more leftover
  row space. Pure CSS, no JS layout math. New design.row_height field
  (clamped 120-640, default 240). Last item capped at max-width: 50% so
  a lonely last-row image doesn't stretch grotesquely.
- carousel: CSS scroll-snap-type: x mandatory horizontal strip. Touch
  swipe is native; optional Preact prev/next arrows render on md+ only.
  Per-breakpoint flex-basis driven by design.columns (mobile always
  shows ~1 + peeking next). Full-bleed scroll via negative margins
  matched by inner padding so the strip feels native at any width.
- slideshow: Single-image presentation with crossfade transitions, dots,
  arrows, optional autoplay with pause-on-hover, touch swipe, and a
  click-through to the lightbox at full resolution. New design.autoplay
  (default false) and design.autoplay_interval (ms, min 1000, default
  5000) fields. Aspect defaults to "wide" for presentational feel.

Test site adds three new demos pointing at the same album folder so
users can compare layouts side-by-side. Block bundle grows from 39KB
to 66KB; pages without a gallery still ship 0KB (init.html gating).
2026-05-18 00:02:17 +01:00
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
George Cushen b67f09b8fd feat(gallery): add gallery block with grid/masonry layouts and lightbox
First-class image gallery block. Two layouts ship today - grid (uniform
tiles, configurable columns 1-6, aspect-ratio presets) and masonry
(CSS-columns Pinterest packing). Click-to-zoom lightbox built in Preact,
portalled to <body> so it escapes the section's `isolation: isolate`
stacking context; keyboard navigation (← → Esc), touch swipe, and body
scroll-lock included.

Two source modes: explicit items[] for curated galleries with per-image
captions/credits/links, or album: <folder> for drop-in folder loading
sorted by filename. Remote URLs (Unsplash/Pexels/CDNs) are passed
through unprocessed; local images get the full responsive variants +
inline base64 LQIP placeholder for instant first-paint over the eventual
sharp image.

Captions, titles, and credits are rendered through Hugo's RenderString
at build time (display: inline) - users get full Markdown (bold/italic/
code/links) in any of those fields with zero JS markdown parser. Alt
text falls back to plainified caption → humanised filename so screen
readers always have something useful.

Caption positions: below (default - accessibility-first), overlay
(magazine gradient), hover (clean grid reveal), none (lightbox-only).
Block-scoped CSS in the co-located style.css is picked up by the
existing block-CSS auto-discovery.

Test site: two demos under home.yaml (curated grid + auto-loaded
masonry) with 9 sample Picsum images stored under
test/assets/media/albums/gallery/ at varied aspect ratios.
2026-05-17 23:32:49 +01:00
George Cushen 4de0ad0af9 feat(map): add open-source map block (MapLibre GL + OpenFreeMap)
Single-location + multi-marker, side-by-side and map-only layouts.
Zero-config — no API key. MapLibre is vendored via vite and loaded
conditionally when a page contains a map block. Provider resolution
is a single switchable function so other tile providers can be added
later without changing the block contract.
2026-05-17 22:45:49 +01:00
George Cushen 237a7e2d59 fix(templates): use hoisted node-linker so Hugo v0.161 can resolve tailwindcss
Hugo v0.161's css.TailwindCSS reads node_modules/.bin/tailwindcss and
expects either a symlink or a Node-shebang script. pnpm's default
isolated linker creates shell wrappers (#!/bin/sh with NODE_PATH
manipulation), which Hugo rejects with "binary tailwindcss is not a
Node.js script". With node-linker=hoisted, pnpm flattens node_modules
and creates plain symlinks for Node-shebang bins — same shape npm
produces, which Hugo handles via its symlink branch in resolveNodeBin
(common/hexec/exec.go).

- Add .npmrc with node-linker=hoisted to all 9 templates and test/
- Verified end-to-end: academic-cv builds cleanly against published
  modules/blox with Hugo v0.161.1
- Kit root and modules/blox keep pnpm's isolated linker for monorepo
2026-05-02 03:29:43 +01:00
George Cushen b374e3d1d9 fix: portfolio filter limits, View All logic, and status badge configuration 2026-01-09 19:00:56 +00:00
George Cushen 93d45a6e89 build: standardise go v 2026-01-02 22:01:47 +00:00
George Cushen f4280ddb1c refactor: rename modules and update migration docs
BREAKING CHANGE
Module paths moved to `github.com/HugoBlox/kit` with new names:
- core `blox-tailwind` → `blox`
- analytics → `analytics`
- netlify → `integrations/netlify`
- slides (reveal) → `slides`
Update go.mod, module.yaml/params, scripts, tests, and v0.11 migration guide accordingly.
2026-01-02 20:59:48 +00:00
George Cushen 8441dd2471 refactor: rename repo 2026-01-02 19:02:59 +00:00
George Cushen 787ac94b5d feat: add Dev HUD & 15 Obsidian callouts; more collection filters
Dev tools
- Add HBX Dev HUD (floating button + panel) with live log viewer
- Add get-build-id helper to dedupe logs per build (during `hugo server` refreshes)

Callouts
- Implement Obsidian-compatible callouts (15+ types) with shared renderer
- Add i18n title translations (en, es, fr) for all callout types
- Deprecate `callout` shortcode with suppressible warning; keep working
- Migrate starters to Markdown callouts (>[!TYPE]) and update docs

Logging
- Centralize logging in partial `functions/logger` with info/warn/error levels
- Use fmt.Warnidf for suppressible warnings (consistent IDs)
- Only show info in Dev HUD/JSON (no longer use warnf for info logging); warn/error still printed in CLI
- Include source metadata and build ID on each entry

Blocks – Collection
- Add support for `content.filters.kinds`
- Add `content.filters.tags` (array) alongside existing `filters.tag` (string)

Build/Tailwind/JS
- Fix missing Tailwind v4 styles in Hugo render: include preact-built assets, extract classes from JSX/TSX to `@sources`
- Load Preact client per block, publish source maps in dev; on-demand Alpine

CI
- Re-implement fast fails with panicOnWarning now that info logging as warnf removed
- Fix package splitter change detection: strip trailing slashes; collapse paths to starter roots

Starters/Docs
- Restructure courses under `courses/hugo-blox/`
- Update menus and landing pages
- Replace deprecated callout usage in content and docs
- Replace missing hero icon `download` with `arrow-down-tray` in academic-cv guide

Icons
- Improve icon resolver: default pack inference, better fallback, and precise missing-icon warnings (with page ref)
2025-09-25 01:58:32 +01:00
George Cushen a2aaa838c0 feat(preact+landing): enable Preact block rendering + reusable landing page content system
## Preact Block Integration
- Enable Preact component detection for data-driven pages:
  - Fix init.html to resolve sections_source + per-section ref before Preact detection
  - Correct resource paths: blox/* → js/hbx/blocks/* (Hugo module mounts)
  - Update libraries.html to load Preact core + compiled block scripts
- Add dynamic icon rendering for Preact components:
  - Create Icon.jsx component with SVG decoding
  - Add get_icon_data.html partial for passing icon strings to Preact props
  - Update preact-wrapper.html to fetch icon data and inject into props
  - Wire hero component to render dynamic icons via <Icon svg={icon_svg} />
- Centralized logging system:
  - Add functions/logger.html to wrap warnf/errorf safely
  - Degrade to HTML comments in constrained contexts (content adapters)

## Reusable Landing Page Content System
- Add sections_source support:
  - Page front matter: sections_source: pages/<key> loads base from data/pages/<key>.yaml
  - Inline sections deep-merge over base by position; extras appended
- Add per-section ref system:
  - Any section: ref: blocks/<slug> loads from data/blocks/<slug>.yaml
  - Inline section properties deep-merge over ref (content/design submaps)
  - Enable content reuse across multiple landing pages
- Create reusable block library:
  - Add test/data/blocks/: hero_basic.yaml, features_basic.yaml
  - Add test/content/linked/index.md demo using refs with overrides
- Add pragmatic deep merge for content/design override handling

## Infrastructure & Schemas
- Update base-block.json schema:
  - Fix gradient structure: flat → nested (gradient.start/end/direction)
  - Fix color structure: string|{light,dark} (matches parse_block_v3.html)
  - Update hero schema to properly extend base via $ref
- Fix Tailwind source path generation:
  - Add tailwind_sources.html with test vs starter site logic
  - scripts/view-test.sh: export HUGO_BLOX_TEST_SITE=true
- Update block directory structure:
  - blox/<name>/config.html (was blox/<name>--CONFIG.html)
  - Apply to init.html + parse_block_v2.html
- Code quality improvements:
  - Biome config: match Prettier rules

## Content Adapters (Removed)
- Investigated Hugo content adapters for landing pages
- Found execution context limitations (early build phase, limited site methods)
- Archived to backups/content-adapters-*.zip and removed from test site
- Decision: use standard pages + data linking instead of adapters

This enables dynamic Preact rendering with proper icon support while providing a flexible, reusable content system for landing pages that maintains the "single file = page" mental model with optional advanced linking.
2025-09-22 22:18:03 +01:00
George Cushen 0c41b518dc feat: copy bibtex citations rather than downloading them
Close #3141
2025-08-17 22:16:26 +01:00
George Cushen 9b2e271c7c fix: links 2023-11-07 23:09:38 +00:00
George Cushen c80f023f21 test: port test site from using wowchemy-bootstrap to wowchemy-tailwind 2023-11-01 19:34:48 +00:00
Geo e11b64f36d test: update test site for renamed modules
See #2754
2022-06-28 19:54:43 +01:00
George Cushen 6c38574055 fix: cite shortcode in v5.5-dev is missing page context
Fix #2578
2022-01-03 15:21:25 +00:00
George Cushen 64c3c7e8a2 feat: rename repo to wowchemy-hugo-themes
Except repo name in module names as that would be a breaking change
2021-10-04 12:18:12 +01:00
George Cushen 42d1cf0063 feat: add support for video backgrounds
Via design > background > video > path

Also add flip option and move `advanced` params under `design` instead, whilst maintaining legacy compat.
2021-07-10 00:20:23 +01:00
Geo 028d5cbef5 fix: test for new module versions 2021-06-29 21:02:26 +01:00
George Cushen 4b0c292a07 feat: support Hugo 0.84.1 and full Go modules
Remove `markup` from test/config as Hugo 0.84.1 enables to inherit it
2021-06-29 20:19:20 +01:00
George Cushen 211d8b330b feat: add support for emoji lists
With new `emoji_list` shortcode. For example:

```
{{% emoji_list %}}
- 🔥 sdf
  - 🔥 sdf
- 🔥 sdf
{{% /emoji_list %}}
```
2021-02-10 07:55:09 +00:00
George Cushen e470c4e2cf feat: add options for branch, local_backend, and publish_mode (editorial flow)
Example for a YAML config:

```
  cms:
    branch: main
    local_backend: true
    publish_mode:
 ```

Close #2124
2021-02-09 21:44:47 +00:00
George Cushen 76478cb4a5 refactor: move test/ and yarn to repo root 2021-02-03 20:14:43 +00:00
George Cushen 3f1c4b4df2 refactor: move test/ and yarn to repo root
Also lint and format entire repo, beyond just wowchemy/ dir

URL encode `(` and `)` in `[#MadeWithWowchemy](...(..)...)` in Readme.md for Prettier
2021-02-03 20:11:16 +00:00