metalsmith-join-files

1.0.11 • Public • Published

metalsmith-join-files NPM version Build Status

A metalsmith plugin to join all files in one file.

Features

  • join all files into one index.html with new metadata files - array of files
  • traverse all folders
  • sort files array according specified metadata(s)

Installation

$ npm install --save-dev metalsmith-join-files

Usage

Create article list and folders with sub parts of articles

[article 1]
 part 1.md
 part 2.md

[article 2]
 part 1.md
 part 2.md
 part 3.md

article 1.md
article 2.md

Configure your build

import metalsmithJoinFiles from 'metalsmith-join-files'

metalsmith.use(metalsmithJoinFiles({
  sortBy: 'order,title'
}))

Options

sortBy

Coma separated list of metadata(s) according which will be sorted files in array

joinRoot = true

Join all files into one index.html file.

If it is set to false root files will be not joined. In each root file will be created array files with joined files from folder with the same name as root file.

rootFileName = "index.html"

Name of new file with joined all files.

Readme

Keywords

none

Package Sidebar

Install

npm i metalsmith-join-files

Weekly Downloads

9

Version

1.0.11

License

MIT

Unpacked Size

7 kB

Total Files

5

Last publish

Collaborators

  • miroslavpeterka