Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/straticjs/stratic-date-in-path
Gulp plugin to take a Vinyl file with Stratic post information and make the path include the year and month
https://github.com/straticjs/stratic-date-in-path
gulp gulp-plugin hacktoberfest javascript stratic
Last synced: about 1 month ago
JSON representation
Gulp plugin to take a Vinyl file with Stratic post information and make the path include the year and month
- Host: GitHub
- URL: https://github.com/straticjs/stratic-date-in-path
- Owner: straticjs
- License: lgpl-3.0
- Created: 2016-05-27T03:55:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-17T06:23:24.000Z (about 6 years ago)
- Last Synced: 2024-04-26T16:45:41.864Z (10 months ago)
- Topics: gulp, gulp-plugin, hacktoberfest, javascript, stratic
- Language: JavaScript
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: COPYING
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# `stratic-date-in-path`
[Gulp][1] plugin to take a Vinyl file with [Stratic][2] post information (for example, something that's had YAML frontmatter parsed with [`gulp-gray-matter`][3]) 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`:
```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][4] Code of Conduct. Project contributors are expected to respect these terms.
For the full Code of Conduct, see [CODE_OF_CONDUCT.md][5]. Violations may be reported to .
## License
LGPL 3.0+
## Author
AJ Jordan
[1]: http://gulpjs.com/
[2]: https://github.com/straticjs/generator-stratic
[3]: https://npmjs.com/package/gulp-gray-matter
[4]: http://contributor-covenant.org/
[5]: https://github.com/straticjs/stratic-date-in-path/blob/master/CODE_OF_CONDUCT.md