atomFeed :: Config -> [Post] -> Atom.Feed
atomFeed cfg posts =
  let
    domain = blogDomain cfg
    initFeed =
      Atom.nullFeed
        (TL.toStrict $ domain <> "/blog/atom.xml")
        (Atom.TextString . TL.toStrict . blogTitle $ cfg)
        (lastUpdated posts)
  in
    initFeed
      { Atom.feedEntries =
        map (toAtomEntry domain) posts
      , Atom.feedAuthors =
        uniques (toPerson domain) postAuthors posts
      , Atom.feedCategories =
        uniques (tagToCat domain) postTags posts
      , Atom.feedIcon =
        Just . TL.toStrict $ domain <> "/favicon.ico"
      , Atom.feedLogo =
        Just . TL.toStrict $ domain <> "/favicon.ico"
      }
atomFeed :: Config -> [Post] -> Atom.Feed
atomFeed cfg posts =
  let
    domain = blogDomain cfg
    initFeed =
      Atom.nullFeed
        (TL.toStrict $ domain <> "/blog/atom.xml")
        (Atom.TextString . TL.toStrict . blogTitle $ cfg)
        (lastUpdated posts)
  in
    initFeed
      { Atom.feedEntries =
        map (toAtomEntry domain) posts
      , Atom.feedAuthors =
        uniques (toPerson domain) postAuthors posts
      , Atom.feedCategories =
        uniques (tagToCat domain) postTags posts
      , Atom.feedIcon =
        Just . TL.toStrict $ domain <> "/favicon.ico"
      , Atom.feedLogo =
        Just . TL.toStrict $ domain <> "/favicon.ico"
      }
atomFeed cfg posts =
  let
    domain = blogDomain cfg
    initFeed =
      Atom.nullFeed
        (TL.toStrict $ domain <> "/blog/atom.xml")
        (Atom.TextString . TL.toStrict . blogTitle $ cfg)
        (lastUpdated posts)
  in
    initFeed
      { Atom.feedEntries =
        map (toAtomEntry domain) posts
      , Atom.feedAuthors =
        uniques (toPerson domain) postAuthors posts
      , Atom.feedCategories =
        uniques (tagToCat domain) postTags posts
      , Atom.feedIcon =
        Just . TL.toStrict $ domain <> "/favicon.ico"
      , Atom.feedLogo =
        Just . TL.toStrict $ domain <> "/favicon.ico"
      }