Erimus-Koo / theme_typora_docsify

A theme that present SAME STYLE in Typora and Docsify.
44 stars 3 forks source link

Can we change the css file to make the auto numbering to start from H1 ? #7

Open Ricardo-Charles opened 1 year ago

Ricardo-Charles commented 1 year ago

Thank you so much for your auto numbering for the headings, but the current auto numbering for the headings starts with H2 , how can we change it to start with H1 ? Because all my markdown files don`t use H1 as TITLE. I tried to modify the css file, but I failed.

image

Erimus-Koo commented 1 year ago

Edit .less file

If you can edit the .less file, it will be easy to edit the level.

In the line 169, you can find such a line:

// ==================== Auto Numbering for Headings

First remove the // left of the line, from 172 to 174, as below: image

Then you need add the H1 counter to other level Headers, same as the image, the first counter is H2, you should add a H1 counter before it. image

Edit .css file

Directly edit .css file is not recommand. But you also can do it. Add counter-reset at about line 187: image

And add H1 counter from line 207 image