-
使用Markdown书写文章时, 如何使用自定义的CSS样式 |
Beta Was this translation helpful? Give feedback.
Answered by
Lruihao
Jun 5, 2024
Replies: 1 comment 1 reply
-
有两种方式:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Lruihao
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
有两种方式:
直接写 HTML,需要设置
goldmark.renderer.unsafe
为true
, 不然 HTML 不会被渲染。使用自定义属性,Hugo 支持向 Markdown 块添加属性(例如 CSS 类),例如 表格、列表、段落等,需要设置
goldmark.parser.attribute.block
为true
。更多详情请看文档。