New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hexo-renderer-markdown-it

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-renderer-markdown-it

Markdown-it is a Markdown parser, done right. A faster and CommonMark compliant alternative for Hexo.

2.1.1
Source
npm
Version published
Weekly downloads
998
-17.18%
Maintainers
1
Weekly downloads
 
Created
Source

hexo-renderer-markdown-it

Add support for Markdown and CommonMark. This plugin uses Markdown-it as a render engine on Hexo.

Installation

In it's current version, Hexo with hexo-renderer-marked predefined as a markdown renderer.

To use hexo-renderer-markdown-it you will have to:

Step 1 - Remove hexo-renderer-marked

$ npm un hexo-renderer-marked --save

Step 2 - Install hexo-renderer-markdown-it

$ npm i hexo-renderer-markdown-it --save

Step 3 - Configure the plugin (or leave empty for reasonable defaults).

Configuration

While the options to enable, or disable Markdown-it plugins is not yet implemented, most if not all of the options available on the vanila parser have been exposed.

Please only choose one of the following options.

Option 1 - Choose defaults

You can choose the CommonMark Strict Mode, which tells the render to follow the latest CommonMark spec.

# Markdown-it config
## Docs: https://www.npmjs.com/package/hexo-renderer-markdown-it
markdown: 'commonmark'

Or you can use Zero Mode. This disables most of the parser functionality. You should only use this mode if you want nothing more than italics or bold.

# Markdown-it config
## Docs: https://www.npmjs.com/package/hexo-renderer-markdown-it
markdown: 'zero'
Option 2 - Don't pass any options to the parser

If you don't pass any configurations to the parser, it defaults to something very close to Github Flavored Markdown.

Option 3 - Specify each module (extending from GFM)

You have the option to pass a very specific configuration to the parser.

# Markdown-it config
## Docs: https://www.npmjs.com/package/hexo-renderer-markdown-it
markdown:
  html: true
  xhtmlOut: false
  breaks: false
  linkify: true
  typographer: true
  quotes: '“”‘’'
  • html: true || false If true, the renderer will allow HTML tags inside markdown documents be passed to the resulting document.
  • xhtmlOut: true || false If true, the renderer will export XHTML compatible tags (<br /> instead of <br>). This feature exists only there to ensure CommonMark compliance.
  • breaks: true || false Line breaks in the source file will be parsed into <br> tags.
  • linkify: true || false Parser returns proper links from links inline with the text.
  • typographer: true || false Enables substitution for common typography elements like © and curly quotes.
  • quotes: Option that defines the double and single quotes used for substituting dumb quotes if typographer is set to true.

Keywords

hexo

FAQs

Package last updated on 12 Feb 2015

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