hugo-theme-contentful/articles/feed.json

10 lines
17 KiB
JSON
Raw Normal View History

{
"version": "https://jsonfeed.org/version/1.1",
"title": "Articles on Contentful",
"home_page_url": "https://foo-dogsquared.github.io/hugo-theme-contentful/",
"feed_url": "https://foo-dogsquared.github.io/hugo-theme-contentful/articles/feed.json",
"description": "Recent content in Articles on Contentful",
"authors":[{"name":"John Doe"}],
"items":
[{"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 doesnt 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, well 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 youre settling with this option, heres 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":"2020-10-24T16:00:52+08:00","date_published":"2019-09-04T17:22:44+08:00","id":"https://foo-dogsquared.github.io/hugo-theme-contentful/articles/rss-atom-and-json-feed-support/","summary":"Web feeds are one of the most common ways for a visitor to keep up with someone who creates content. Nowadays, most social media has that feature such as the subscribing YouTube channels, following Twitter accounts, and watching Deviantart artists. Outside of those, we have simpler things like RSS and JSON feeds where they are just plain text files describing the content.\n The Contentful theme doesnt have