4.0.0
16 November 2026
New Features
- Add
Item.resources, which holds all the unhandled files (such as images) in the same folder - Fix Swift language mode warning by making
metadata:required inregisterTheEmptyMetadata.selfdefault makes the compiler inferMfrom a default value while other parameters also useM. The compiler warns that this will be an error in a future Swift language mode. - Remove deprecated code
- Make
Saga.hashedoutput a warning when giving it a non-existing path
Bugfixes
- Fix
Saga.hashedfor localized files - Make a
slugoverride on anindex.mditem replace its folder nameA slug override onarticles/hello-world/index.md(as specified in its frontmatter) put the page atarticles/hello-world/<slug>/index.html. It now replaces the folder name instead.
Documentation Changes
- Add migration docs for Saga 4
BREAKING CHANGES
ItemRenderingContext.resourcesis gone, switch toItem.resourcesinstead.- Every
registercall needs an explicitmetadata:argument. PassEmptyMetadata.selfwhere you relied on the default. - Deprecated APIs are removed:
ignore(_:): useSaga/ignoreChanges(_:).register(write:): useSaga/afterRead(_:)orSaga/afterWrite(_:).sitemap(baseURL:filter:)with a(Path) -> Boolfilter: useSaga/sitemap(baseURL:filter:), whose filter also receives the item,(Path, AnyItem?) -> Bool.atomFeed(…, dateKeyPath:): useSaga/atomFeed(title:author:baseURL:limit:itemTitle:summary:image:date:), which takes a closure or a key path like\.date.
- With i18n,
Saga/hashed(_:)now takes the file’s path in the output folder rather than the input folder. For example/articles/chart.pngrather than/en/articles/chart.png, or/nl/artikelen/chart.pngrather than/nl/articles/chart.png. Files outside locale folders, like/static/style.css, are unaffected.