Home

>

Tools

>

Ghost

>

Releases

>

4.28.0

Ghost Release: 4.28.0

Tag Name: v4.28.0

Release Date: 12/13/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.28.0 introduces a new product card feature for the editor, allowing content creators to embed product recommendations directly in posts and pages. This release also includes significant improvements to media cards (video, audio, file) with enhanced styling and functionality, fixes a template rendering issue with @partial-block, and updates the default Casper theme to v4.5.0. These changes improve content creation flexibility and media presentation quality across the platform.

Highlight of the Release

    • New product card for embedding product recommendations in posts and pages
    • Custom video player controls similar to audio player
    • Fixed template rendering issue with @partial-block
    • New Before/After card for image comparisons
    • Improved media card styling and functionality across video, audio, and file cards
    • Updated Casper theme to v4.5.0

Migration Guide

Theme Developers

If you're developing or maintaining a Ghost theme, you should ensure your theme includes the necessary CSS for the new product card. GScan will now display a warning if your theme doesn't include the default product card CSS and doesn't provide custom styling for it.

Custom Templates

If you were affected by the regression that prevented the use of @partial-block in templates, you can now use this feature again as it has been fixed in this release.

Upgrade Recommendations

This release introduces valuable new features for content creators and fixes several bugs, making it a recommended upgrade for all Ghost users. The new product card feature enhances content monetization capabilities, while the improvements to media cards provide a better experience for both creators and readers. There are no breaking changes reported, so the upgrade should be smooth for most users.

Theme developers should review their themes to ensure compatibility with the new product card feature and update their CSS accordingly.

Bug Fixes

Template Rendering

  • Fixed a regression that prevented the use of @partial-block in templates

Media Cards

  • Fixed video loop behavior
  • Fixed audio card responsive behavior on frontend
  • Fixed background color for transparent PNGs used as audio thumbnails
  • Fixed audio thumbnail placeholder in email
  • Added accent background color for default audio thumbnail

Dependencies

  • Added resolution to pin @tryghost/logging to v2 to prevent issues with multiple versions causing problems with file rotation
  • Updated various dependencies including:
    • @sentry/node to v6.16.1
    • body-parser to v1.19.1
    • luxon to v2.2.0
    • @tryghost/members-api to v2.8.6

New Features

Product Card

  • Added a new product card to the editor for embedding product recommendations in posts and pages
  • Implemented CSS grid-based layout for product cards
  • Added dynamic styles for star ratings in products
  • Added GScan rules to validate product card CSS in themes

Media Improvements

  • Added custom video player controls similar to the audio player
  • Implemented Before/After card for image comparisons with slider functionality
  • Refined audio player UI with improved styling
  • Updated file card frontend styles

Theme Updates

  • Updated default Casper theme to v4.5.0

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

Code Improvements

  • Improved video thumbnail rendering
  • Removed duplicated code from TestAgent to improve maintainability
  • Refactored product card rendering for better performance
  • Renamed generic class names for video card to avoid style conflicts
  • Removed dependency from product card CSS to other cards' CSS for better isolation

Impact Summary

Ghost v4.28.0 significantly enhances content creation capabilities with the addition of the product card feature, allowing publishers to embed product recommendations directly within their content. This opens up new monetization opportunities and improves the integration of commerce with content.

The release also brings substantial improvements to media handling, with enhanced video and audio players that provide a more polished and consistent user experience. The new Before/After card adds a powerful visual comparison tool to the editor's arsenal.

For developers, the fix for @partial-block in templates restores important functionality for custom theme development, while the improved test coverage and code refactoring contribute to a more maintainable codebase.

Overall, this release focuses on enhancing the content creation experience with new tools and fixing existing issues, making Ghost more versatile for publishers looking to diversify their content formats and monetization strategies.

Full Release Notes

  • ✨ Added product card to editor - Thibaut Patel
  • 🎨 Updated Casper to v4.5.0 - Daniel Lockyer
  • 🐛 Fixed using @partial-block in templates - Ben Shaw

View the changelogs for full details:

Statistics:

File Changed19
Line Additions1,048
Line Deletions182
Line Changes1,230
Total Commits38

User Affected:

  • Can now add product recommendations to posts and pages using the new product card
  • Benefit from improved video player with custom controls similar to the audio player
  • Experience better media presentation with enhanced audio and video card styling
  • Can use the new Before/After card for image comparisons

Contributors:

renovate-botkevinansfielddjordjevlaispeterzimonrshbhgrgsanne-sannazrenovate[bot]allouisdaniellockyertpatel