nuxt-themes / alpine

The minimalist blog theme, powered by Nuxt & Markdown.
https://alpine.nuxt.space
MIT License
294 stars 54 forks source link

[Request] Sticky table of contents in desktop #96

Open LazyGeniusMan opened 1 year ago

LazyGeniusMan commented 1 year ago

It would be nice if there is table of contents in layout. It would be useful when the page content/article content is long. The table of contents on docus theme is nice.

Maybe make it configurable too in frontmatter, similiar how we can specify layout. Something like toc: true to show and toc: false to hide.

I also have question that a little bit related about improving navigation, does pagination is on the scope/plan of this theme? I notice that articles didn't have that.

atinux commented 1 year ago

Thanks @LazyGeniusMan

It is a nice idea for adding a table of contents, where would you see it?

Also, pagination is not planned at the moment, do you have a lot of articles?

LazyGeniusMan commented 1 year ago

It is a nice idea for adding a table of contents, where would you see it?

Just like docus is nice, on the right in desktop and sticky top on mobile. I'm not sure about RTL languange tho, whether they prefer it on the left or not.

Also, pagination is not planned at the moment, do you have a lot of articles?

Not really but it would be nice to have some kind of basic organization of articles like pagination or tag. Tag could also be used for related article section below article, not sure if it's possible or on the scope of this themes tho.

Tahul commented 1 year ago

Curious of your thoughts on that @bdrtsky :)

Benbinbin commented 1 year ago

Just build something like this for fun :stuck_out_tongue_closed_eyes: but finally it seems more useful

https://user-images.githubusercontent.com/40909550/231326757-202edffc-fe01-4140-850b-83abcb9067d5.mp4

the Tree Catalog is powered by D3.js

Tahul commented 1 year ago

I love it!

Tahul commented 1 year ago

@bdrtsky what do you think?