the default glob pattern is not `**/*` for 'nunjucks' transform
in the current Options Docs https://github.com/metalsmith/layouts/tree/v3.0.0?tab=readme-ov-file#options its written, that pattern option has a default of **/*.
In the JS DocBlock it is written as pattern='**' which is different again.
But actually it is falling to **/*.{${inputFormats.join(',')}} which is with a transform of 'nunchucks' then '**/*.{njk,nunjucks}'.
See here https://github.com/metalsmith/layouts/blob/v3.0.0/src/index.js#L74
The pattern '**/*.{njk,nunjucks}' is not matching any .html files.
Where i guess the html files are what is desired to match here.
At least its working with pattern: "**/*.html", on my side and i am just a bit confused.
But of course props for all the good work over that long time!!
This is indeed a documentation inconsistency (I forgot to update the docblock/readme in places) but the behavior is correct.
The reason people previously targeted **/*.html by default is because plugins like permalinks were often run first and not flexible enough. With the advent of the extname option in metalsmith/layouts & in-place (and soon, markdown), as well as, directoryIndex for permalinks, one can do:
Metalsmith('.')
.use(markdown())
.use(permalinks({ trailingSlash: '/', directoryIndex: 'index.njk' }))
.use(inPlace({ transform: 'nunjucks', extname: '.njk' }))
.use(layouts({ transform: 'nunjucks' }))
// file changes like this over each plugin
// 'blog.md'
// 'blog.html'
// 'blog/index.njk'
// 'blog/index.njk'
// 'blog/index.html'