Sinatra Website / Documentation
This repo contains the Sinatra website and documentation sources published at http://sinatra.github.com/.
Grab the sources from GitHub:
$ git clone git://github.com/sinatra/sinatra.github.com.git $ cd sinatra.github.com
Make sure you have the
bundler gem installed on your machine:
$ gem install bundler
$ bundle install
Run the test server:
$ rake server
Changes are immediately available at:
Sass / CSS
Gulp was set up to streamline your build process. Simply run:
$ gulp watch
gulp watch triggers a couple of processes:
- After changes have been introduced in the
_sassdirectory, it first builds uncompressed
.cssfiles from the corresponding
.sassfiles and puts them into
- Gulp also watches any changes made directly made on
.cssfiles in the
- In turn, these or any changes in
/css/developmentwill get compressed, prefixed and purified of any obsolete style declarations before being placed in their final destination at
- Your site is reloaded automatically using Browsersync which watches any changes to
/css. No need to install any additional gimmicks.
That means Gulp is configured so that you can either work on
.sass files in the
/_sass directory or on
.css files directly in the
/css/development directory. The legacy styles are placed in there as well atm. That being said, if you want to introduce changes in
/css/development, you need to create new filenames to avoid being overwritten when new versions of Sass files get built.
Contributing directly to one of the existing Sass partials or via new ones of your own would be the preferred option. After some refactoring, we want to only serve one authorative stylesheet (application.css) that imports all the Sass partials during the build process. It would be appreciated if you could introduce your changes in the indented Sass syntax. Not a friend of curlies and stuff.
See GitHub's "Fork A Repo" for more information.
Creating Blog Posts
Blog posts are stored under the
_posts directory. To create a new blog post
and open your
thor blog:new 'Blog Post Title'
This requires Thor:
$ gem install thor
You will need thor, rdoc, haml and mislav's hanna gem to rebuild static files and the API docs:
$ gem install thor $ gem install rdoc -v 2.3.0 $ gem install haml -v 2.0.4 $ gem install mislav-hanna --source=http://gems.github.com/
rake pull build
The generated files under the "_includes" and "api" directories need to be committed after building. To regenerate and add those files to your index for the next commit: