Markdown renderer for Hexo
Clone or download
hisaac and NoahDragon Add support for basic description/definition lists (#55)
* Add support for basic description lists

* Add tests, and fix regex based on test results

* Fix eslint errors

* Update README to include documentation on definition/description lists
Latest commit 26bc183 Jan 19, 2018


Build Status NPM version Coverage Status NPM Dependencies NPM DevDependencies

Add support for Markdown. This plugin uses marked as its render engine.


$ npm install hexo-renderer-marked --save
  • Hexo 3: >= 0.2
  • Hexo 2: 0.1.x


You can configure this plugin in _config.yml.

  gfm: true
  pedantic: false
  sanitize: false
  tables: true
  breaks: true
  smartLists: true
  smartypants: true
  modifyAnchors: ''
  autolink: true
  • gfm - Enables GitHub flavored markdown
  • pedantic - Conform to obscure parts of as much as possible. Don't fix any of the original markdown bugs or poor behavior.
  • sanitize - Sanitize the output. Ignore any HTML that has been input.
  • tables - Enable GFM tables. This option requires the gfm option to be true.
  • breaks - Enable GFM line breaks. This option requires the gfm option to be true.
  • smartLists - Use smarter list behavior than the original markdown.
  • smartypants - Use "smart" typograhic punctuation for things like quotes and dashes.
  • modifyAnchors - Use for transform anchorIds. if 1 to lowerCase and if 2 to upperCase.
  • autolink - Enable autolink for URLs. E.g. will become <a href=""></a>.


Definition/Description Lists

hexo-renderer-marked also implements description/definition lists using the same syntax as PHP Markdown Extra.

This Markdown:

Definition Term
:    This is the definition for the term

will generate this html:

  <dt>Definition Term</dt>
  <dd>This is the definition for the term</dd>

Note: There is currently a limitation in this implementation. If multiple definitions are provided, the rendered HTML will be incorrect.

For example, this Markdown:

Definition Term
:    Definition 1
:    Definition 2

will generate this HTML:

  <dt>Definition Term<br>: Definition 1</dt>
  <dd>Definition 2</dd>

If you've got ideas on how to support multiple definitions, please provide a pull request. We'd love to support it.