Skip to content

amehime/hexo-renderer-multi-markdown-it

master
Switch branches/tags
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
fix
Oct 6, 2020
Apr 29, 2020
Apr 25, 2020
Sep 27, 2020
fix
Jul 5, 2020
fix
Oct 6, 2020

hexo-renderer-multi-markdown-it

This renderer plugin uses Markdown-it as a render engine on [Hexo].

This renderer plugin is forked from hexo-renderer-markdown-it and hexo-renderer-markdown-it-plus.

And minify tool is forked from hexo-neat.

中文使用说明

Installation

Warning: make sure you're inside the main hexo directory before starting this guide.

A default Hexo installation will include a markdown renderer plugin which uses marked, so you will have to remove it if you want to use this renderer.

npm un hexo-renderer-marked --save

or

yarn remove hexo-renderer-marked

If you have already removed the default renderer, and others you might of added, you can now safely install hexo-renderer-multi-markdown-it

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

or

yarn add hexo-renderer-multi-markdown-it

if an error is reported as

ERROR: Failed to download Chromium r515411! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.

please try again with the following command

yarn add hexo-renderer-multi-markdown-it --ignore-scripts

Options

Configuring the renderer is a fairly simple task because all the settings are in the main hexo _config.yml file.

You just need to open it in your favourite text editor and write down your configuration.

# opitions for renderer
markdown:
  render:
    html: false
    xhtmlOut: true
    breaks: true
    linkify: true
    typographer: 
    quotes: '“”‘’'
  plugins:
    - plugin:
        name: markdown-it-toc-and-anchor
        enable: true
        options:
          tocClassName: 'toc'
          anchorClassName: 'anchor'
    - plugin:
        name: markdown-it-multimd-table
        enable: true
        options:
          multiline: true
          rowspan: true
          headerless: true
    - plugin:
        name: ./markdown-it-furigana
        enable: true
        options:
          fallbackParens: "()"
    - plugin:
        name: ./markdown-it-spoiler
        enable: true
        options:
          title: "你知道得太多了"

# options for minify
minify:
  html:
    enable: true
    exclude:
      - '**/json.ejs'
      - '**/atom.ejs'
      - '**/rss.ejs'
  css:
    enable: true
    exclude:
      - '**/*.min.css'
  js:
    enable: true
    mangle:
      toplevel: true
    output:
    compress:
    exclude:
      - '**/*.min.js'

disable the highlight of site _config.yml

# Writing
...
highlight:
  enable: false

prismjs:
  enable: false

default Supported Plugins and Examples

About

A renderer plugin for Hexo based on Markdown-it and auto Minify HTML, CSS, JS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published