diff --git a/index.html b/index.html deleted file mode 100644 index 64d56f6..0000000 --- a/index.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Home ---- - -

Welcome

- - - - -

Welcome to my blog!

- -

This blog is about everything and anything I want to share with the world. -
-It is mostly technical stuff about coding and software configuration, but also about photography, music, tea and everything else I find noteworthy or important enough to tell.
-Here are my latest Posts: -

- - -$partial("templates/post-list.html")$ - -

...and there are even more in the archive.

- - diff --git a/index.md b/index.md new file mode 100644 index 0000000..0734f32 --- /dev/null +++ b/index.md @@ -0,0 +1,20 @@ +--- +title: Home +--- + +## Welcome + + + + +Welcome to my blog! + +This blog is about everything and anything I want to share with the world. +It is mostly technical stuff about coding and software configuration, but also about photography, music, tea and everything else I find noteworthy or important enough to tell. +Here are my latest Posts: + +$partial("templates/post-list.html")$ + +...and there are even more in the [archive][archive]. + +[archive]: /archive.html diff --git a/src/Main.hs b/src/Main.hs index 8ce12eb..1e9e0b0 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -33,6 +33,19 @@ main = do let baseCtx = tagCloudField "tagcloud" 80.0 200.0 tags <> defaultContext + match "index.md" $ do + route idRoute + compile $ do + posts <- fmap (take 5) . recentFirst =<< loadAll "posts/*" + let indexCtx = listField "posts" (postCtx tags) (return posts) <> + constField "title" "Home" <> + field "tags" (\_ -> renderTagCloud 85.0 300.0 tags) <> + defaultContext + getResourceBody >>= myPandoc + >>= applyAsTemplate indexCtx + >>= loadAndApplyTemplate "templates/default.html" baseCtx + >>= relativizeUrls + match "about.md" $ do route $ setExtension "html" compile $ pandocCompiler @@ -99,19 +112,6 @@ main = do >>= loadAndApplyTemplate "templates/default.html" archiveCtx >>= relativizeUrls - match "index.html" $ do - route idRoute - compile $ do - posts <- fmap (take 5) . recentFirst =<< loadAll "posts/*" - let indexCtx = listField "posts" (postCtx tags) (return posts) <> - constField "title" "Home" <> - field "tags" (\_ -> renderTagCloud 85.0 300.0 tags) <> - defaultContext - getResourceBody - >>= applyAsTemplate indexCtx - >>= loadAndApplyTemplate "templates/default.html" baseCtx - >>= relativizeUrls - match "templates/*" $ compile templateCompiler -- feeds