alex-shpak / hugo-book

Hugo documentation theme as simple as plain book
https://hugo-book-demo.netlify.app
MIT License
3.45k stars 1.18k forks source link

How to achieve feature where clicking collapsed item to display children items but not to jump #264

Closed sodacorsair closed 4 years ago

sodacorsair commented 4 years ago

Hi, I like your awesome theme. I want to know how to achieve feature where when clicking collapsed menu item the webpage wouldn't jump to the item index page directly but just to display its subordinate items, for example you can have a look in this similiar hexo theme. If there isn't such a feature, could you give some hints to modify, I only know a little bit about front-end. Thanks in advance.

alex-shpak commented 4 years ago

Hi! Right now is not possible. One goals of theme is to be accessible without JS, which makes making collapsible menus challenging task.

Related discussions: https://github.com/alex-shpak/hugo-book/issues/241 https://github.com/alex-shpak/hugo-book/issues/231