src: format site.hs
All checks were successful
ci/woodpecker/push/ci Pipeline was successful

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2022-10-25 06:59:26 +05:30
parent 67b1f27fcd
commit 84764567af

View File

@@ -13,8 +13,7 @@ import Text.Pandoc.Templates (Template, compileTemplate)
main :: IO ()
main = hakyllWith config $ do
let
individualPatterns = fromList ["about.org", "contact.org", "links.org"]
let individualPatterns = fromList ["about.org", "contact.org", "links.org"]
match "images/**" $ do
route idRoute
@@ -62,7 +61,7 @@ main = hakyllWith config $ do
let writerOptions' = maybe defaultHakyllWriterOptions (const $ writerOptions $ isJust numbering) toc
pandocCompilerWith defaultHakyllReaderOptions writerOptions'
>>= saveSnapshot "content"
>>= loadAndApplyTemplate "templates/post.html" (postCtx tags <> teaserField "teaser" "content")
>>= loadAndApplyTemplate "templates/post.html" (postCtx tags)
>>= loadAndApplyTemplate "templates/default.html" (postCtx tags)
>>= relativizeUrls
@@ -117,12 +116,13 @@ main = hakyllWith config $ do
match "templates/*" $ compile templateBodyCompiler
rssFeedConfiguration :: FeedConfiguration
rssFeedConfiguration = FeedConfiguration
{ feedTitle = "nattopages"
, feedDescription = "Pages by natto"
, feedAuthorName = "Amneesh Singh"
, feedAuthorEmail = "natto@weirdnatto.in"
, feedRoot = "https://weirdnatto.in"
rssFeedConfiguration =
FeedConfiguration
{ feedTitle = "nattopages",
feedDescription = "Pages by natto",
feedAuthorName = "Amneesh Singh",
feedAuthorEmail = "natto@weirdnatto.in",
feedRoot = "https://weirdnatto.in"
}
config :: Configuration
@@ -141,7 +141,6 @@ postCtx tags =
-- <> teaserFieldWithSeparator "((.tease.))" "teaser" "content"
<> dateField "date" "%B %e, %Y"
<> dateField "altdate" "%Y-%m-%d"
-- <> modificationTimeFieldWith TimeLocale.knownTimeZones. "modified" "%B %e, %Y"
<> teaserField "teaser" "content"
<> defaultCtx