Add a new projects page
This commit is contained in:
parent
cd8fff45ff
commit
af5d04e54f
15 changed files with 92 additions and 113 deletions
21
site.hs
21
site.hs
|
@ -54,17 +54,11 @@ main = hakyll $ do
|
|||
>>= loadAndApplyTemplate "templates/default.html" postCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
match "projects/*" $ do
|
||||
route $ setExtension "html"
|
||||
compile $ customPandocCompiler False
|
||||
>>= loadAndApplyTemplate "templates/project.html" postCtx
|
||||
>>= loadAndApplyTemplate "templates/default.html" postCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
match (fromList ["contact.org", "cv.org", "skills.org", "projects.org"]) $ do
|
||||
route $ setExtension "html"
|
||||
compile $ customPandocCompiler False
|
||||
>>= return . fmap demoteHeaders
|
||||
>>= loadAndApplyTemplate "templates/post.html" postCtx
|
||||
>>= loadAndApplyTemplate "templates/default.html" defaultContext
|
||||
>>= relativizeUrls
|
||||
|
||||
|
@ -81,19 +75,6 @@ main = hakyll $ do
|
|||
>>= loadAndApplyTemplate "templates/default.html" archiveCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
create ["projects.html"] $ do
|
||||
route idRoute
|
||||
compile $ do
|
||||
posts <- recentFirst =<< loadAll "projects/*"
|
||||
let archiveCtx =
|
||||
listField "projects" postCtx (return posts) `mappend`
|
||||
constField "title" "Projects" `mappend`
|
||||
defaultContext
|
||||
makeItem ""
|
||||
>>= loadAndApplyTemplate "templates/projects.html" archiveCtx
|
||||
>>= loadAndApplyTemplate "templates/default.html" archiveCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
create ["atom.xml"] $ do
|
||||
route idRoute
|
||||
compile (feedCompiler renderAtom)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue