CaiJimmy / hugo-theme-stack

Card-style Hugo theme designed for bloggers
https://stack.jimmycai.com
GNU General Public License v3.0
4.89k stars 1.6k forks source link

[exampleSite toc] set default value tableOfContents.startLevel = 1 to avoid confusion #996

Closed mahone3297 closed 6 months ago

mahone3297 commented 6 months ago

Because of this setting, everyone may have doubts and think it's a bug. For example, this one #749 So, considering this, let's set it's default value to 1 directly.

CaiJimmy commented 6 months ago

Thanks for the PR.

I set startLevel to 2 because according to MDN, it's not good practice to have multiple h1 element on one page: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements#avoid_using_multiple_h1_elements_on_one_page

Currently there's already a h1 element (site title).

mahone3297 commented 6 months ago

Learned. Thanks for your detailed explanation.