vuepress-plugin-new
This plugin requires VuePress >= 1.0.0.
A vuepress command-line plugin to create markdown file just like hexo new 'hello world'
Features
- Auto create post markdown file in current directory
- Auto inject basic frontmatter config in post file
- Create post by default, use options
-d/--draft
to create a draft - Auto fix file conflict
Install
npm i vuepress-plugin-new
Usage
Using this plugin:
// .vuepress/config.jsmoduleexports = plugins: 'vuepress-plugin-export' base: '_post'
Then run:
New post named hello vuepress
vuepress new . 'hello vuepress'
New draft named hello vuepress latter
vuepress new . 'hello vuepress latter' -d/--draft
Options
base
- Type: string
- Default: '.'
Provide the base path in the blog directory
Development
git clone https://github.com/x-bao/vuepress-plugin-newcd vuepress-plugin-newyarn
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :P
Author
vuepress-plugin-new © San Baofeng, Released under the MIT License.
Authored and maintained by San Baofeng
San Baofeng's · GitHub @San Baofeng · Twitter @Baofeng15