3.0.0 • Published 7 years ago

docpad-plugin-datefromfilename v3.0.0

Weekly downloads
26
License
-
Repository
github
Last release
7 years ago

Date from Filename Plugin for DocPad

This plugin provides support for DocPad for specifying document dates at the beginning of their filenames.

Install

npm install --save docpad-plugin-datefromfilename

Usage

To use, simply prepend document file name with date formatted like YYYY-MM-DD separated from base name with either nothing, space, - or _. In the end basename (without extension) of your file should look something like this:

2013-03-10_my-awesome-page

Configuration

By default, this plugin does not remove date part from output filename. This can be changed in your DocPad configuration file by adding something similar to the following:

plugins:
	datefromfilename:
		removeDate: true

You can customize the regular expression used to parse dates from filenames with dateRegExp:

plugins:
  datefromfilename:
    dateRegExp: /\b(\d{4})-(\d{2})-(\d{2})-/

License

Licensed under the incredibly permissive MIT License

3.0.0

7 years ago

2.0.4

11 years ago

2.0.3

11 years ago

2.0.2

11 years ago

2.0.1

11 years ago

2.0.0

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago