xaprb / story

Beautiful responsive Hugo blog theme focused on simplicity and elegance, with many extra features including presentations, math typesetting, music notation, and search.
MIT License
167 stars 63 forks source link

[Feature Request] Table of Contents #46

Closed rootkea closed 2 years ago

rootkea commented 6 years ago

Hello!

I'm new to (Hu)Go and just tried story theme and I really like it!

Often at times, when the technical article gets some considerable length it becomes cumbersome to jump around the article. It would be really cool if we could have the table of contents beside the post.

I'm mainly looking at the one provided by AllinOne theme.[0]
Even the one from er theme looks nice too.[1]

[0] https://orianna-zzo.github.io/AllinOne-html/blog/2018-08/%E9%9F%B3%E4%B9%90%E5%89%A7catrepo/ [1] https://themes.gohugo.io//theme/er/post/markdown-syntax/

xaprb commented 5 years ago

Hi, since you opened #49 which is similar, I think we should continue the discussion there.

rootkea commented 5 years ago

Umm.. #49 is about the "archives" page while this issue is about the Table of Contents (ToC) of a particular post.

Please take a look at these AllinOne and er examples.

xaprb commented 5 years ago

My mistake, thanks for catching that.

tchinchow commented 4 years ago

Hello,

This message is merely for the sake of curation : I'm just gathering pointers in case someone looks into this feature request.

From the links that @rootkea provides, I can read that ER Hugo template uses tocbot. This is probably no longer necessary and therfore not a good idea.

Indeed Hugo now has its own mechanism... ... and it seems that it can be extensively configured.

Note:

I tried Hugo's builtin method very quickly with Story and it works indeed (hugo v0.68.3).

I believe that it's now just a matter of writing the right HTML+CSS on blog posts. I suppose this could be enabled globally or locally through Story's feature mechanism.

Maybe I'll give it a try if I find some time.

xaprb commented 2 years ago

I’m sorry but I’m not interested in maintaining this theme anymore. I’m glad it’s been useful, and I encourage someone to continue development elsewhere. The MIT license is very permissive and should not place any burdensome restrictions upon that.