vuepress-mdgen-cli
v1.0.3
Published
A CLI tool to generate Markdown files for VuePress2 documentation.
Maintainers
Readme
vuepress-mdgen-cli
A CLI tool to generate Markdown files with your custom meta info by templates for VuePress2 project.
Install
npm install -g vuepress-mdgen-cliUse
mdgen <filename> [templatename]Custom Templates
You can add custom templates in your project directory by creating a .mdgen-templates folder. The folder should include a config.json file and any additional template files.
Example
Create a
.mdgen-templatesfolder at{You vuepress project root}\srcor{You vuepress project root}\docs:Add a
config.jsonfile at the folder to define your templates:
{
"default": {
"directory": "./src",
"categories": "Uncategorized",
"template": "default.md"
},
"custom-template": {
"directory": "./docs/custom",
"categories": "Custom",
"template": "custom.md"
}
}- Add a Markdown template file, e.g., custom-template.md:
---
title: {{ title }}
date: {{ date }}
categories: {{ categories }}
---
# {{ title }}
Welcome to your custom markdown template.
<!-- more -->