Skip to content
Werner Glinka edited this page Jul 20, 2018 · 21 revisions

When to use metalsmith-in-place and/or metalsmith-layouts

When to use Metalsmith-in-place and/or Metalsmith-layouts is a question that is often asked but there is no generic answer - the answer depends on the use-case.

Metalsmith-in-place can be used for anything. In some cases, using metalsmith-layouts may be a simple way to resolve conflicts between markdown and a specific templating language, by separating templating syntax from the markdown syntax, but it is not it's only use-case. The original goal of layouts was to allow for languages like handlebars to be used more easily with metalsmith templating because it allows for a simple way to specify what template to render the content into. In-place does not add anything like that and just renders all extensions with the appropriate engine.

Use Cases

Using Metalsmith-in-place and Metalsmith-layouts with Nunjucks

Using Metalsmith-in-place with Nunjucks