Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
19
src/site.hs
19
src/site.hs
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user