npm

metalsmith-parked

2.0.1 • Public • Published

Metalsmith Parked

A cheap solution for parked pages in Metalsmith, without having to maintain a separate build script.

The plugin replaces the index file with a provided alternative parked.html. It will also clean out any other pages that you don't want the parked site to see.

Defaults

enable: false         # true - replace index, false - remove parked
parked: 'parked.html' # replacement file for index
index: 'index.html'   # target index file
remove: []            # glob patterns to remove

Example Usage

// build.js
const isParked = process.argv.includes('parked')

Metalsmith(__dirname)
.use(etc...)
.use(parked({
    enable: isParked,
    remove: [
        '*.pdf',
        'blog/',
        'img/',
    ]
}))
.build(err => {
    if (err) throw err;
})
node build.js parked

Readme

Keywords

none

Package Sidebar

Install

npm i metalsmith-parked

Weekly Downloads

0

Version

2.0.1

License

GPL-3.0

Unpacked Size

4.26 kB

Total Files

7

Last publish

Collaborators

  • gwillz