add about page
authorLucian Mogosanu <lucian.mogosanu@gmail.com>
Sat, 20 Jul 2013 08:36:49 +0000 (11:36 +0300)
committerLucian Mogosanu <lucian.mogosanu@gmail.com>
Sat, 20 Jul 2013 08:36:49 +0000 (11:36 +0300)
about.markdown [new file with mode: 0644]
site.hs
templates/default.html

diff --git a/about.markdown b/about.markdown
new file mode 100644 (file)
index 0000000..73c793a
--- /dev/null
@@ -0,0 +1,7 @@
+---
+title: About
+author: Lucian MogoČ™anu
+date: July 20, 2013
+---
+
+**TODO**
diff --git a/site.hs b/site.hs
index 53d8bff..85dd540 100644 (file)
--- a/site.hs
+++ b/site.hs
@@ -7,6 +7,7 @@ main = hakyll $ do
   match "index.html" compileIndex
   match "css/*" compileCss
   match "posts/*" compilePosts
+  match (fromList ["about.markdown"]) compilePages
   match "templates/*" $ compile templateCompiler
 
 compileIndex :: Rules ()
@@ -35,5 +36,12 @@ compilePosts = do
     >>= loadAndApplyTemplate "templates/default.html" postCtx
     >>= relativizeUrls
 
+compilePages :: Rules ()
+compilePages = do
+  route $ setExtension "html"
+  compile $ pandocCompiler
+    >>= loadAndApplyTemplate "templates/default.html" defaultContext
+    >>= relativizeUrls
+
 postCtx :: Context String
 postCtx = dateField "date" "%B %e, %Y" `mappend` defaultContext
index 20c719c..4f248a0 100644 (file)
@@ -15,7 +15,7 @@
                        <a href="/">The Tar Pit</a>
                </div>
                <div id="navigation">
-                       <a href="">About</a>
+                       <a href="/about.html">About</a>
                        <a href="">Archive</a>
                        <a href="">RSS</a>
                </div>