Created
April 8, 2014 18:52
Revisions
-
gerwitz created this gist
Apr 8, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ # as if we could do this: # page "/tree", layout: "root" # page "/tree/*", layout: "trunk" # page "/tree/*/*", layout: "limb" page "/tree/*", layout: "limb" trunks = Dir.glob("./source/tree/*/index.md") trunks.each do |trunk_path| trunk = trunk_path.match(/.\/source\/tree\/([^\/]*)\/index\.md/).captures[0] page "/tree/#{top}/index.html", layout: "trunk" end page "/tree/index.html", layout: "root"