Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lsongdev/kelp-generator
:sparkles: simple file generator
https://github.com/lsongdev/kelp-generator
generator hexo jekyll jekyllrb static-site-generator yeoman-generator
Last synced: 14 days ago
JSON representation
:sparkles: simple file generator
- Host: GitHub
- URL: https://github.com/lsongdev/kelp-generator
- Owner: lsongdev
- License: mit
- Created: 2019-10-11T12:41:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-12T07:48:50.000Z (over 3 years ago)
- Last Synced: 2024-12-31T10:05:27.084Z (16 days ago)
- Topics: generator, hexo, jekyll, jekyllrb, static-site-generator, yeoman-generator
- Language: JavaScript
- Homepage: https://npmjs.org/@kelpjs/gen
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## @kelpjs/gen
> simple file generator
### Installation
```bash
$ npm install @kelpjs/gen
```### Example
```js
const generate = require('@kelpjs/gen');generate({
source: './src',
output: './build',
plugins: {
}
});```
@kelpjs/gen/flow example
```js
const flow = require('@kelpjs/gen/flow');
const read = require('@kelpjs/gen/plugins/read');
const source = require('@kelpjs/gen/plugins/source');
const output = require('@kelpjs/gen/plugins/output');
const matter = require('@kelpjs/gen/plugins/matter');
const layouts = require('@kelpjs/gen/plugins/layouts');
const metadata = require('@kelpjs/gen/plugins/metadata');
const markdown = require('@kelpjs/gen/plugins/markdown');
const permalink = require('@kelpjs/gen/plugins/permalink');
const collection = require('@kelpjs/gen/plugins/collection');flow()
.use(source('./src'))
.use(read())
.use(metadata({
sitename: 'My Blog'
}))
.use(matter())
.use(markdown())
.use(permalink('/:year/:month/:title.html'))
.use(collection({
name: 'index.html',
layout: 'index.ejs'
}))
.use(layouts({
templates: './templates'
}))
.use(output('./build'))
.run();
```### Contributing
- Fork this Repo first
- Clone your Repo
- Install dependencies by `$ npm install`
- Checkout a feature branch
- Feel free to add your features
- Make sure your features are fully tested
- Publish your local branch, Open a pull request
- Enjoy hacking <3### MIT
This work is licensed under the [MIT license](./LICENSE).
---