Skip to content

Instantly share code, notes, and snippets.

@derekconjar
Created May 3, 2014 16:25
Show Gist options
  • Save derekconjar/e4c0012e17f570ebe923 to your computer and use it in GitHub Desktop.
Save derekconjar/e4c0012e17f570ebe923 to your computer and use it in GitHub Desktop.

Revisions

  1. derekconjar created this gist May 3, 2014.
    14 changes: 14 additions & 0 deletions config.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    page_dirs = ["pages", "landing", "reports"]

    page_dirs.each do |page_dir|
    pages = Dir.glob("./source/#{page_dir}/*.html*")

    pages.each do |page_path|
    pattern = /.\/source\/#{page_dir}\/([^\.]*)\..*/

    page = page_path.match(pattern).captures[0]

    page "/#{page}/*", :layout => :layout
    proxy "/#{page}/index.html", "/#{page_dir}/#{page}.html", :ignore => true
    end
    end