FormidableLabs / formidable-oss-landers

MIT License
2 stars 0 forks source link

Add file helpers #13

Closed treyhoover closed 4 years ago

treyhoover commented 4 years ago

Adds file helpers and the helpers-demo example.

You can see the helpers in action here

With a simple recursive List component to render the table of contents: image

boygirl commented 4 years ago

@treyhoover The last thing that needs to be addressed here is figuring out how to support directory / file level TOC. It might make sense to make a separate method for this, since I think in most cases the heading TOC will only be needed per page. Here's an example in Renature: https://formidable.com/open-source/renature/docs/getting-started/controlling-animation-states/

treyhoover commented 4 years ago

@boygirl I pushed some changes based on your comments. Still have a few improvements I'd like to make, but let me know if this is moving in the right direction.

Also, the TOC links on the doc pages don't scroll right now but I think that's just an issue with reach router.

boygirl commented 4 years ago

@treyhoover this is looking good! Thanks for splitting out the page TOC helper. The one thing that is still missing is the directory / file based TOC helper. We could just use the list of the route attributes you add to each page, and format that into a TOC on the client side though.

boygirl commented 4 years ago

@treyhoover I think this is good to merge.