Socket
Book a DemoInstallSign in
Socket

hexo-renderer-marked-plus

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-renderer-marked-plus

Markdown renderer plugin for Hexo with configuable renderer

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

Markdown renderer

Add support for Markdown. This plugin uses marked as render engine. This fork enables theme developer to have more control over generated HTML format.

Override Marked Renderer

Marked has configurable renderer (do not confuse with Hexo's renderer) for custom HTML formating. Theme developers can override marked renderer within a Hexo theme script:

hexo.markedRenderer = {
  init: function() {
    // Called before rendering a post
  },
  heading: function(text, level) {
    // Default method can be accessed via:
    // this._super.heading(text, level)
    return "Your custom heading format"
  },
  eof: function() {
    // Called after marked finish rendering
    // Returned string will be appended to output HTML
    return '';
  }
}

For more information on how to override marked renderer, see here

Install

$ npm install hexo-renderer-marked-plus --save

Options

You can configure this plugin in _config.yml.

marked:
  gfm: true
  pedantic: false
  sanitize: false
  tables: true
  breaks: true
  smartLists: true
  smartypants: true
  • gfm - Enables GitHub flavored markdown
  • pedantic - Conform to obscure parts of markdown.pl 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.

Keywords

hexo

FAQs

Package last updated on 24 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts