TL;DR
Ghost 2.27.0 introduces three new Handlebars helpers ({{concat}}, {{link}}, and {{link_class}}) that significantly improve theme development flexibility. This release also includes important bug fixes for site imports, archive creation, and canonical URL handling. Additionally, a new DB Backup integration role has been added to enable automated database backups. The authentication system has been migrated to v2, improving code quality and maintainability.
Highlight of the Release
- Three new Handlebars helpers:
{{concat}}, {{link}}, and {{link_class}}
- New DB Backup integration role for automated database backups
- Fixed import functionality to preserve privacy settings
- Improved archive creation by excluding node_modules directory
- Authentication system migrated to v2 API
Migration Guide
for Ghost 2.27.0
For Theme Developers
If you're using custom navigation templates, consider updating them to use the new {{link}} and {{link_class}} helpers:
{{!-- Old way --}}
<li class="{{#if current}}nav-current{{/if}}">
<a href="{{url absolute="true"}}">{{label}}</a>
</li>
{{!-- New way --}}
<li class="{{link_class url}}">
{{#link url}}{{label}}{{/link}}
</li>
{{!-- With extra classes --}}
<li class="{{concat (link_class url) " my-custom-class"}}">
{{#link url class="nav-link"}}{{label}}{{/link}}
</li>
For Site Administrators
If you're using automated database backups, you can now take advantage of the new DB Backup integration role. This can be configured through the Ghost Admin interface or via the API.
Upgrade Recommendations
This release is recommended for all Ghost users, especially those who:
- Are developing custom themes and would benefit from the new Handlebars helpers
- Need automated database backups
- Have experienced issues with large archive files
- Use site imports and want to ensure privacy settings are preserved
The upgrade process follows the standard Ghost update procedure. As always, it's recommended to backup your database before upgrading.
For self-hosted Ghost installations:
ghost update
For Ghost(Pro) users, the update will be automatically applied.
Bug Fixes
- Fixed an issue where node_modules directory was included in archives, causing unnecessarily large files (fixes #10929)
- Ensured that site imports do not override private settings, preserving the current site's privacy mode (fixes #10788)
- Fixed relative canonical_url values not being stored as root-relative paths
- Added a migration to put the subdirectory prefix onto any relative canonical_url paths
- Updated the canonical_url input serialiser to keep the subdirectory rather than stripping it
- Fixed regression tests for roles and migrations
- Fixed spam prevention test being affected by test execution order
New Features
New Handlebars Helpers
{{concat}} Helper: Allows concatenating strings using helpers and variables. Example: {{concat (url) "?query=" slug}}
{{link}} Helper: A block helper that creates links with support for all attributes and dynamic active class handling
{{link_class}} Helper: Provides dynamic class logic for navigation items, making it easier to highlight the current page
- Updated navigation.hbs: Now uses
{{link_class}} helper to simplify current page logic
DB Backup Integration
- Added a new DB Backup integration role to enable automated database backups
- Modified admin API keys to support configurable roles
- Added ghost-backup integration to fixtures
- Simplified database controller permissions options
Security Updates
No specific security fixes were mentioned in this release.
Performance Improvements
- Excluded node_modules directory when creating archives, significantly reducing archive file sizes
- Updated dependency sharp to v0.23.0 for improved image processing
- Various dependency updates to improve overall performance and security:
- intl-messageformat to v5.4.3
- @tryghost/html-to-mobiledoc to v0.5.0
- amperize to v0.6.0
- semver to v6.3.0
- gscan to v2.7.0
- knex-migrator to v3.3.3
- proxyquire to v2.1.1
- archiver to v3.1.1
Impact Summary
Ghost 2.27.0 brings significant improvements for theme developers with three new Handlebars helpers that make theme development more flexible and powerful. The {{concat}}, {{link}}, and {{link_class}} helpers address long-standing needs in the theming system, particularly for handling navigation and dynamic content.
Site administrators will benefit from the new DB Backup integration role, enabling automated database backups through the API. Several important bug fixes improve the reliability of imports (preserving privacy settings) and archive creation (excluding node_modules).
Under the hood, the authentication system has been migrated to v2, improving code quality and maintainability. This includes better validation for password reset and setup flows, which enhances security and reliability.
The update to how canonical URLs are handled ensures better compatibility with sites using subdirectories, which is important for SEO and site structure.
Overall, this release focuses on developer experience, site administration improvements, and fixing specific pain points reported by the community.
Full Release Notes
- 🐛 Ignored node_modules dir when archiving (#10969) - Sumedh Nimkarde
- 🐛 Ensured import does not override private setting (#10882) - Fabien O'Carroll
- ✨Added {{link_class}} helper - Hannah Wolfe
- ✨New {{concat}} helper - Hannah Wolfe
- ✨Added {{link}} helper - Hannah Wolfe
Casper (the default theme) has been upgraded to 2.10.6:
You can see the full change log for the details of every change included in this release.