I use haml a lot when developing web applications but for the job I am doing right now all the client needs is flat HTML files and some javascript. There are quite a few files I thought it might be easier to code them all up using haml, with a layout file to capture the stuff common to each page.
I checked the haml docs and they offer a simple example:
haml hello_world.haml hello_world.html
that happily generates a hello world page from my template. I’ve scoured the docs for information on how I could get it to recognise a layout.haml file however but have not had any luck.
The goal is to set up a directory structure like
/
- templates/
- layout.haml
- other.haml
- pages.haml
- output/
and from command line just go
haml templates output
and generate other.html and pages.html
Is this possible, or am I looking at the wrong tool for this job?
I’d look at using Jekyll with a HAML workflow something like this http://mikeferrier.com/2011/04/29/blogging-with-jekyll-haml-sass-and-jammit/