ppoffice / hexo-theme-hueman

A redesign of Alx's wordpress theme Hueman, ported to Hexo.
http://ppoffice.github.io/hexo-theme-hueman/
GNU General Public License v2.0
1.17k stars 335 forks source link

TOC support #237

Closed noraj closed 5 years ago

noraj commented 5 years ago

Pull request

Hexo has a helper for table of contents https://hexo.io/docs/helpers.html#toc

So I modified the template to add TOC on a per article basis and styled with a wikipedia-like style.

User just need to add this in front matter:

toc: true

I added examples in _config.yml.example but you may want to edit the wiki too.

PS : I'll advice to squash on merge if possible because of various fixes making commit history messy.

ppoffice commented 5 years ago

@noraj It's already supported: http://blog.zhangruipeng.me/hexo-theme-hueman/2015/03/10/Table-of-Contents-Example/

noraj commented 5 years ago

@ppoffice So this is answering for a half of this issue https://github.com/ppoffice/hexo-theme-hueman/issues/238

The "catalog" widget wasn't documented and the name wasn't explicit.

RIP I spent time on this feature.