https://github.com/cbeer/rails-styleguide
Rails Engine version of the kneath/kss styleguide generator
https://github.com/cbeer/rails-styleguide
Last synced: about 2 months ago
JSON representation
Rails Engine version of the kneath/kss styleguide generator
- Host: GitHub
- URL: https://github.com/cbeer/rails-styleguide
- Owner: cbeer
- License: mit
- Created: 2011-12-06T16:15:40.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-12-07T18:57:09.000Z (over 13 years ago)
- Last Synced: 2025-03-24T05:34:51.443Z (2 months ago)
- Language: Ruby
- Homepage:
- Size: 133 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# Rails-Styleguide
This is a Rails 3.1 mountable Engine version of kneath/kss, a CSS
documentation methodology.## Installation
Add the engine to your `Gemfile`:
```ruby
gem "rails-styleguide"
```Configure the route to the engine:
```ruby
mount Styleguide::Engine => "/styleguide"
```Visit [http://localhost:3000/styleguide](http://localhost:3000/styleguide)
Override [`app/views/styleguide/default.html.erb`](https://github.com/cbeer/rails-styleguide/blob/master/app/views/styleguide/default.html.erb) in your local application to build your own styleguide.
## Configuration
By default, this engine will look in the host application `./app/assets/stylesheets` for
stylesheets to consume. You can change this default, or add additional
styleguides, by adding an initalizer to your application, e.g.:`config/initializers/styleguide_config.rb`
```ruby
StyleguideController.config.stylesheets_path[:default] = '/path/to/stylesheets'
StyleguideController.config.stylesheets_path[:other_plugin_stylesheets] = '/path/to/my_plugin/app/assets/stylesheets'
```In this example, when you visit
[http://localhost:3000/styleguide](http://localhost:3000/styleguide),
the styleguide will use stylesheets from
`/path/to/stylesheets`. If you visit
[http://localhost:3000/styleguide/other_plugin_stylesheets](http://localhost:3000/styleguide/other_plugin_stylesheets), the stylesheets from `/path/to/my_plugin/app/assets/stylesheets` will be used instead.