Home

>

Tools

>

Ghost

>

Releases

>

4.0.0-alpha.3

Ghost Release: 4.0.0-alpha.3

Pre Release

Tag Name: 4.0.0-alpha.3

Release Date: 2/23/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 4.0.0-alpha.3 brings significant improvements to the CMS with a focus on enhanced content features and system optimizations. This release introduces support for links in image and gallery cards, native lazy loading for content images, and a paywall card to mark the end of free content previews. The boot process has been completely revamped for better performance and maintainability, while several settings have been simplified by removing deprecated JSON object formats. This alpha release is primarily for testing tooling and migrations ahead of the stable 4.0 release.

Highlight of the Release

    • Added support for links in image and gallery cards
    • Introduced a paywall card to mark the end of free content previews
    • Added native lazy loading for content images
    • Completely revamped the boot process for better performance
    • Added member events timeline API for the dashboard
    • Improved email analytics with a new browse endpoint

Migration Guide

Settings Format Changes

If you've been using the labs or unsplash settings with JSON object formats, you'll need to update your code:

  • The labs setting has been removed as members are now always enabled by default in Ghost 4.0
  • The unsplash setting now accepts only boolean values in the v4 API (previously accepted object format)

API Changes

Admin API v4/canary:

  • GET /settings/ now returns unsplash as a boolean value
  • PUT /settings/ now accepts unsplash only as a boolean value

Admin API v3:

  • Continues to support both object and boolean formats for backward compatibility

Boot Process

If you have custom code that hooks into Ghost's boot process:

  • The old boot process has been completely removed
  • Server events like server.start and server.stop have been removed
  • Theme loading now uses direct function calls instead of events
  • The URL service initialization has changed from event-based to direct calls

NPM Module Usage

Ghost can no longer be used as an NPM module (this was deprecated long ago and is now fully removed).

Upgrade Recommendations

For Alpha Testers

This is an alpha release primarily intended for testing tooling and migrations. It's not recommended for production use. If you're participating in alpha testing:

  1. Test thoroughly in a development environment first
  2. Back up your database before upgrading
  3. Report any issues you encounter to the Ghost team

For Theme Developers

If you're a theme developer, this is a good time to:

  1. Test your themes with the new paywall card functionality
  2. Verify that lazy loading of images works correctly with your theme
  3. Check that your theme handles linked images and galleries properly

For Plugin/Integration Developers

If you've built custom integrations:

  1. Review the changes to the boot process
  2. Update any code that relies on the removed events
  3. Adapt to the new settings format changes

Bug Fixes

  • Fixed an issue where members-only content was unexpectedly appearing in excerpt fields

  • Fixed the Slack setting migration to follow idempotence rules, preventing issues when executed multiple times

  • Fixed file system errors during theme installation that could delete the active theme

  • Fixed handling of ENOTFOUND errors on NodeJS versions 13 and above

  • Fixed generation of MRR (Monthly Recurring Revenue) and Volume data in member analytics

  • Fixed member status events query by adding aggregate option to permitted options and cleaning up SQL queries

New Features

Content Enhancements

  • Links in Image and Gallery Cards: Content creators can now add links to image and gallery cards, making content more interactive and navigable.

  • Paywall Card: Added a new card type that marks the end of free content preview for members-only content, providing a clearer separation between free and premium content.

  • Native Lazy Loading for Images: Implemented native lazy loading attributes for content images, improving page load performance without requiring JavaScript.

Admin Dashboard Improvements

  • Member Events Timeline API: Added a new API endpoint to display recent member events on the site dashboard, providing better insights into member activity.

  • Email Analytics: Added a new browse endpoint for emails that allows admins to check newsletter performance over time and display stats on the dashboard.

  • Theme Preview Mode: Added support for previewing themes with different settings without applying them to the live site.

System Improvements

  • Portal Accent Color in Preview Mode: Added support for previewing portal with custom accent colors.

Security Updates

  • Added Sentry logging to ping service errors to better track and respond to potential security issues

  • Improved error handling and logging for the 429 "Too many requests" errors in the ping service

Performance Improvements

  • Revamped Boot Process: Completely redesigned the Ghost boot process for better performance and maintainability, removing the old boot system.

  • Improved Worker Communication: Migrated jobs to use parentPort.postMessage for communication, reducing file handle leaks.

  • Optimized SQLite Tests: Changed the database path for SQLite tests to use memory storage instead of filesystem, resulting in up to 2x faster test execution.

  • Custom Worker Message Handler: Added a handler that processes worker messages in the main thread, avoiding file handle leaks from the logging implementation.

  • Streamlined Server Events: Cleaned up global server events and replaced event-based communication with direct function calls for better performance and code clarity.

Impact Summary

Ghost 4.0.0-alpha.3 represents a significant step forward in Ghost's evolution, with both user-facing features and substantial under-the-hood improvements. Content creators will benefit from new capabilities like linked images and the paywall card, while site owners will see performance improvements from native lazy loading and the revamped boot process.

The most impactful changes are the complete rewrite of the boot process, which improves performance and maintainability but may require updates to custom integrations, and the new content features that enhance the publishing experience. The removal of deprecated settings formats (particularly for labs and unsplash) simplifies the codebase but requires adaptation from developers who were using these formats.

This alpha release is primarily for testing, but it provides a clear picture of what to expect in the final 4.0 release: a faster, more streamlined Ghost with enhanced content creation capabilities and better member management tools.

Full Release Notes

Statistics:

File Changed107
Line Additions3,344
Line Deletions2,155
Line Changes5,499
Total Commits87

User Affected:

  • Can now add links to image and gallery cards
  • Can use the new paywall card to mark the end of free content previews
  • Will benefit from native lazy loading of content images for better performance

Contributors:

ErisDSkevinansfieldtpatelnazallouisrenovate[bot]rshbhgrgdaniellockyerrenovate-bot