gulp-mdvars

Extract VarStream metadatas from markdown files.

6 个版本
安装
npm install gulp-mdvars
yarn add gulp-mdvars
pnpm add gulp-mdvars
bun add gulp-mdvars
README

gulp-mdvars

Parse VarStream metadatas in a markdown file and reemit the cleaned up markdown content with Gulp.

NPM version Build status Dependency Status devDependency Status Coverage Status

Usage

First, install gulp-mdvars as a development dependency:

npm install --save-dev gulp-mdvars

Then, add it to your gulpfile.js:

var mdvars = require('gulp-mdvars');
var marked = require('gulp-marked');

gulp.task('mdvars', function() {
  gulp.src(['assets/contents/*.md'])
    .pipe(mdvars({
      prop: 'metadata', // Datas will be set to the file object in the given property
     }))
    .pipe(marked()) // Do whatever you want with the cleaned up datas
    .pipe(gulp.dest('www/'));
});

gulp-mdvars is build on top of mdvars and varstream NPM modules. Please report specific issues in the corresponding repository.

API

mdvars(options)

options.prop

Type: String Default value: 'metadata'

A string value indicating in wich property metadatas must be filled.

Stats

NPM NPM

版本列表
2.0.0 2015-07-13
1.0.1 2015-07-13
1.0.0 2015-02-07
0.0.4 2014-04-26
0.0.3 2014-03-29
0.0.1 2014-01-07