hexo-renderer-markdown-it-plus v1.0.6
hexo-renderer-markdown-it-plus
This renderer plugin uses Markdown-it as a render engine on Hexo.
This renderer plugin is forked from hexo-renderer-markdown-it.
Add some plugins and support third-part markdown-it plugin.
This is demo project.
Main Features
- Support for Markdown
- Extensive configuration
- Faster than the default renderer | hexo-renderer-marked
- sub,
H~2~0H20 - sup,
x^2^x2 - ins,
++Inserted++Inserted,~~Del~~Del - Katex, referer
- emoji, referer
- toc&anchor
@[toc] - deflist
- abbr
- footnote
- mark
Install
npm un hexo-renderer-marked --save
npm i hexo-renderer-markdown-it-plus --saveOptions
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.
markdown_it_plus:
highlight: true
html: true
xhtmlOut: true
breaks: true
langPrefix:
linkify: true
typographer:
quotes: “”‘’
pre_class: highlightKatex
Katex plugin is enabled by default. However, this renderer alone does not work out of the box for mathematical formulas to display correctly on your website. Therefore, you do not need to do anything if you do not want to use Katex. Otherwise, if you want to use katex, you must add this css style to your website:
https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.9.0/katex.min.css
Advanced Options
The markdown-it plugins listed above is enabled by default. If you want to disable any plugin, see the configuration example below:
markdown_it_plus:
highlight: true
html: true
xhtmlOut: true
breaks: true
langPrefix:
linkify: true
typographer:
quotes: “”‘’
plugins:
- plugin:
name: markdown-it-mark
enable: falseplugins enabled by default:
markdown-it-emojimarkdown-it-submarkdown-it-supmarkdown-it-deflistmarkdown-it-abbrmarkdown-it-footnotemarkdown-it-insmarkdown-it-mark@iktakahiro/markdown-it-katexmarkdown-it-toc-and-anchor
Add other markdown-it Plugins
If you want to add a plugin named as markdown-it-something:
1.Install this plugin
npm install markdown-it-something --save2.config main hexo _config.yml
markdown_it_plus:
# ...
plugins:
- plugin:
name: markdown-it-something
enable: true
options:
# this is plugin optionLOG
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago