Noble Pug Mullet

    metalsmith-remove-indexes

    0.1.0 • Public • Published

    metalsmith-remove-indexes

    A Metalsmith plugin to convert all all {path}/index.html files to {path}.html.

    Installation

    $ npm install metalsmith-remove-indexes
    

    Usage

    const metalsmith = require('metalsmith')
    const removeIndexes = require('metalsmith-remove-indexes')
    
    metalsmith(__dirname)
    	.use(removeIndexes())
    

    You can configure the plugin by passing an object containing options:

    metalsmith(__dirname)
    	.use(removeIndexes({
    		redirect: true,
    		trimHtmlPath: true,
    		ignore: [
    			'index.html',
    			'ignore/directory/**/*'
    		]
    	}))
    

    Options

    • redirect Boolean Creates redirect links from old index files to new paths. (Default: false)
    • trimHtmlPath Boolean Removes file extensions from the path gray matter variable. (Default: false)
    • ignore Array/String Uses minimatch to find index files to ignore. (Default: index.html)

    Install

    npm i metalsmith-remove-indexes

    DownloadsWeekly Downloads

    1

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • amadoa
    • dalewray
    • codevelopit
    • mastaaaron
    • escasports
    • tbaustin
    • ken85rose