How do I avoid a dependency cycle when generating a list of recent posts on posts?
问题 So this works: create ["archive.html"] $ do route idRoute compile $ do posts <- (myRecentFirst gitTimes) =<< loadAll "posts/**" let archiveCtx = listField "posts" (postCtx allTags allCategories gitTimes) (return posts) `mappend` constField "title" "Archives" `mappend` (postCtx allTags allCategories gitTimes) makeItem "" >>= loadAndApplyTemplate "templates/archive.html" archiveCtx >>= loadAndApplyTemplate "templates/default.html" archiveCtx >>= relativizeUrls to create a list of recent posts