Project

chisel

0.0
No commit activity in last 3 years
No release in over 3 years
Chisel is tool to generate simple, resource-based static Web sites.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.6.0
>= 4.2.7
 Project Readme

Chisel

Chisel is tool to generate simple, resource-based static Web sites. Hack together some pages in HTML and CSS, taking advantage of ERB and markup languages like Textile and markdown, and write your resource classes in pure Ruby.

Features

  • Nested page layouts — Because you hate Dreamweaver templates
  • Resource-centric design — Similar to models in Ruby on Rails, but more flexible
  • Easy handling of relative paths — “../../../no/more”
  • Full ERB evaluation — Execute arbitrary code today!
  • Your favorite markup langauge — Interchange HTML, Textile, and Markdown

Who are you?

You are…

  • …a Web developer familiar with HTML, CSS, JS, blah, blah, blah
  • …comfortable hacking around in Ruby (probably familiar with Rails)
  • …looking for an easy way to create a relatively complex static-HTML Web site
  • …probably good-looking, smart, and funny

Getting started

First-timers


gem install chisel
git clone git@github.com:schrockwell/chisel-demos.git demos
cd demos/blog
chisel -s

Go to http://localhost:4000/ in a Web browser to see what you’ve done.

Here’s a synopsis of the site’s directory structure:

  • _config.ymlYAML site configuration file; use it to pass arbitrary data on to pages in your site
  • _resources/ – Contains the pure Ruby resource class files
  • _views/ – Contains pages and partial pages that are rendered by Chisel
  • _views/_layout/ – Put your layouts here
  • _views/_layout/main.html.erb – A default layout
  • index.html.erb – Your very own home in Cyberspace

Seasoned veterans


gem install chisel
mkdir facebook_two
cd facebook_two
chisel new
chisel -s

Point your Web browser of choice at http://localhost:4000/ to see your fancy new Chisel site.

It’s not a bug, it’s a feature!

How files are handled

  • Every file with an .erb extension is evaulated by Chisel
  • Files and directories beginning with underscores are ignored
  • Append markup languages as extensions, e.g.: about.html.textile.erb
  • All other files and directories are copied verbatim

In words: Every page you want Chisel to evaluate must have a .erb extension. Every other file and directory will be copied blindly to the output directory, except for files and directories beginning with an underscore (_). These have a special meaning to Chisel.

Configuration options (_config.yml)

  • output_dir _(default: output) – A string pointing to the directory that will contain the generated site. If you run Chisel directly on your Web server, you can configure output_dir to instantly publish your site.

That’s it! Any other options you specify will be passed on to views in the @config variable.

Extra credit

  • Add Disqus to your blog posts so users can leave comments
  • Post a link to your Chisel-powered site in the Wiki

If you liked Chisel, you may also enjoy…

  • Jekyll — Chisel draws many ideas from this static blogging engine created for GitHub
  • webgen — A more mature, full-featured Ruby static site generator
  • Textile Reference — Textile is my markup language of choice
  • Markdown Reference — Markdown is another popular one