Home

>

Tools

>

Ghost

>

Releases

>

4.24.0

Ghost Release: 4.24.0

Tag Name: v4.24.0

Release Date: 11/26/2021

Ghost LogoGhost

Open-source publishing platform specifically designed for professional bloggers and publications. Focuses on clean, minimalist writing and publishing experience.

TL;DR

Ghost v4.24.0 brings several UI improvements and performance optimizations. Key updates include enhanced accordion card styling, improved mobile styling for bookmark and gallery cards, and significant boot time optimizations for testing environments. The release also adds support for theme card_asset configuration in GScan, fixes redirects.json file corruption issues, and introduces new labs flags for upcoming features like file upload cards, product cards, and quote styles. This update focuses on improving theme development flexibility and fixing several UI and performance issues.

Highlight of the Release

    • Added support for theme card_asset configuration in GScan
    • Fixed redirects.json file corruption on upload
    • Improved mobile styling for bookmark and gallery cards
    • Significant boot time optimizations for testing environments
    • Added new labs flags for experimental features (file upload cards, product cards, quote styles)

Migration Guide

Truncated Offer Names

Offer names are now truncated to 40 characters to match Stripe Coupon name limits. This migration ensures that all data in the database is valid. If you have offers with names longer than 40 characters, they will be automatically truncated.

Theme Development Changes

If you're developing themes:

  1. Be aware of the new card_asset configuration in GScan
  2. Ensure your theme includes proper CSS for callout cards or configure the card_asset property
  3. Check for any warnings related to missing card CSS in your theme

Testing Environment Changes

If you're running tests:

  1. Consider using the new frontend: false flag when starting Ghost in tests that don't need the frontend
  2. Review the refactored test suites that now use async/await syntax for better readability
  3. Note that v2/v3 redirects tests have been removed as these APIs are unofficial

Upgrade Recommendations

This is a minor release with several improvements and bug fixes. It's recommended to upgrade at your convenience, especially if you:

  1. Use redirects.json files and have experienced corruption issues
  2. Develop themes and want to take advantage of the new card_asset configuration
  3. Use callout cards and have experienced styling issues
  4. Run extensive test suites and would benefit from the boot time optimizations

There are no breaking changes in this release, so the upgrade should be straightforward. As always, it's recommended to backup your database before upgrading.

Bug Fixes

Fixed Redirects File Corruption

Fixed an issue where redirects.json files would become corrupted during upload due to double JSON-stringification.

Card Asset Fixes

  • Fixed card asset initialization and reload behavior that was incorrectly only happening if the API version changed
  • Fixed accent color background in email callout cards
  • Fixed callout card emoji alignment

Error Handling Improvements

  • Fixed errors being swallowed in oembed service
  • Improved error handling in card-assets
  • Fixed error handling for missing admin templates
  • Added err.context & err.help to stack traces for clearer error messages

Other Fixes

  • Fixed servePublicFile to honor v= cache keys for better caching behavior
  • Fixed invalid settings file path configuration
  • Fixed the selector for toggle headings
  • Fixed event listener pileup in URL service

New Features

Theme card_asset Configuration Support

Ghost now supports a card_asset configuration in GScan, allowing theme developers more control over card styling. This feature helps ensure that themes properly implement the necessary CSS for various card types.

New Labs Flags

Several new experimental features have been added behind labs flags:

  • fileUploadCard: Enables file upload cards functionality
  • productCard: Enables product card development
  • quoteStyles: Adds an alternative blockquote style option

Improved Card Styling

  • Updated accordion card styling with refined container div
  • Improved bookmark card mobile styling
  • Enhanced gallery card mobile styling with self-contained CSS custom properties for gap

Security Updates

No significant security fixes were included in this release.

Performance Improvements

Boot Time Optimizations

Significant improvements to boot time in testing environments:

  • Introduced "withFrontend" and "withBackend" flags to control initialization of sections of the boot sequence
  • Optimized e2e-api tests using boot with no frontend
  • Introduced booting from fixture URL cache in test environment
  • Skipped unnecessary frontend initialization in tests

Other Performance Improvements

  • Extracted a local file cache class for URLs with writeDisabled flag option
  • Changed /^testing/ regexp use to startsWith method for better readability and performance
  • Merged maintenance middleware into one to reduce code duplication
  • Added number of server boots to test reporting for performance debugging

Impact Summary

Ghost v4.24.0 is a feature-rich update that brings significant improvements for theme developers, content creators, and administrators. The addition of theme card_asset configuration support in GScan gives theme developers more control over card styling, while improved mobile styling for bookmark and gallery cards enhances the content experience for readers.

For developers, the release includes substantial boot time optimizations for testing environments, which should improve development workflow efficiency. The refactored route settings module and improved error handling throughout the system contribute to a more robust codebase.

Administrators will benefit from fixed redirects.json file corruption issues and the addition of new labs flags for experimental features like file upload cards, product cards, and quote styles.

Overall, this release focuses on enhancing theme development flexibility, fixing UI issues, and improving performance, making it a worthwhile upgrade for most Ghost installations.

Full Release Notes

  • ✨ Added support for theme card_asset config to GScan - Thibaut Patel
  • 🐛 Fixed redirects.json file corruption on upload - Naz
  • 🐛 Fixed /unsplash search term not including all words - Kevin Ansfield
  • 🐛 Fixed card asset init/reload behaviour - Hannah Wolfe

View the changelogs for full details:

Statistics:

File Changed174
Line Additions2,479
Line Deletions2,963
Line Changes5,442
Total Commits95

User Affected:

  • New support for `card_asset` configuration in GScan allows more control over card styling
  • Added warnings for missing callout card CSS to help ensure proper theme compatibility
  • Improved accordion, bookmark, and gallery card styling for better mobile experiences

Contributors:

djordjevlaisrenovate-botrshbhgrgnazsanne-santpatelkevinansfieldErisDSminimaluminiumdaniellockyerallouis