Apostrophe 4.22.0: Astro improvements & quality of life updates #5089
boutell
announced in
Release Notes
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Apostrophe Community!
Apostrophe 4.22.0 introduces major improvements for developers using external frontends like Astro, including a new template injection system and expanded widget options that bring headless workflows closer to feature parity with traditional rendering. Alongside these enhancements, a series of quality-of-life fixes improve security, content filtering, international URL handling, and CSS performance.
Important: Before updating, ensure your Node.js version is 20 or higher, as this release requires a supported version of the runtime environment.
Enhanced Astro Integration and Template Injection
This release significantly improves support for external frontends, particularly Astro, with new infrastructure that enables better headless CMS workflows.
New Template Injection System: The new
prependNodes
andappendNodes
methods replace the previous template injection approach, providing a cleaner way for modules to add HTML elements to pages. This enhancement enables modules like SEO and Palette to inject content consistently across both traditional and headless implementations.Astro Widget Options: Developers can now pass both per-area and global widget options from the backend to Astro components using the new
annotateWidgetForExternalFront()
method. This brings Astro widget implementations closer to parity with traditional server-rendered widgets, including support for the@apostrophecms/anchors
module.Quality of Life Improvements Throughout
Beyond the major new features, this release includes refinements that improve daily editorial work:
Improved URL Handling: Redirects to URLs with accent marks and non-ASCII characters now work correctly with Astro and other external frontends, preventing redirect errors for international content.
Enhanced Piece Filtering: Fixed issues with filters when values from optional fields are falsy, ensuring reliable content discovery in large collections.
Better Login Security: Resolved an issue where customized login validation rules defined to run after form submission but before username/email and password checks were not being enforced.
uponSubmit
filter, which was documented but has never used in our own modules so far.Smarter CSS Generation: The Palette Pro extension now merges rules using the same selector, significantly reducing the size of generated CSS files and improving page load performance.
These improvements are ready for you to explore! Update your projects with
npm update
and let us know what you think on our roadmap.🚀 Happy coding!
Apostrophe 4.22.0
Adds
addCreateWidgetOperation
can now specify anifTypesIntersect
property containing an array of widget type names. If the area in question allows at least one, the operation is offered.uponSubmit
filter.prependNodes
andappendNodes
calls formain
.Fixes
uponSubmit
filter where a user could login without meeting the requirement. Again, we need to explicitly describe anywhere we actually used this in any of our own modules, if at all, and if not, state there is no vulnerability in our modules and existing sites using them have secure login.Changes
res.redirect
would before passing them to Astro prevents an error in Astro and allows the redirect to succeed.uniqueUsername
route from theuser
module (unique usernames are enforced elsewhere)annotateAreaForExternalFront()
method of the@apostrophecms/template
module to accept a per-moduleannotateWidgetForExternalFront()
method. This allows widgets to send project-level options alongside the per-area options to external frontends.Pro Modules
@apostrophecms-pro/cypress-tools
1.0.0-beta.23Automated functional browser tests are an important part of quality assurance for enterprise websites and web applications. Cypress is an industry-standard, open-source library for carrying out automated functional browser tests. This module provides a collection of conveniences for testing the ApostropheCMS admin UI within Cypress. Explore our documentation to learn how this extension can enhance your project. Once you’re ready, obtain a license and install it through Apostrophe Workspaces. For further details or inquiries, feel free to contact us or visit our pricing page.
Changes
useAreaAdd
gets menu items even if not visible, and will scroll to the selected one before to click on it.pieceFilterGroup
to support custom piece filters.@apostrophecms-pro/multisite-dashboard
1.5.0This extension creates the new default multisite dashboard with infinite scroll, search functionality, and the ability to save templates. This extension requires that the project also have the
@apostrophecms-pro/multisite
extension installed and configured. Explore our documentation to discover how this extension can enhance your project. For further details or inquiries, feel free to contact us or visit our pricing page.Changes
prependNodes
instead of a template.@apostrophecms-pro/palette
4.10.0An in-context interface for changing CSS.
@apostrophecms-pro/palette
is a module that provides an in-context interface for changing the values of developer-set CSS properties. The values are stored in an Apostrophe piece singleton (like @apostrophecms/global) and applied to the site whenever the stylesheet link is included in a template. Adjusting values via the palette interface renders changes to the site instantly. Explore our documentation to discover how this extension can enhance your project. Then, effortlessly integrate it through our new Apostrophe Workspaces. For further details or inquiries, feel free to contact us or visit our pricing page.Changes
serverRendered: true
. This helps reduce visual "jump" during initial page display.Adds
Content-Type
header toPOST
render
request.{# TODO Correct links! #}
Adds
Open source modules
@apostrophecms/anchors
v1.1.0This Anchors module adds a wrapping element with an anchor linking target around all widgets. Developers may customize or opt-out individual widget types.
Adds
annotateWidgetForExternalFront()
method to both modules. This allows for options to be passed through to external frontends like Astro.Fixes
anchorId
field of theanchors-widget-type
module so that it follows the field passed in theanchorDefault
option.Utilities
`@apostrophecms/apostrophe-astro 1.6.0
This module integrates ApostropheCMS into your Astro application.
Adds
@apostrophecms/anchors
module to theAposWidget.astro
componentoptions
prop in the widget components.prependMain
andappendMain
in theaposData
object, allowing for custom HTML to be injected into the<main>
sections of the layout.Fixes
Host
header is correctly formatted and reject the request if it is not.eslint-config-apostrophe
6.0.2 (2025-09-16)An ESLint configuration for ApostropheCMS core and officials modules.
Fixes
apos-build
,data
andpublic
directories recursively.6.0.1 (2025-09-09)
Fixes
vue/max-len
rule to vue files only.6.0.0 (2025-09-09)
Breaking changes
eslint@9
andneostandard
.@apostrophecms/stylelint-no-mixed-decls
1.2.0 (2025-17-09)A Stylelint plugin that enforces Sass's mixed-decls rule — requiring declarations and nested rules to be ordered according to Sass's updated behavior.
Adds
contain-nested
array option to list mixins that are known to contain nested rules.stylelint-config-apostrophe
4.4.0A stylelint configuration for ApostropheCMS modules and projects.
Changes
@apostrophecms/stylelint-no-mixed-decls
plugin configuration.uploadfs
1.25.2uploadfs
copies files to a web-accessible location and provides a consistent way to get the URLs that correspond to those files. uploadfs can also resize, crop and autorotate uploaded images. uploadfs includes S3-based, Azure-based, GCS-based and local filesystem-based backends and you may supply others.Fixes
disableFileKey
>disabledFileKey
).Beta Was this translation helpful? Give feedback.
All reactions