Skip to content

Releases: A-Line-Services/go-cms

v0.1.21

Choose a tag to compare

@Arthurdw Arthurdw released this 09 Mar 11:44
2d3cbb0

What's new

  • Deploy version tracking: During build, writes __cms_version file to the output directory containing the deploy version timestamp from the CMS API. This enables the CMS to verify deployments are live by fetching this file from the production domain.

v0.1.20

Choose a tag to compare

@Arthurdw Arthurdw released this 09 Mar 10:34
e940202

feat: add RichTextLinkClass config for site-defined link styling

Sites can now set Config.RichTextLinkClass (e.g. "cms-link") to have the class injected onto <a> tags in rich text content at render time. A <meta name="cms-link-class"> tag is emitted once per page so the CMS live preview bridge can apply the same transformation.

v0.1.18

Choose a tag to compare

@Arthurdw Arthurdw released this 06 Mar 15:58
e77db99

What's new

  • File field type: New FileValue type with File() and FileOr() accessors on both PageData and EntryData for CMS-managed downloadable files (PDFs, documents, etc.)

v0.1.17

Choose a tag to compare

@Arthurdw Arthurdw released this 06 Mar 10:35
25f203b

What's Changed

  • feat: Populate Locales and defaultLocale on PageData in template and sync renders, so conditional UI (e.g. language switchers guarded by len(p.Locales) > 1) renders correctly in CMS preview and sync mode.
  • resolveLocale now always fetches and caches the locale list on the App struct, even when config.Locale is already set.

v0.1.16

Choose a tag to compare

@Arthurdw Arthurdw released this 06 Mar 09:53
04abeae

Bug Fix

  • fix: defensive locale filtering in subcollection and page data resolution — resolveSubcollections() and resolvePageData() now filter field values by locale, preventing language mixing when the API returns mixed-locale subcollection data.

v0.1.15

Choose a tag to compare

@Arthurdw Arthurdw released this 05 Mar 16:06
844c892

What's new

  • Rich text image downloading: During static builds with DownloadMedia: true, the build pipeline now scans rich text HTML for <img> tags with data-media-id attributes (inserted by the CMS WYSIWYG editor). For each image found, a fresh signed URL is fetched via the media API, the image is downloaded locally, src is rewritten to the local path, and the data-media-id/data-site-id attributes are stripped from production output.

This ensures rich text images are self-hosted in static builds, just like structured image fields.

v0.1.14

Choose a tag to compare

@Arthurdw Arthurdw released this 05 Mar 13:39
aa8b57d

Parallelize image variant downloads during builds. Each image's ~14 variants (full, LQIP, 4 widths x 3 formats) are now downloaded concurrently instead of sequentially.

v0.1.13

Choose a tag to compare

@Arthurdw Arthurdw released this 05 Mar 13:03
c1ba80d

Fix stale generated code in toggle component — v0.1.12 emitted data-cms-toggle instead of data-cms-field + data-cms-type="toggle".

v0.1.12

Choose a tag to compare

@Arthurdw Arthurdw released this 05 Mar 12:07
7baa933

New: Toggle field type

Adds a new toggle field type for conditionally showing/hiding CMS-managed elements on the live site.

API additions

  • PageData.Toggle(key string) bool — returns the boolean field value (false if missing)
  • PageData.ToggleOr(key string, fallback bool) bool — returns CMS value or fallback; returns true when fields is nil (template/sync renders for schema discovery)
  • EntryData.Toggle(key string) bool — same as above for subcollection entries
  • EntryData.ToggleOr(key string, fallback bool) bool — same as above for subcollection entries

Components

  • components.Toggleable(p, key, label, fallback) — wraps content with a toggle control for page-level fields
  • components.ToggleableEntry(e, key, label, fallback) — wraps content with a toggle control for subcollection entries

Usage

// Inline conditional
if p.ToggleOr("show_banner", true) {
    <div data-cms-field="show_banner" data-cms-type="toggle" data-cms-label="Show Banner">
        ...
    </div>
}

// Or use the component wrapper
@c.Toggleable(p, "show_banner", "Show Banner", true) {
    <div class="banner">...</div>
}

v0.1.2

Choose a tag to compare

@Arthurdw Arthurdw released this 04 Mar 11:24
dc77de9

Bug Fixes

  • URL-encode root page slash (%2F) in GetPage and GetSEO to survive reverse-proxy path normalisation (e.g. Traefik collapsing // into /)