Have the keybase proof
This commit is contained in:
43
site.hs
43
site.hs
@@ -8,7 +8,11 @@ import Data.Time (formatTime, defaultTimeLocale)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
main :: IO ()
|
||||
main = hakyllWith defaultConfiguration{ deployCommand = "ipfs add -Q -r _site" } $do
|
||||
main = hakyllWith defaultConfiguration $ do
|
||||
match "well-known/*" $ do
|
||||
route (customRoute (prepend '.'. toFilePath))
|
||||
compile copyFileCompiler
|
||||
|
||||
match "images/*" $ do
|
||||
route idRoute
|
||||
compile copyFileCompiler
|
||||
@@ -31,40 +35,6 @@ main = hakyllWith defaultConfiguration{ deployCommand = "ipfs add -Q -r _site" }
|
||||
>>= loadAndApplyTemplate "templates/default.html" defaultContext
|
||||
>>= relativizeUrls
|
||||
|
||||
match "posts/incomplete/*" $ do
|
||||
route $ setExtension "html"
|
||||
compile $ pandocCompiler
|
||||
>>= loadAndApplyTemplate "templates/post.html" postCtx
|
||||
>>= loadAndApplyTemplate "templates/default.html" postCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
match "posts/guides/*" $ do
|
||||
route $ setExtension "html"
|
||||
compile $ pandocCompiler
|
||||
>>= loadAndApplyTemplate "templates/post.html" postCtx
|
||||
>>= loadAndApplyTemplate "templates/default.html" postCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
match "posts/brainstorming/*" $ do
|
||||
route $ setExtension "html"
|
||||
compile $ pandocCompiler
|
||||
>>= loadAndApplyTemplate "templates/post.html" postCtx
|
||||
>>= loadAndApplyTemplate "templates/default.html" postCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
create ["guides.html"] $ do
|
||||
route idRoute
|
||||
compile $ do
|
||||
posts <- modFirst =<< loadAll "posts/guides/*"
|
||||
let archiveCtx =
|
||||
listField "posts" postCtx (return posts) `mappend`
|
||||
constField "title" "Guides" `mappend`
|
||||
defaultContext
|
||||
|
||||
makeItem ""
|
||||
>>= loadAndApplyTemplate "templates/guides.html" archiveCtx
|
||||
>>= loadAndApplyTemplate "templates/default.html" archiveCtx
|
||||
>>= relativizeUrls
|
||||
|
||||
|
||||
match "templates/*" $ compile templateBodyCompiler
|
||||
@@ -85,3 +55,6 @@ postCtx =
|
||||
modifiedField key format = field key $ \i -> do
|
||||
time <- getItemModificationTime $ itemIdentifier i
|
||||
return $ formatTime defaultTimeLocale format time
|
||||
|
||||
prepend :: a -> [a] -> [a]
|
||||
prepend = (:)
|
||||
|
||||
Reference in New Issue
Block a user