trulia / hologram

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

Multiple styleguides for different sections? #251

Open sugarenia opened 8 years ago

sugarenia commented 8 years ago

Is there a clean, "official" way to have multiple styleguides on the same codebase?

Something like:

http://domain.com/public/styleguide an index page with an intro and links to different sections, e.g. /backend, /marketing, /application

http://domain.com/public/styleguide/backend the backend index, showing only widgets from the app/assets/stylesheets/backend folder (CSS include is ONLY app/assets/stylesheets/backend.scss

http://domain.com/public/styleguide/marketing the marketing index, showing only widgets from the app/assets/stylesheets/marketing folder (CSS include is ONLY app/assets/stylesheets/marketing.scss)

etc.

Any ideas?

jdcantrell commented 8 years ago

There's not an "official" way to do this, my initial thought was to use multiple config files for generating the different style guides. You might be able to do some trickery in the header erb for including the correct css but that seems a little gross. I would need to think about it more to see if it made sense to have some sort of configuration that can do this.

sugarenia commented 8 years ago

@jdcantrell Yes, multiple configs were our first idea as well, but we wanted to keep it as contained as possible, since it's essentially the same product.

Thanks for considering it, do let us know :)