markdown - 如何在 Jekyll 中从 1 以外的数字开始有序列表?

标签 markdown jekyll

我有如下所示的 Markdown 文件:

1. First

Some text and other stuff

2. Second

Othe stuff

但是渲染后它生成为:

1. First

Some text and other stuff

1. Second

Othe stuff

有没有办法让第二个有序列表从2开始?

最佳答案

jekyll 使用 Kramdown 作为支持设置自定义属性的 Markdown 解析器(请参阅 docs )。 html5支持改变有序列表开始编号的start属性,参见MDN .

Markdown 文件需要如下所示:

1. First

Some text and other stuff

{:start="2"}
2. Second

Othe stuff

关于markdown - 如何在 Jekyll 中从 1 以外的数字开始有序列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48612358/

相关文章:

Markdown 不缩进第一段

shell - 将 Markdown 文件重新格式化为特定的代码风格

重定向 GitHub Pages 上的多个网页

html - iPhone 的 "Add to Favorites"需要多大的图标大小?

ruby - 在 Jekyll 中使用 Live Reload

visual-studio-code - 目录中的 MarkdownTOC 在更新和插入时用 auto 替换换行符

html - 是否可以遍历 Jekyll 中的子文件夹?

visual-studio-code - 在 Visual Studio Code 中编辑 Markdown 文件时如何在标题之间导航?

jekyll/液体 : given key access value from hash in template

ruby - jekyll 插件在 github 上不起作用