Home

>

Tools

>

Ghost

>

Releases

>

4.27.2

Ghost Release: 4.27.2

Tag Name: v4.27.2

Release Date: 12/10/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.27.2 introduces several card improvements including video card rendering, refined audio card functionality, and product card styling enhancements. The release also includes significant test framework improvements with a new e2e testing framework and better snapshot testing capabilities. Additionally, it fixes a global variable leak issue with card scripts and updates dependencies for better security.

Highlight of the Release

    • Initial video card rendering support
    • Improved audio card functionality and styling
    • Fixed global variable leak in card scripts
    • New e2e testing framework for better test reliability
    • Enhanced product card styling

Migration Guide

No migration steps are required for this release. All changes are backward compatible and should work automatically after updating.

Upgrade Recommendations

This release contains several improvements to content cards and fixes a global variable leak issue. It's recommended for all users to upgrade, especially those who use video and audio cards in their content. The upgrade should be straightforward with no breaking changes.

Bug Fixes

Card Script Global Variable Fix

  • Fixed global variable leak for new card scripts by wrapping them in an IIFE
  • Resolved errors caused by swup and its scripts-plugin that were tripping over already created global variables

Test Suite Fixes

  • Fixed authentication test suites
  • Fixed handling test suite to prevent hanging when server responses don't contain error arrays
  • Fixed linting errors

New Features

Video Card Rendering

  • Added initial support for video card rendering
  • Included basic CSS styling to prevent videos from rendering larger than content width
  • Similar approach to default image styles in most themes

Audio Card Improvements

  • Updated rendering of audio cards without thumbnails
  • Refined frontend audio card player script
  • Added post URL option for mobiledoc cards conversion to HTML
  • Fixed audio card player button alignment

Product Card Enhancements

  • Added padding between paragraphs in product card descriptions
  • Updated product card line heights for better readability
  • Updated button styles to use relative sizing

Experimental Header Card

  • Added headerCard labs flag for an editor card that allows layout of a header title with background image

Security Updates

Dependency Updates

  • Updated sanitize-html dependency to v2.6.1 for improved security

Performance Improvements

Test Framework Improvements

  • Reworked site regression test suite to use serverless boot
  • Lighter startup which reduces test execution time
  • Enables potential for running mocha tests in parallel
  • Refactored request initialization with supertest for more efficient testing

Impact Summary

Ghost v4.27.2 focuses on enhancing the content creation experience with improved card functionality, particularly for video and audio content. The release also includes significant improvements to the testing framework, which will benefit developers working with the Ghost codebase. The global variable leak fix addresses potential conflicts with other scripts on Ghost sites. Overall, this is a quality-of-life improvement release that enhances content display capabilities while maintaining stability.

Full Release Notes

Statistics:

File Changed24
Line Additions3,463
Line Deletions2,381
Line Changes5,844
Total Commits35

User Affected:

  • Improved video card rendering for better content display
  • Enhanced audio card functionality with better styling and player controls
  • Refined product card styling with better line heights and paragraph spacing
  • New experimental header card feature (behind labs flag)

Contributors:

rshbhgrgkevinansfieldrenovate-botsanne-sannazpeterzimonminimaluminiumdjordjevlaisdaniellockyer