Hugo

Add section number to headers

Hi, all

I migrated from pelican, in which I wrote a plugin for add section number. Are there any shortcodes for this like:

  ### header  => 1.0 header
     #### header => 1.1 header
     #### header =>1.2 header
  ### header =>2.0 header
     #### header => 2.1 header
       ##### header => 2.1.1 header 

Thanks.

If it’s an option for you, it can be done via CSS. Example: https://codepen.io/X-Raym/pen/dBprG

1 Like

Great!
A little problem in TOC, but simple is good.
Thank you!