-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Epic] Site-wide Table of Contents #94
Comments
for me this is the only feature needed to jump to flowerapp for my sites (adding a left menu to sections, i mean) |
@StefanoCecere this will be worked on soon! (i would guess early january at this point given the holidays). |
i just created a test Tailwind site.. but it seems that the left sidebar component is a commercial product! |
I was just testing flowershow and I do miss that feature. I would love to see the LHS table of content to auto-populate by all notes on my site. Manually maintaining navigation is a cumbersome task |
@obstschale thank you for your comment! @rufuspollock let's maybe add this issue to our next sprint. |
This is next up now! We plan to work on this in the next sprint or so. |
@rufuspollock here are some notes on implementation. All in all, this seems like a pretty easy feature to implement, at least in the first iteration where we just display all the pages and don't group them or allow for other customizations. |
@olayway i moved the notes inline in the description. i think your 1st iteration sounds good so let's start implementing. |
Awesome. Thx for this MVP. It simply works. BTW: I like your iteration-approach. Looking forward to functionality, like grouping. 👍 |
the way Nextra uses to config the menus is really nice! |
@StefanoCecere I love it too! We'll work on making our content a little bit more beautiful in the next iteration and I'll add the link to Nextra's docs as an inspiration ;) |
@olayway can we update this issue with acceptance and updates on the acceptance items. Also could you link to the documentation for this feature (at the top of the description preferably with a note like "progress is being made look here" type of thing. |
Hello 👋 hope you don't mind me jumping in here but would love to see mobile support 🙏 is there any way that I can help with this? I can see that the Layout component from PortalJS is rendering this and that its currently hidden until the |
@homostellaris sorry for delayed reply - we'd love your help in improving this if you'd like to take a look. |
No worries, any particular thoughts on design or are you open to suggestions? |
@homostellaris we are open to suggestions. |
When coming to a site I want an overview or when there i want to quickly navigate around so that I can can quickly find what i want
Inspiration from eg. tailwindcss.com which has LHS table of contents for whole site and RHS for table of contents of current doc - https://tailwindcss.com/docs/installation
Status
🚧 In progress.
See this docs page to check the current status: https://flowershow.app/docs/site-wide-toc
Tasks
Research / Design
Implementation
Notes
tailwindcss.com solution
Relevant files
How does it work
they have
DocumentationLayout
which usesSidebarLayout
(layout with site-wide toc)all pages in /docs use
DocumentationLayout
- this is done in their custom MDX loaderdocumentationNav
value passed to theSidebarLayout
is an object with all the pages that should be displayed in the sidebarrequire.context
(in our case they would be imported from contentlayer) and grouped manually, see source file: https://github.com/tailwindlabs/tailwindcss.com/blob/e381990f1787878037fa54e002af190ecb5c6832/src/navs/documentation.jsComments on tailwind's implementation
Recommended design
Sidebar
component and add it to ourLayout
componentDocsLayout
which is passed toMDX
as it would be re-rendered each time upon navigating to other page - it's state won't be persisted, so e.g. current scroll position would be lostSidebar
depending on page/site config e.g.showSiteMap
_app.js
and pass it as a prop toLayout
_app.jsx
based onpageProps
✅ 1st iteration
✅ 2nd iteration
content/<folder>
and include files in subfolders of<folder>
in this group as well (or show multilevel grouping ?)(TBD) 3rd iteration
The text was updated successfully, but these errors were encountered: