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

hexo-renderer-marked

Package Overview
Dependencies
Maintainers
8
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-renderer-marked

Markdown renderer plugin for Hexo

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21K
increased by7.42%
Maintainers
8
Weekly downloads
 
Created
Source

hexo-renderer-marked

Build Status NPM version Coverage Status NPM Dependencies NPM DevDependencies

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

Installation

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

Options

You can configure this plugin in _config.yml.

marked:
  gfm: true
  pedantic: false
  breaks: true
  smartLists: true
  smartypants: true
  modifyAnchors: ''
  autolink: true
  sanitizeUrl: false
  headerIds: 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.
  • 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. Must be integer.
  • autolink - Enable autolink for URLs. E.g. https://hexo.io will become <a href="https://hexo.io">https://hexo.io</a>.
  • sanitizeUrl - Remove URLs that start with javascript:, vbscript: and data:.
  • headerIds - Insert header id, e.g. <h1 id="value">text</h1>. Useful for inserting anchor link to each paragraph with a heading.

Extras

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:

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

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:

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

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

Keywords

FAQs

Package last updated on 21 Aug 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc