0.1.3 • Published 8 years ago

metalsmith-path-into-post v0.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

metalsmith-path-into-post

Add source file path into Metalsmith's post metadata. With this plugin each post knows where it is.

This tiny plugin is expected to be used in combination with metalsmith-collections and/or metalsmith-in-place.

Installation

$ npm install metalsmith-path-into-post --save

Usage

var Metalsmith = require('metalsmith');
var pathIntoPost = require('metalsmith-path-into-post');

Metalsmith(__dirname)
  .use(pathIntoPost({
    pattern: /\.md$/,
    ext: '.html',
    publicPathPrefix: '/'
  })
  .build();

or for CLI

{
  "plugins": {
    "metalsmith-permalinks": {
      "pattern": "\\.md$",
      "ext": ".html",
      "publicPathPrefix": "/",
    }
  }
}

Options

  • pattern RegExp to filter files
  • ext String to replace source file's extension with
  • publicPathPrefix String to be prepended to source file path
0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago