metalsmith / metalsmith/layouts

Eliminate read overhead for in-source layouts

Open
#189 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
112
Forks
48
PR merge metrics
No merged PRs in 30d

Description

What happens when the `directory` option is set inside the `metalsmith.source()`, eg.

```js
metalsmith
.source('src')
.use(layouts({
directory: 'src/layouts'
}))
// currently requires @metalsmith/remove?
.use(remove('layouts'))
```

There is a limited set of cases where removing the layouts may not be desirable (eg. a design system that needs to show the source templates)

Resolution of this issue:
- Add a test case
- Add an option that defaults to current behavior for non-semver breaking release

Contributor guide

Open the contributing guide

Research direction

Start by locating the layouts plugin's handling of the directory option and its existing test suite. Add coverage for a source directory containing layouts, then verify that the new option controls removal while the default preserves current behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.