trulia / hologram

A markdown based documentation system for style guides.
http://trulia.github.io/hologram
Other
2.16k stars 199 forks source link

Add section navigation #156

Closed stubbornella closed 9 years ago

stubbornella commented 9 years ago

Our designer @montypivotal came up with a design for our styleguide that included sub-navigation between sections with multiple children, which is great for complicated sections with many children. See the nav pills below the "Typography" heading in the mock below.

pui-16

This PR allows users to include sub nav on top level sections or on all sections via a configuration option nav_level in the yml.

We'd love feedback, thanks! @gpleiss & Nicole

gpleiss commented 9 years ago

This PR addresses this issue: https://github.com/trulia/hologram/issues/152

jdcantrell commented 9 years ago

This is great! For the config option nav_level: all Do you see there being other options in the future or would a more specific config flag suffice: render_sub_heading_navigation_links: true (not sure about this name)

stubbornella commented 9 years ago

It's possible there might be other configuration options in the future (maybe the developer puts in h1-h6 and it fills in menus above that level?). But maybe we should get it out there and see what other people think? It might be overkill to build in too many options from the beginning.

stubbornella commented 9 years ago

@jdcantrell - are you happy with the config options wording? I don't think we can just set it to render_sub_heading_navigation_links: true, because some people might not want nav on lower level subheadings (e.g. h3 or h4). This allows the developer to choose what level of detail makes sense for their styleguide.

That said, we only need it on the top level, so if you want us to remove that functionality and make it binary, we can.

jdcantrell commented 9 years ago

Actually, I'm fine with the functionality, not as crazy for the name. But I've not really thought of anything better so let's go ahead and merge this for now.