Comparing version 4.0.3 to 4.1.0
@@ -35,3 +35,6 @@ module.exports = { | ||
// Custom markdown renderer function, null to use the default: `markdown-it`. | ||
markdownRenderer: null | ||
markdownRenderer: null, | ||
// Options to pass to the default markdown processor, markdown-it. | ||
// See here for options: https://github.com/markdown-it/markdown-it#init-with-presets-and-options | ||
markdownOptions: {} | ||
} |
@@ -6,3 +6,3 @@ 'use strict' | ||
const globby = require('globby') | ||
const markdownIt = require('markdown-it')() | ||
const MarkdownIt = require('markdown-it') | ||
const markdownItHighlight = require('markdown-it-highlight').default | ||
@@ -28,2 +28,3 @@ const yaml = require('js-yaml') | ||
const markdownIt = MarkdownIt(options.markdownOptions) | ||
if (options.highlightCode) { | ||
@@ -30,0 +31,0 @@ markdownIt.use(markdownItHighlight) |
{ | ||
"name": "processmd", | ||
"version": "4.0.3", | ||
"version": "4.1.0", | ||
"description": "Process a directory of markdown and yaml files to JSON files", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,3 +5,3 @@ # processmd | ||
processmd uses [globby](https://github.com/sindresorhus/globby) to process directories of markdown and yaml files to a mirrored tree of JSON files. Additionally, with the `convertMode: "source"` option you can convert back from json to the input markdown and yaml files. This is mostly useful for blogs or static content for websites or other places where json is used but the readability of yaml is useful. | ||
processmd uses [globby](https://github.com/sindresorhus/globby) and [markdown-it](https://github.com/markdown-it/markdown-it) to process directories of markdown and yaml files to a JSON files with html. It has many options to format the output as you like, you can convert a nested directory of yaml to json and optionally add a "summary" file with info about all the files. Additionally, with the `convertMode: "source"` option you can convert back from json to the input markdown and yaml files. This is mostly useful for blogs or static content for websites or other places where json is easier to use but the readability of yaml is useful. | ||
@@ -156,4 +156,6 @@ Comparison to similar tools: | ||
// Custom markdown renderer function, null to use the default: `markdown-it`. | ||
markdownRenderer: null | ||
} | ||
markdownRenderer: null, | ||
// Options to pass to the default markdown processor, markdown-it. | ||
// See here for options: https://github.com/markdown-it/markdown-it#init-with-presets-and-options | ||
markdownOptions: {} | ||
``` | ||
@@ -160,0 +162,0 @@ |
50347
801
174