Skip to content

Instantly share code, notes, and snippets.

@thinkerbot
Created February 4, 2012 03:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thinkerbot/1734959 to your computer and use it in GitHub Desktop.
Save thinkerbot/1734959 to your computer and use it in GitHub Desktop.
An example of a static site with the tilt extension

Description

This just illustrates how you would setup a static site to be built using the proposed extension to the tilt exe. To build, just run build:

./build

And the compiled site will appear in the site directory. If you wanted to use different layouts or attributes for a specific set of templates, then all you'd have to do is add to the build script.

title: Example
message: Yup, pretty simple.
#!/bin/sh
find templates -type f | tilt -a attributes.yml -y layout.erb -i templates -o site -f -
<h1><%= message %></h1>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><%= title %></title>
</head>
<body>
<%= yield %>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment