moved index to markdown
This commit is contained in:
parent
04ca1eded1
commit
089cce4f27
3 changed files with 33 additions and 36 deletions
23
index.html
23
index.html
|
@ -1,23 +0,0 @@
|
||||||
---
|
|
||||||
title: Home
|
|
||||||
---
|
|
||||||
|
|
||||||
<h2>Welcome</h2>
|
|
||||||
|
|
||||||
|
|
||||||
<img src="/images/nekonet.svg" style="height: 250px; width: auto;" />
|
|
||||||
|
|
||||||
<p>Welcome to my blog!</p>
|
|
||||||
|
|
||||||
<p>This blog is about everything and anything I want to share with the world.
|
|
||||||
<br>
|
|
||||||
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. <br>
|
|
||||||
Here are my latest Posts:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!--<h2>Posts</h2>-->
|
|
||||||
$partial("templates/post-list.html")$
|
|
||||||
|
|
||||||
<p>...and there are even more in the <a href="/archive.html">archive</a>.</p>
|
|
||||||
|
|
||||||
<!--<p>Tagcloud: $tags$</p>-->
|
|
20
index.md
Normal file
20
index.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
title: Home
|
||||||
|
---
|
||||||
|
|
||||||
|
## Welcome
|
||||||
|
|
||||||
|
|
||||||
|
<img src="/images/nekonet.svg" style="height: 250px; width: auto;"/>
|
||||||
|
|
||||||
|
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
|
26
src/Main.hs
26
src/Main.hs
|
@ -33,6 +33,19 @@ main = do
|
||||||
let baseCtx = tagCloudField "tagcloud" 80.0 200.0 tags <>
|
let baseCtx = tagCloudField "tagcloud" 80.0 200.0 tags <>
|
||||||
defaultContext
|
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
|
match "about.md" $ do
|
||||||
route $ setExtension "html"
|
route $ setExtension "html"
|
||||||
compile $ pandocCompiler
|
compile $ pandocCompiler
|
||||||
|
@ -99,19 +112,6 @@ main = do
|
||||||
>>= loadAndApplyTemplate "templates/default.html" archiveCtx
|
>>= loadAndApplyTemplate "templates/default.html" archiveCtx
|
||||||
>>= relativizeUrls
|
>>= 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
|
match "templates/*" $ compile templateCompiler
|
||||||
|
|
||||||
-- feeds
|
-- feeds
|
||||||
|
|
Loading…
Reference in a new issue