Skip to content

v0.2.5

Choose a tag to compare

@github-actions github-actions released this 26 Jul 20:18
7b253cc
  • 2.7 — Make the page shell configurable and hookable. <body>'s classes
    now come from [params.twClasses] body and bodyDark instead of being
    hardcoded in baseof.html; the wrapper <div> gains a stable site-shell
    class with position: relative; and the dev-only tw-size-indicator partial
    moves inside that wrapper, so <body> has exactly one element child in every
    environment. bodyDark is separate from body so that customizing the body
    font cannot silently disable dark mode, and so darkMode = "off" still emits
    no dark: variants (unchanged from v0.2.4).
  • 4.1 — Ship ryderTrack, an Alpine.data() component that reads
    data-track-event / data-track-props off the clicked element and forwards
    them to the configured analytics provider (PostHog or Plausible). Missing
    providers no-op and malformed props warn and degrade to {} — neither breaks
    the handler.
  • 4.2 — Ship ryderForm, an Alpine.data() component that POSTs a form as
    JSON to data-form-action, exposes status plus isIdle/isLoading/
    isSuccess/isError, honors a _gotcha honeypot, and fires an optional
    data-track-event on success.
  • 4.4 — Add assets/js/cspLint.js, a development-only linter that warns in
    the console about Alpine directives the CSP evaluator cannot run — references
    to browser globals, and arrow functions — naming the offending element. It is
    never loaded outside hugo.Environment == "development".
  • 4.5 — Document the CSP-Alpine restriction in README.md, along with both
    new components and assets/js/extended.js, the theme's sanctioned custom-JS
    hook, which was previously undocumented.
  • 2.1 — Ship _default/list-plain.html (title + .Content, no
    pagination/card grid) for data-driven singleton sections, selected via
    Hugo's own layout front-matter field; ship partials/utils/data-items.html,
    a returning partial for the .Site.Data.<name>.items | default slice idiom.
  • 2.3 — Widen the OG image resolver with a front-matter og_image escape
    hatch, checked before the existing bundle-resource / og_image_default
    chain (which is otherwise unchanged).
  • 2.4 — Support hideIfEmptyData under [menus.<id>.params], naming a
    data/*.json file whose items array must be non-empty for that menu
    entry to render.
  • 2.5 — Resolve a page-overridable navClass (or twClasses.nav) in
    header.html and pass it into the menu partial, so a single page can
    restyle just the nav without forking header.html into a new headerType
    variant. Documented as the "one variant plus .Param for the skin"
    pattern.
  • 5.1 — Ship youtube-embed and spotify-embed shortcodes, following
    the soundcloud/openstreetmap pattern of auto-registering their iframe
    host in CSP frame-src. Named distinctly from Hugo's built-in youtube
    shortcode rather than overriding it.
  • 5.2 — Add a video-lightbox shortcode and a videoLightbox
    Alpine.data() component beside the existing imageGallery (images
    only); the iframe's src is only set once the modal opens.
  • 5.3utils/socialslist.html now accepts a flat name → URL map (what
    Decap CMS emits) in addition to the original {main:[...]} shape, and
    ships inline SVGs for Instagram, TikTok, Apple Music, Tidal, and Spotify
    for entries with no icon field, rather than widening the tree-shaken
    Font Awesome brand set.
  • 5.4 — Add logo_wrapperClass; the wrapper chrome (background, hover
    state, padding) around the logo is now dropped automatically once
    logo_png is set. logo_png's .Param (page-overridable) contract is
    documented as authoritative.
  • 5.5 — Parameterize head/favicon.html via [params.favicon] (ico,
    version, svg, appleTouchIcon, webmanifest), each defaulting to a
    file the theme already ships.
  • 5.6_default/home.html now reads showHomeFeed via .Param
    instead of site.Params, so a page-level override (e.g. a cascade) is
    honored instead of being a silent no-op.
  • Issue #3 (partial) — Add [params.fonts] (family,
    googleFontsFamily, disableGoogleFonts), covering head/fonts.html's
    Google Fonts URL and a new --ryder-font-family CSS custom property that
    assets/css/main.css's .resp-sharing-button rule now reads. Does not
    close issue #3 — see docs/specs/v0.3.md's cross-check for what remains.

Breaking

None. Everything above is additive or opt-in.

Migration note — 2.7 changes the DOM around <body>

Two structural changes ship in 2.7. Neither changes rendered output on a stock
site, but both can affect a site with its own CSS. Grep your CSS for body >
before upgrading.

  1. The wrapper <div> is now position: relative. It was unpositioned, so
    it did not establish a containing block. Any position: absolute descendant
    that was previously resolving against the viewport (or against some further
    ancestor) now resolves against the shell instead, and may move. Audit
    absolutely-positioned elements, particularly full-bleed and off-canvas
    elements that relied on inset-0 reaching the viewport.

  2. tw-size-indicator moved inside the wrapper. In non-production builds it
    used to render as a sibling of the wrapper, so <body> had two element
    children in development and one in production. Any selector written against
    <body>'s direct children — body > div, body > *:first-child,
    :nth-child() on that level, or a :not() hack written to skip the
    indicator — was already environment-dependent and will now behave
    differently.

    The known real-world case is a rule of the shape:

    body:has(.some-nav) > div:not(.fixed) { position: relative; }

    That rule exists only to select the wrapper while skipping the dev-only
    indicator. It can now be deleted outright: the theme provides both the hook
    and the positioning.

    /* replace the above with nothing, or target the hook directly */
    .site-shell { … }

If you override layouts/_default/baseof.html in your own site, your copy
shadows the theme's and none of this applies until you re-sync it — which also
means you will not get twClasses.body or site-shell until you do.