Rails engine that uses KSS to generate a CSS Styleguide
Ruby JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
lib
script
test
.gitignore
Gemfile
Gemfile.lock
MIT-LICENSE
README.md
Rakefile
styleguide.gemspec

README.md

Styleguide

Styleguide is a rails engine to aid in generating a CSS styleguide for your app. Assuming you have documented your stylesheets using KSS, this engine provides endpoints to display your documentation.

Think of it as a rails implementation of the KSS example, or a fork of kss-rails.

Getting Started

1. Add this to your Gemfile

gem 'styleguide', :git => "git://github.com/bmarini/styleguide.git"

2. Add this to your config/routes.rb

mount Styleguide::Engine => '/styleguide', :as => :styleguide

3. Add some templates to app/views/styleguide/css/, for example:

app/views/styleguide/css/01.0_buttons.html.erb
app/views/styleguide/css/02.0_forms.html.erb
app/views/styleguide/css/03.0_typography.html.erb

Styleguide will automatically create navigation and endpoints for each of these templates.

Template Helpers

Styleguide provides the helper styleguide_block for your styleguide templates, the same one used in the KSSexample.

<% styleguide_block  '1.1' do %>
  <button class="$modifier_class">Example Button</button>
<% end %>

This project rocks and uses MIT-LICENSE.