theme_typora_docsify icon indicating copy to clipboard operation
theme_typora_docsify copied to clipboard

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

Open Ricardo-Charles opened this issue 2 years ago • 1 comments

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

Ricardo-Charles avatar Feb 01 '23 04:02 Ricardo-Charles

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

Erimus-Koo avatar Feb 04 '23 06:02 Erimus-Koo