Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 1.43 KB

README.md

File metadata and controls

57 lines (38 loc) · 1.43 KB

Styledown for Ruby

Write maintainable CSS styleguides using Markdown

Ruby implementation for Styledown2.

Install

gem 'styledown2'

API

See API reference for full API reference.

Object-oriented API

This gem provides a Styledown class.

styleguide = Styledown.new('/path/to/styleguides')
styleguide.render  # Updates #output

styleguide.output
# => {
#   'buttons.html' => { 'contents' => '...' },
#   'forms.html' => { 'contents' => '...' },
#   'styledown/script.js' => { 'contents' => '...' }
# }

See API reference for full reference on the Styledown class.

Functional API

This implements the same functional API as the JavaScript styledown2.

files  = Styledown.read(...)
data   = Styledown.parse(files)
output = Styledown.render(data)

See API reference for full reference on Styledown class methods.

Thanks

styledown2-ruby © 2017+, Rico Sta. Cruz. Released under the MIT License.
Authored and maintained by Rico Sta. Cruz with help from contributors (list).

ricostacruz.com  ·  GitHub @rstacruz  ·  Twitter @rstacruz