Home

>

Tools

>

Ghost

>

Releases

>

2.9.0

Ghost Release: 2.9.0

Tag Name: 2.9.0

Release Date: 12/17/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.9.0 introduces dynamic image resizing capabilities, enhancing theme flexibility with the new size attribute for the img_url helper. The editor experience has been improved with drag-and-drop card reordering and auto-scrolling. This release also fixes several bugs related to AMP pages, API compatibility, and Node.js v6 support, making it a solid update for both developers and content creators.

Highlight of the Release

    • Dynamic image resizing for LocalFileStorage
    • New size attribute for the img_url helper
    • Drag-and-drop card reordering in the editor
    • Auto-scroll when dragging cards or gallery images
    • Option to disable welcome emails for new users
    • Improved members authentication UI

Migration Guide

Theme Developers: Image Sizes Configuration

To use the new dynamic image resizing and size attribute in the img_url helper, you'll need to define image sizes in your theme's package.json file. For example:

"config": {
  "image_sizes": {
    "xxs": {
      "width": 30
    },
    "xs": {
      "width": 100
    },
    "s": {
      "width": 300
    },
    "m": {
      "width": 600
    },
    "l": {
      "width": 1000
    },
    "xl": {
      "width": 2000
    }
  }
}

You can then use these sizes in your theme:

<img src="{{img_url feature_image size="s"}}"/>

Welcome Email Configuration

If you want to disable welcome emails for new users, you can add the following to your Ghost configuration:

"sendWelcomeEmail": false

By default, this value is set to true to maintain backward compatibility.

Upgrade Recommendations

This release includes significant improvements for theme developers and content creators with the new dynamic image resizing capabilities and editor enhancements. It also fixes several bugs that could affect AMP pages and Node.js v6 compatibility.

We recommend all Ghost users upgrade to version 2.9.0, especially if you:

  • Use AMP pages with multiple authors
  • Run Ghost on Node.js v6
  • Want to take advantage of the new image resizing capabilities
  • Would benefit from the improved editor experience

The upgrade should be straightforward with no breaking changes reported. As always, make a backup of your Ghost installation before upgrading.

Bug Fixes

Fixed URL Constructor for Node v6

Resolved an issue where Ghost would fail with URL is not a constructor error on Node.js v6 environments.

Fixed AMP Page Issues

  • Fixed multiple authors display on AMP pages, ensuring all post authors are properly shown
  • Removed duplicate shortcut icon link in AMP pages, preventing redundant HTML

Fixed Get Helper with Disabled API v0.1

Resolved an issue where the get helper would not work correctly when the Public API v0.1 (Labs feature) was disabled. The helper now works properly with the v2 API regardless of v0.1 API status.

Fixed Navigation Slug Generation

Switched to using safe string for navigation slug generation, ensuring consistent slug generation across Ghost.

Stripped Invisible Unicode Characters from Slugs

Fixed an issue where invisible Unicode characters could appear in slugs, potentially causing problems with URLs and routing.

Fixed Spam Prevention Test

Resolved and improved the spam prevention test that was previously broken.

New Features

Dynamic Image Resizing

Ghost now supports dynamic image resizing for the LocalFileStorage adapter. This powerful feature allows themes to request different image sizes on-the-fly, optimizing performance by serving appropriately sized images for different contexts.

Size Attribute for img_url Helper

The {{img_url}} helper now supports a size attribute, allowing theme developers to easily request specific image sizes:

<img src="{{img_url profile_image size="small"}}"/>

To use this feature, theme developers need to define image sizes in their theme's package.json file.

Drag-and-Drop Card Reordering

Content creators can now reorder cards in the editor using drag-and-drop functionality, making content organization more intuitive and efficient.

Auto-Scroll for Dragging Elements

When dragging cards or gallery images in the editor, Ghost now automatically scrolls the view when approaching the edges, improving the user experience when working with longer content.

Slack Username Option

User profiles now support adding Slack usernames, enhancing integration possibilities with Slack.

Welcome Email Control

Site administrators can now control whether welcome emails are sent to new users through the new sendWelcomeEmail configuration option (defaults to true).

Security Updates

Sign-out Endpoint Security Refinement

Removed the ssoOriginCheck from the signout endpoint as it was unnecessary for this particular endpoint. This change maintains security while removing an unneeded check, as the signout process completely bypasses any UI (similar to the /token endpoint).

Performance Improvements

Image Optimization

The new dynamic image resizing feature improves site performance by serving appropriately sized images rather than resizing them with CSS or serving unnecessarily large files.

Improved Image Manipulation

The image manipulation system has been refactored and improved:

  • Added safety mechanisms to handle errors gracefully
  • Implemented fallbacks when Sharp (image processing library) is missing
  • Ensured smaller images are not unnecessarily enlarged

Members Auth UI Refinements

Several performance and UX improvements to the members authentication UI:

  • Improved mobile modal animations
  • Enhanced input error handling and placeholder refinements
  • Added close animations to members auth popups

Impact Summary

Ghost 2.9.0 delivers significant improvements to image handling with dynamic resizing capabilities and the new size attribute for the img_url helper. These features give theme developers more control over image presentation and can improve site performance by serving appropriately sized images.

Content creators will appreciate the enhanced editor experience with drag-and-drop card reordering and auto-scrolling when moving content elements, making content organization more intuitive.

The release also addresses several bugs affecting AMP pages, ensuring better compatibility with multiple authors and removing duplicate elements. Node.js v6 compatibility has been restored, and the get helper now works correctly regardless of API v0.1 status.

For administrators, new options to control welcome emails and add Slack usernames provide additional flexibility. The members authentication UI has also been refined with improved animations and error handling.

Overall, this is a well-rounded release that enhances Ghost's capabilities for all types of users while fixing important bugs and improving the platform's performance.

Full Release Notes

  • ✨ Added support for dynamic image resizing (#10184)
  • ✨ Added size attribute support to {{img_url}} helper (#10182)
  • ✨ Added drag-and-drop card re-ordering in the editor (TryGhost/Admin#1085)
  • ✨ Added auto-scroll when dragging cards or gallery images (TryGhost/Admin#1083)
  • 🐛 Fixed URL is not a constructor for Node v6 (#10289)
  • 🐛 Removed duplicate shortcut icon link on amp pages (#10254)
  • 🐛 Fixed multiple authors on amp pages (#10253)
  • 🐛 Fixed get helper when API v0.1 is disabled (#10270)

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

Statistics:

File Changed49
Line Additions1,170
Line Deletions306
Line Changes1,476
Total Commits20

User Affected:

  • Can now implement dynamic image resizing in themes
  • Can use the new `size` attribute in the `img_url` helper for more flexible image handling
  • Need to define image_sizes config in theme's package.json to use the new sizing features

Contributors:

ErisDSallouisdexterlengTJYSunsetpeterzimonzcegreghartnazkirrg001aileenkevinansfield