我们发布了官方插件 hexo-renderer-markdown-it 的新版本。
重大变更
我们更新了默认配置,使其与 hexo-renderer-marked #90、#92 保持一致。
- 新默认值
markdown:
render:
html: true
xhtmlOut: false
breaks: true
linkify: true
typographer: true
quotes: '“”‘’'
plugins:
anchors:
level: 2
collisionSuffix: ''
permalink: false
permalinkClass: 'header-anchor'
permalinkSymbol: '¶'
case: 0
separator: '-'- 之前的默认值(其他配置保持不变)
markdown:
anchors:
permalink: true
level: 1
collisionSuffix: 'v'
case: 1需要 Node 8.6+ #79
特性
包含官方 markdown-it 插件 #52、#86、#87
- 它们默认情况下是禁用的
- 包含的插件
markdown:
plugins:
- markdown-it-abbr
- markdown-it-cjk-breaks
- markdown-it-container
- markdown-it-deflist
- markdown-it-emoji
- markdown-it-footnote
- markdown-it-ins
- markdown-it-mark
- markdown-it-sub
- markdown-it-sup包含 markdown-it-cjk-breaks 插件 #56
- 要启用
markdown:
plugins:
- markdown-it-cjk-breaks为
anchors:
添加新的选项 #95markdown:
anchors:
case: 0 # Set to 1 to transform anchors to lowercase, 2 for uppercase
separator: '-' # Replace the space with a dash, can be any character