expressjs.com icon indicating copy to clipboard operation
expressjs.com copied to clipboard

add table of contents

Open bjohansebas opened this issue 11 months ago • 4 comments

We should add a table of contents on each page to make it easier to navigate the content.

I would suggest placing the table on the right side, as several site generators do, like Docusaurus or Astro Starlight, and probably adding #1759 at the top or bottom.

bjohansebas avatar Feb 04 '25 04:02 bjohansebas

We still need to make the TOC generate automatically, we can use this plugin to achieve that

bjohansebas avatar Mar 01 '25 22:03 bjohansebas

Hi @bjohansebas, do we really need to generate the TOC? I am asking because we already have written TOC files. So, why should we invest in generating the same HTML again? Unless we want to add the TOC to all website pages, it may not be necessary.

ShubhamOulkar avatar Mar 09 '25 04:03 ShubhamOulkar

this would help reduce the existing layouts and would prevent the need to manually write the TOC (which is prone to errors). It would also reduce the maintenance load on the page if automated, either with the plugin or another method, while the page is being built.

The TOC is important to me, as it helps quickly navigate to content and enhances the documentation experience.

bjohansebas avatar Mar 10 '25 01:03 bjohansebas

@bjohansebas, JS solution, WDYT? This plugin https://rubygems.org/gems/jekyll-toc/ is headache.

ShubhamOulkar avatar Jul 21 '25 14:07 ShubhamOulkar