You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
%E5%85%B3%E4%BA%8E-Hugo-Paper-Mod-%E4%B8%BB%E9%A2%98%E7%9A%84-Toc-%E9%85%8D%E7%BD%AE/
Hugo 默认生成 Toc 的只是一二三级标题,如果像六级标题都可以生成 Toc ,可以这样子配置:
1 2 3 4 5 markup: tableOfContents: startLevel: 1 endLevel: 6 ordered: false 参考文章:
1 https://atlex00.com/hugo/toc/#configure-toc 如果想让 Hugo 拥有侧边栏 Toc ,参考我 fork 的这个仓库:
1 https://github.com/HCY-ASLEEP/hugo-PaperMod-Mod-Sidebar-Toc 顺便说一句题外话,就是 Hugo 的各个文件夹都有着不同的用处,值得去了解一下,比如说 archetypes 文件夹用于存放 hugo new 的生成模板,而 assets 文件夹用于存放自定义的 override 的 css ,layouts 文件夹用于存放自定义的 js 或者 html
https://hcy-asleep.github.io/%E5%85%B3%E4%BA%8E-Hugo-Paper-Mod-%E4%B8%BB%E9%A2%98%E7%9A%84-Toc-%E9%85%8D%E7%BD%AE/
Beta Was this translation helpful? Give feedback.
All reactions