Core plugin updates, new docs and a homepage revamp

← News overview

I have been busy keeping up metalsmith and its core plugins with the Javascript ecosystem, so not many new domain-specific features but hopefully a gradually better developer experience for old and new metalsmith users.

Dual ESM/CJS support for core plugins

Dual ESM/CJS support is underway for core plugins with the help of the microbundle package, and already implemented in most of the core plugins. Only @metalsmith/in-place, @metalsmith/permalinks, @metalsmith/remove and some smaller plugins remain.

Due to how NodeJS handles CJS module.exports = defaultExport, metalsmith is already ESM-compatible! Pitfalls remain for core plugins with multiple exports or mixing default & named exports. Some of them will eventually require major version changes, but thanks to conditional exports being patched into Node >= 12 versions, the Node version support will remain for Node 12.17.0+.

Core plugins use metalsmith.debug

Usage of metalsmith 2.5.0's metalsmith.debug is being rolled out gradually to all plugins. Amongst others this enables logging the output to a centralized metalsmith.log file and controlling the debug namespaces from the metalsmith build programmatically through metalsmith.env. To know more about what this means have a look at the highlights from the Metalsmith 2.5.0 release news.

Core plugin Typescript support

Core plugins are also in the process of getting Typescript support: types will be bundled and distributed as part of the NPM packages they belong to.

Website updates

New homepage contents

The homepage has been revamped! It now better presents an overview of Metalsmith, features a showcase and starter section.

New documentation

The new documentation under /docs has been online now for a while. It's still incomplete but already provides a lot more information than the old homepage docs and is much more user-friendly.

Third-party integrations

@wernerglinka and I have been working at testing third-party integrations with metalsmith. His work centers around SSG-compatible headless CMS'es like, NetlifyCMS and My endeavors are focused on custom app development: combining an express.js server with a decoupled API on one hand, and a Metalsmith build as base for SPA's on the other. I hope to get time to write docs about it soon or at least a news post.

× This website may use local storage for purely functional purposes (for example to remember preferences), and anonymous cookies to gather information about how visitors use the site. By continuing to browse this site, you agree to its use of cookies and local storage.