toPosts :: Route a -> [(Route Pandoc, Pandoc)] -> [Post]
toPosts r docs = [toPost r doc | doc <- docs] where
  toPost :: Route a -> (Route Pandoc, Pandoc) -> Post
  toPost r (r', doc) = RSS.Post postDate postUrl postContent postTitle where
    postDate = date (getMeta doc)
    postUrl = SiteData.domain <> Rib.routeUrl r'
    postContent = pandocToText doc
    postTitle = title (getMeta doc)
  pandocToText :: Pandoc -> T.Text
  pandocToText doc = LT.toStrict $ Lucid.renderText $ Pandoc.render doc
toPosts :: Route a -> [(Route Pandoc, Pandoc)] -> [Post]
toPosts r docs = [toPost r doc | doc <- docs] where
  toPost :: Route a -> (Route Pandoc, Pandoc) -> Post
  toPost r (r', doc) = RSS.Post postDate postUrl postContent postTitle where
    postDate = date (getMeta doc)
    postUrl = SiteData.domain <> Rib.routeUrl r'
    postContent = pandocToText doc
    postTitle = title (getMeta doc)
  pandocToText :: Pandoc -> T.Text
  pandocToText doc = LT.toStrict $ Lucid.renderText $ Pandoc.render doc
toPosts r docs = [toPost r doc | doc <- docs] where
  toPost :: Route a -> (Route Pandoc, Pandoc) -> Post
  toPost r (r', doc) = RSS.Post postDate postUrl postContent postTitle where
    postDate = date (getMeta doc)
    postUrl = SiteData.domain <> Rib.routeUrl r'
    postContent = pandocToText doc
    postTitle = title (getMeta doc)
  pandocToText :: Pandoc -> T.Text
  pandocToText doc = LT.toStrict $ Lucid.renderText $ Pandoc.render doc