Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start ordered list from number other then 1 in Jekyll?

I have Markdown file that look like this:

1. First

Some text and other stuff

2. Second

Othe stuff

But after render it's generated as:

1. First

Some text and other stuff

1. Second

Othe stuff

Is there a solution to make second ordered list start from 2?

like image 894
jcubic Avatar asked Feb 04 '18 19:02

jcubic


2 Answers

jekyll is using Kramdown as Markdown parser that support setting custom attributes (see docs). And html5 support start attribute that change start number of ordered list see MDN.

The markdown file need to look like this:

1. First

Some text and other stuff

{:start="2"}
2. Second

Othe stuff
like image 168
jcubic Avatar answered Nov 10 '22 01:11

jcubic


Another way in this case is to simply indent the Some text and other stuff paragraph with 4 spaces. Then 2. Second will know to continue the numbering.

like image 36
xji Avatar answered Nov 10 '22 02:11

xji