kneath / kss

A methodology for documenting CSS and generating styleguides.
warpspire.com/kss
MIT License
4.04k stars 275 forks source link

Adds the relative path of a file to the section hash #59

Closed sirbrad closed 11 years ago

sirbrad commented 11 years ago

So I saw how you guys were linking to a Github file for the stylesheet responsible for each UI element. For clarification; Example link

I have my stylesheets separated into different folders so just having the current file's basename wasn't enough. So this PR adds the current file's relative path to the hash so it can be used create part of the file's url on Github. I'm pretty new to Rails let alone Ruby so I'm sure this could be handled better.

Example usage would be to set up a helper method that takes the hash as an argument and return https://github.com/user/repo/#{arg.filepath}/#{arg.filename}.