gulp-marked-json
Parse Markdown YAML meta data and- compile Markdown to HTML, wrap it all up in JSON.
Last updated 3 years ago by minwe .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-marked-json 
SYNC missed versions from official npm registry.

gulp-marked-json

NPM version Build Status Dependency Status devDependency Status

  • Parse YAML front matter and Markdown body content with front-matter
  • Compile Markdown to HTML with marked

Install

$ npm install gulp-marked-json --save-dev

Usage

Like any self-respecting gulp plugin, transformed source files will flow onward to the destination of your choice with directory structure preserved. Tinker with marked’s config by passing an object.

gulpfile.js

var gulp = require('gulp');
var markdown = require('gulp-marked-json');

gulp.task('markdown', function(){
  gulp.src('./content/**/*.md')
    .pipe(markdown({
        pedantic: true,
        smartypants: true
    }))
    .pipe(gulp.dest('.'));
});

/blog/posts/bushwick-artisan.md

slug: bushwick-artisan
title: Wes Anderson pop-up Bushwick artisan
layout: centered
---

## YOLO
Chia quinoa meh, you probably haven't heard of them sartorial Holowaychuk pickled post-ironic. Plaid ugh vegan, Sixpoint 8-bit sartorial artisan semiotics put a bird on it Mission bicycle rights Club-Mate vinyl.

/blog/posts/bushwick-artisan.json

{
  "slug": "bushwick-artisan",
  "title": "Wes Anderson pop-up Bushwick artisan",
  "layout": "centered",
  "body": "<h2 id="yolo">YOLO</h2>\n<p>Chia quinoa meh, you probably haven't heard of them sartorial Holowaychuk pickled post-ironic. Plaid ugh vegan, Sixpoint 8-bit sartorial artisan semiotics put a bird on it Mission bicycle rights Club-Mate vinyl.</p>"
}

MIT LICENSE
copyright © 2014 sparkart group, inc.

Current Tags

  • 1.1.0                                ...           latest (3 years ago)

2 Versions

  • 1.1.0                                ...           3 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 3
Dependencies (4)
Dev Dependencies (4)

Copyright 2014 - 2016 © taobao.org |