Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
描述
添加了mermaid支持,通过将代码块的类型设置为
mermaid来绘制。使用时需要在文章的
front-matter中设置mermaid: true并在主题的_config.yml中配置排除mermaid的语法高亮。通过Javascript动态设置居中、padding等格式,以避免污染到未开启mermaid支持时的代码块。
需要注意的是,经过我的测试,在主题的
_config.yml中配置排除mermaid的语法高亮可能是必须的,无论highlight是否开启:另外我对CSS开发并不了解,对于我动态添加的样式,希望能审查一下是否存在潜在问题。
效果