[{"content_html":"\u003cdiv class=\"paragraph\"\u003e\n\u003cp\u003eWeb feeds are one of the most common ways for a visitor to keep up with someone who creates content.\nNowadays, most social media has that feature such as the subscribing YouTube channels, following Twitter accounts, and watching Deviantart artists.\nOutside of those, we have simpler things like \u003ca href=\"https://www.rssboard.org/rss-2-0-1\"\u003eRSS\u003c/a\u003e and \u003ca href=\"https://www.jsonfeed.org/\"\u003eJSON\u003c/a\u003e feeds where they are just plain text files describing the content.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"paragraph\"\u003e\n\u003cp\u003eThe Contentful theme doesn’t have a web feed export but we can have it with \u003ca href=\"https://gohugo.io/hugo-modules/theme-components/\"\u003etheme components\u003c/a\u003e.\nFor this demo, we’ll use the \u003ca href=\"https://github.com/foo-dogsquared/hugo-web-feeds\"\u003eweb feed component\u003c/a\u003e created by \u003ca href=\"https://foo-dogsquared.github.io/\"\u003efoo-dogsquared\u003c/a\u003e.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"paragraph\"\u003e\n\u003cp\u003eIf you’re settling with this option, here’s an example template for installing the web feed module and exporting all of the feed formats all in one fell swoop.\u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv class=\"listingblock\"\u003e\n\u003cdiv class=\"content\"\u003e\n\u003cpre class=\"highlight\"\u003e\u003ccode class=\"language-toml\" data-lang=\"toml\"\u003e[[module.imports]]\n path = \u0026#34;github.com/foo-dogsquared/hugo-web-feeds\u0026#34;\n\n# Visit the following for more information:\n# https://gohugo.io/templates/output-formats\n\n# Defining the media type of the output formats\n# For JSON format, it doesn\u0026#39;t need to be since it\u0026#39;s already built-in into Hugo\n[mediaTypes]\n [mediaTypes.\u0026#34;application/atom+xml\u0026#34;]\n suffixes = [\u0026#34;atom\u0026#34;, \u0026#34;atom.xml\u0026#34;] # You can remove the \u0026#34;atom.xml\u0026#34; if you want\n\n # Redefining RSS media type for the additional suffix\n [mediaTypes.\u0026#34;application/rss+xml\u0026#34;]\n suffixes = [\u0026#34;rss\u0026#34;, \u0026#34;rss.xml\u0026#34;] # You can remove the \u0026#34;rss.xml\u0026#34; if you want\n\n [mediaTypes.\u0026#34;application/feed+json\u0026#34;]\n suffixes = [\u0026#34;json\u0026#34;] # You can remove the \u0026#34;rss.xml\u0026#34; if you want\n\n\n# Including all of the feed output formats in the build\n[outputFormats]\n [outputFormats.Rss]\n mediaType = \u0026#34;application/rss+xml\u0026#34;\n baseName = \u0026#34;feed\u0026#34;\n\n [outputFormats.Atom]\n mediaType = \u0026#34;application/atom+xml\u0026#34;\n baseName = \u0026#34;feed\u0026#34;\n\n [outputFormats.Json]\n mediaType = \u0026#34;application/feed+json\u0026#34;\n baseName = \u0026#34;feed\u0026#34;\n\n\n# Indicating what output formats shall be included\n# for the following kinds\n[outputs]\n # .Site.BaseURL/index.* is available\n home = [\u0026#34;HTML\u0026#34;, \u0026#34;JSON\u0026#34;, \u0026#34;RSS\u0026#34;, \u0026#34;ATOM\u0026#34;]\n\n # .Site.BaseURL/$section/index.* is available\n section = [\u0026#34;HTML\u0026#34;, \u0026#34;JSON\u0026#34;, \u0026#34;RSS\u0026#34;, \u0026#34;ATOM\u0026#34;]\u003c/code\u003e\u003c/pre\u003e\n\u003c/div\u003e\n\u003c/div\u003e\n","date_modified":"2023-02-24T20:23:27+08:00","date_published":"2019-09-04T17:22:44+08:00","id":"https://foo-dogsquared.github.io/hugo-theme-more-contentful/articles/rss-atom-and-json-feed-support/","summary":"Webfeedsareoneofthemostcommonwaysforavisitortokeepupwithsomeonewhocreatescontent.Nowadays,mostsocialmediahasthatfeaturesuchasthesubscribingYouTubechannels,followingTwitteraccounts,andwatchingDeviantartartists.Outsideofthose,wehavesimplerthingslikeRSSandJSONfeedswheretheyarejustplaintextfilesdescribingthecontent.\nTheContentfulthemedoesn’t