Try Haml and Sass with DynamicMatic
I’ve just rolled out a new version of the Haml and Sass websites. The main design is largely changed, but the backend is: it’s now running on DynamicMatic, my StaticMatic/Sinatra bridge.
StaticMatic is a website compiler using Haml and Sass. It compiled Sass stylesheets and Haml pages in to HTML and CSS, and provides all sorts of useful helpers, as well as layouts and partials. Its output is a static website that’s ready to serve with any standard server.
The old Haml website hosted at haml.hamptoncatlin.com
used Radiant CMS to manage its content.
This worked fine, but it was a bit of a pain to update it via the web interface,
and creating relatively complex Haml layouts was difficult.
For the new sites, I wanted something where the code could be kept in Git
and compiled to static (and easily-servable) HTML and CSS whenever we deployed.
StaticMatic fulfilled this purpose admirably.
The one problem with StaticMatic was that the Haml site wasn’t completely static.
In addition to the main site, there was also the lab (formerly at lab.hamptoncatlin.com),
where people could try out Haml and Sass online.
This required something dynamic that could also use the StaticMatic layout,
so it would integrate well with the site.
Thus was DynamicMatic born. It takes a mostly-static StaticMatic site and adds just a little dash of dynamic goodness, via Sinatra, an excellent lightweight web framework. You can see it in action on the new Try Haml and Try Sass pages.
About Me
Feed
Haml/Sass 2.2 Released



Love the sites, love the work! Thank you.
But also, I’m wondering: why not markup the great praise on haml/sas-lang.com with blockquotes? Let’s rage semantics just as much as we rage haml and sass in daily work.
cheers, keep it up. truly: thanks!
c.s
You know, I meant to convert those to blockquotes when I converted the site, but I guess I forgot about it. Thanks for reminding me; they’re converted now.
How I could install DynamicMatic? Is it just a matter of dropping the rb file into the sinatra lib directory? I noticed some gemspec files in the zip file, but I couldn’t rake them. I keep getting “Don’t know how to build task default” error.
If you check out the repository, you should be able to just run
rake installand have everything work. At some point I’ll get around to releasing it to Gemcutter.Can I report a bug here? After I do “rake install” on the folder some of the folder sinatra/dynamicmatic/middleware isn’t copied into the gem folder. I had to copy and paste it to get it to work—this was happening in Windows Vista.
I haven’t regenerated the gemspec for the new version yet, because I haven’t bumped the version number, because I haven’t updated the dependency on StaticMatic to the version that has a Rack-based server, because that change hasn’t been merged into the main StaticMatic repository yet. Once it is, I’ll update and you should be able to install just fine.
For now, check out the v0.0.2 tag and install that.
I’ve just released v0.1.0 to Gemcutter. You’ll still need an unreleased version of Sinatra, but it should be much easier to install now.
Cool. But which version of Sinatra did you mean to make it dependent on? I’m fairly sure the next release of Sinatra will be 0.10.0, but the latest version of dynamicmatic is looking for 0.10.1. I mean, you might be right. I couldn’t find anything about it on the Sinatra group. I want to download it but there is no release schedule. :-(
0.10.1 is the version of Sinatra you get when you run
rake installfrom the git checkout. Unfortunately, DynamicMatic is incompatible with earlier versions, due to a bug that forbids extensions from defining something (I think it was request handlers).Is that bug already corrected? The sites look great. I’m on a Sinatra-Haml-Sass smallish project right now. May give it a go. Thanks!