Home

>

Tools

>

Ghost

>

Releases

>

2.2.1

Ghost Release: 2.2.1

Tag Name: 2.2.1

Release Date: 10/9/2018

Ghost LogoGhost

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

TL;DR

Ghost 2.2.1: Mobiledoc Revisions & Bug Fixes

Ghost 2.2.1 introduces mobiledoc revisions, allowing content creators to store up to 10 versions of their content. This release also addresses several critical bugs related to private sites, redirects, and sitemap functionality. The default Casper theme has been updated to version 2.6.4, fixing inline code display issues. This is primarily a maintenance release that improves content editing capabilities while resolving several user experience issues.

Highlight of the Release

    • Added mobiledoc revisions functionality, allowing storage of up to 10 versions of content
    • Fixed multiple redirect issues with private sites
    • Fixed sitemap duplicates after routes.yaml upload
    • Added framework to support multiple API versions
    • Updated Casper theme to version 2.6.4

Migration Guide

No significant migration steps are required for this release. The update from Ghost 2.2.0 to 2.2.1 should be straightforward:

  1. Back up your Ghost installation before upgrading
  2. Follow the standard Ghost update process
  3. No database migrations are required for this release

For developers working with the Ghost API:

  • Note that there is ongoing work to support multiple API versions
  • The v0.1 API remains unchanged and fully supported
  • New API framework is in its first iteration and may contain bugs

Upgrade Recommendations

This release is recommended for all Ghost users, especially those running private sites or using custom routes.yaml configurations. The bug fixes for private site redirects and sitemap duplicates resolve important user experience issues.

Content creators will benefit from the new mobiledoc revisions feature, which provides content history capabilities.

The upgrade process should be straightforward with no breaking changes reported. As always, we recommend backing up your Ghost installation before upgrading.

Bug Fixes

Private Site and Authentication Fixes

  • Fixed redirect to /undefined after authorization for private blogs
  • Fixed redirect issues with private sites by properly checking for the existence of "r" query parameter
  • Added body parser to web/api/v2 express app to ensure req.body is properly defined

Sitemap Fixes

  • Fixed sitemap duplicates that occurred after routes.yaml upload by implementing proper sitemap reset

Model and API Fixes

  • Added processOptions check to base model findPage to prevent errors when calling without defined processOptions
  • Added check for orderDefaultOptions in base model to prevent errors when calling findPage without explicit order
  • Fixed protection for ownership transfer
  • Added protection against empty notification responses

Theme Fixes

  • Fixed inline <code> tag word-break inside <p> tags in Casper theme

New Features

Mobiledoc Revisions

Ghost now supports storing up to 10 versions of mobiledoc content, providing a content history feature for editors. This allows content creators to view and potentially restore previous versions of their posts.

Multiple API Versions Framework

A new framework has been added to support multiple API versions:

  • Structured API stages: validation, input serialization, permissions, query, and output serialization
  • Support for v2 admin and content APIs alongside existing v0.1 implementation
  • Example implementation of serving static pages via /pages for the content v2 API

Session Management

  • Added new session controller for managing user sessions
  • Implemented GET, POST, and DELETE methods for /session in v2 admin API
  • Added session_secret setting to schema for express-session middleware

API Key Management

  • Added refreshSecret method to ApiKey model, allowing API key secrets to be refreshed if compromised

Security Updates

Security Improvements

  • Added refreshSecret method to ApiKey model to allow refreshing API key secrets if they become compromised
  • Added session_secret setting to schema for more secure express-session middleware
  • Improved authentication flows for private blogs

Performance Improvements

Debug Logging Optimization

  • Optimized web/ debug logs with more specific namespaces to prevent overlap between different debug outputs
  • Improved debug namespace specificity for better log filtering

API and Model Optimizations

  • Optimized user model permissible function with reordered checks for better performance
  • Simplified scheduler integration test
  • Optimized doAuth options preparation
  • Extended sequence utility to support both promise and non-promise tasks

Impact Summary

Ghost 2.2.1 delivers important quality-of-life improvements for both content creators and site administrators. The addition of mobiledoc revisions brings a much-requested content history feature, allowing editors to track changes and potentially restore previous versions of their content.

Several critical bugs affecting private sites and authentication flows have been fixed, improving the user experience for members and administrators of password-protected Ghost sites. The sitemap fix ensures proper SEO functionality after routes.yaml changes.

For developers, this release lays groundwork for future API improvements with a new framework supporting multiple API versions. While this is described as a first iteration that may contain bugs, the existing v0.1 API remains fully supported and unchanged.

The Casper theme update to 2.6.4 fixes display issues with inline code blocks, improving content readability.

Overall, this is a solid maintenance release that addresses specific pain points while adding valuable new functionality for content management.

Full Release Notes

  • ✨ Added basic mobiledoc revisions (TryGhost/Ghost/#9927)
  • 🐛 Fixed redirect issue with private sites (#9960)
  • 🐛 Fixed sitemap duplicates after routes.yaml upload (#9957)
  • 🐛 Fixed redirect to /undefined after authorization for private blog (#9944)

Casper (the default theme) has been upgraded to 2.6.4:

  • 🐛 Fixed Inline <code> tag word-break inside a <p> tag

You can see the full change log for the details of every change included in this release.

Statistics:

File Changed161
Line Additions6,745
Line Deletions9,478
Line Changes16,223
Total Commits49

User Affected:

  • Can now access up to 10 previous versions of their content through the new mobiledoc revisions feature
  • Will experience improved content editing workflow with version history

Contributors:

kirrg001allouisnazrshbhgrgJohnONolanololoken