polifonia-project / ecosystem

Other
4 stars 2 forks source link

Per page "Table of content" #14

Closed enridaga closed 1 year ago

enridaga commented 2 years ago

Useful to have a TOC at the top of .md pages (e.g. Rulebook)

enridaga commented 2 years ago

@raphaelfournier suggests https://pmarsceill.github.io/just-the-docs/docs/ui-components

raphaelfournier commented 2 years ago

In fact, it's harder than it looks: it's not possible to use the :toc directive in a layout, it has to be manually added to each markdown page. No feasible at Polifonia's scale. See: https://github.com/pmarsceill/just-the-docs/issues/625 So I am considering a JavaScript script to perform this inpage-toc.

raphaelfournier commented 2 years ago

Commit eebc918 is an attempt (for stories). It's working, sticky, but not at the right place in the page.