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