Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JSON Feed support #975

Merged
merged 15 commits into from
Aug 6, 2023
Prev Previous commit
Next Next commit
Make naming more consistent
  • Loading branch information
ozkutuk authored and Minoru committed Aug 6, 2023
commit 9c9550ab15bcf6a9943ba7c4592434d37ca69303
10 changes: 5 additions & 5 deletions lib/Hakyll/Web/Feed.hs
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ atomItemTemplate =
$(makeRelativeToProject ("data" </> "templates" </> "atom-item.xml")
>>= embedTemplate)

jsonFeedTemplate :: Template
jsonFeedTemplate =
jsonTemplate :: Template
jsonTemplate =
$(makeRelativeToProject ("data" </> "templates" </> "feed.json")
>>= embedTemplate)

jsonFeedItemTemplate :: Template
jsonFeedItemTemplate =
jsonItemTemplate :: Template
jsonItemTemplate =
$(makeRelativeToProject ("data" </> "templates" </> "feed-item.json")
>>= embedTemplate)

Expand Down Expand Up @@ -228,7 +228,7 @@ renderJson :: FeedConfiguration -- ^ Feed configuration
-> Context String -- ^ Item context
-> [Item String] -- ^ Feed items
-> Compiler (Item String) -- ^ Resulting feed
renderJson = renderJsonWithTemplates jsonFeedTemplate jsonFeedItemTemplate
renderJson = renderJsonWithTemplates jsonTemplate jsonItemTemplate


--------------------------------------------------------------------------------
Expand Down