From: Lucian Mogosanu Date: Wed, 17 Jul 2013 06:27:20 +0000 (+0300) Subject: add a bare site X-Git-Tag: v0.1~49 X-Git-Url: https://git.mogosanu.ro/?a=commitdiff_plain;h=363a5891d7071c1288a288d4671ddc699ed6b3ca;p=thetarpit.git add a bare site --- diff --git a/index.html b/index.html new file mode 100644 index 0000000..a806adf --- /dev/null +++ b/index.html @@ -0,0 +1,5 @@ +--- +title: Home +--- + +The Tar Pit is cooking, please come back later. diff --git a/site.hs b/site.hs index 3549681..04c614f 100644 --- a/site.hs +++ b/site.hs @@ -2,4 +2,16 @@ import Data.Monoid (mappend) import Hakyll --- TODO: add site manually +main :: IO () +main = hakyll $ do + match "index.html" $ do + route idRoute -- TODO: make a "copy to root" route? + compile $ do + let indexCtx = defaultContext + + getResourceBody + >>= applyAsTemplate indexCtx + >>= loadAndApplyTemplate "templates/default.html" indexCtx + >>= relativizeUrls + + match "templates/*" $ compile templateCompiler diff --git a/templates/default.html b/templates/default.html new file mode 100644 index 0000000..36d66c2 --- /dev/null +++ b/templates/default.html @@ -0,0 +1 @@ +$body$