TL;DR
Ghost 1.21.6: Enhanced Content Presentation with Image Captions and AMP Improvements
This release introduces image and embed card captions in the Koenig editor, significantly improving content presentation capabilities. Several AMP-related bugs have been fixed, including issues with data attributes and BR tags. The update also addresses internationalization for meta titles, improves HTML escaping in the reading time helper, and ensures better Node.js 4.x compatibility. Dependencies have been bumped to newer versions, including Knex, Bookshelf, and related packages.
Highlight of the Release
- Added support for image and embed captions in the Koenig editor
- Fixed multiple AMP-related issues including data attribute preservation and BR tag handling
- Improved internationalization for meta titles
- Enhanced Node.js 4.x compatibility
- Updated several core dependencies including Knex and Bookshelf
Migration Guide
Bookshelf 0.13.0 Changes
This release includes an update to Bookshelf 0.13.0 which introduced breaking changes. If you have custom code that interacts with Ghost's database layer, you may need to update your code to accommodate these changes:
- Event handling in Ghost and bookshelf-relations has been adapted to work with the new Bookshelf version
- For details on the breaking changes, refer to the Bookshelf changelog
No specific migration steps are required for standard Ghost installations.
Upgrade Recommendations
This release contains important bug fixes and feature enhancements that improve content presentation and fix several AMP-related issues. We recommend all Ghost users upgrade to version 1.21.6, especially if you:
- Use the Koenig editor and want to add captions to images or embeds
- Use AMP or have it disabled on your site
- Need internationalization for meta titles
- Run Ghost on Node.js 4.x
The upgrade should be straightforward with no breaking changes for most users. As always, make a backup of your Ghost installation before upgrading.
Bug Fixes
AMP Rendering Fixes
- Fixed
data-* attributes being incorrectly stripped from AMP HTML (#9501)
- Fixed
<br> tags duplicating in AMP transform by adding them to self-closing tags option in sanitize-html (#9502)
Internationalization and HTML Fixes
- Fixed internationalization for the
{{meta_title}} helper, making 'page' in meta titles translatable through subexpressions (#9468)
- Fixed escaping of
< character in reading time helper to ensure W3C compliance (#9508)
Compatibility Fix
- Fixed Node.js 4.x compatibility issue introduced in a previous commit
New Features
Image and Embed Captions in Koenig Editor
The Koenig editor now supports captions for image and embed cards, addressing a long-standing feature request (#9311). This implementation includes:
- Image cards now output as
<figure> elements with optional <figcaption> elements
- HTML embed cards now support optional
<p> caption output
- Basic implementation that will be enhanced with proper classes and default stylesheet in future updates
Improved AMP Handling
When AMP is disabled on a Ghost site, /amp links are now automatically redirected to the original post URL (#9496), providing a better user experience instead of showing errors.
Security Updates
No specific security fixes were mentioned in this release.
Performance Improvements
Dependency Updates
Several core dependencies were updated to newer versions, which may include performance improvements:
The Bookshelf update to 0.13.0 included some breaking changes that required adaptations to Ghost's event handling system.
Impact Summary
Ghost 1.21.6 enhances content presentation capabilities with the addition of image and embed captions in the Koenig editor. This feature allows content creators to provide more context for their visual content, improving the overall reading experience.
The release also addresses several AMP-related issues, ensuring that data attributes are preserved and BR tags render correctly. For sites with AMP disabled, users will now be properly redirected to the original post instead of seeing errors.
Internationalization improvements for meta titles make Ghost more accessible to non-English users, while the fix for Node.js 4.x compatibility ensures broader server environment support.
The dependency updates, particularly to Bookshelf 0.13.0, keep Ghost's database layer current but required some internal adaptations to maintain compatibility.
Overall, this is a quality-of-life update that improves content presentation, fixes several rendering issues, and maintains compatibility with various environments.
Full Release Notes
- 🎨Fixed unexpected scrollbars in modals when using Firefox (TryGhost/Admin#974)
- 🎨Redirected
/amp links to original post when AMP is disabled (#9496)
- 🐛Fixed i18n for the
{{meta_title}} helper (#9468)
- 🐛Fixed escaping
< in reading time helper (#9508)
- 🐛Fixed
data-* attributes from being stripped in AMP HTML (#9501)
- 🐛Fixed <br> tag from duplicating in AMP transform (#9502)
You can see the full change log for the details of every change included in this release.