Skip to content

Gulp plugin to take a Vinyl file with Stratic post information and make the path include the year and month

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

straticjs/stratic-date-in-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

stratic-date-in-path

Gulp plugin to take a Vinyl file with Stratic post information (for example, something that's had YAML frontmatter parsed with gulp-gray-matter) and make the file path include the year and month, as is typical in blog engines.

Installation

npm install stratic-date-in-path

Usage

gulpfile.js:

var gulp = require('gulp')
var frontMatter = require('gulp-gray-matter');
var straticDateInPath = require('stratic-date-in-path');

gulp.task('posts', function() {
    gulp.src('*.md')
        .pipe(frontMatter())
        .pipe(straticDateInPath());
});

Each file's path now contains the year and month. For example, hello-world.md might be changed to /2016/01/hello-world.md.

Code of Conduct

Please note that StraticJS is developed under the Contributor Covenant Code of Conduct. Project contributors are expected to respect these terms.

For the full Code of Conduct, see CODE_OF_CONDUCT.md. Violations may be reported to alex@strugee.net.

License

LGPL 3.0+

Author

AJ Jordan alex@strugee.net

About

Gulp plugin to take a Vinyl file with Stratic post information and make the path include the year and month

Topics

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Code of conduct

Stars

Watchers

Forks

Packages

No packages published