mirror of
https://github.com/foo-dogsquared/hugo-theme-more-contentful.git
synced 2025-02-01 04:57:59 +00:00
406 lines
15 KiB
HTML
406 lines
15 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en-us">
|
||
<head><title>RSS, Atom, and JSON Feed Support | More Contentful</title>
|
||
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/css/main.min.26992250e577f5b2601457e6203bdc84fdd734e178010fb044117a89e1a29d1e.css" />
|
||
|
||
<link rel="shortcut icon" href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/favicon.png" /><meta name="generator" content="Hugo 0.96.0" />
|
||
<meta charset="utf-8">
|
||
<meta name="author" content="John Doe" />
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
<meta name="referrer" content="no-referrer" />
|
||
<meta name="description" content="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.
|
||
The Contentful theme doesn’t have a web feed export but we can have it with theme components." /><meta name="twitter:card" content="summary"/>
|
||
<meta name="twitter:title" content="RSS, Atom, and JSON Feed Support"/>
|
||
<meta name="twitter:description" content="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.
|
||
The Contentful theme doesn’t have a web feed export but we can have it with theme components."/>
|
||
<meta property="og:title" content="RSS, Atom, and JSON Feed Support" />
|
||
<meta property="og:description" content="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.
|
||
The Contentful theme doesn’t have a web feed export but we can have it with theme components." />
|
||
<meta property="og:type" content="article" />
|
||
<meta property="og:url" content="https://foo-dogsquared.github.io/hugo-theme-more-contentful/articles/rss-atom-and-json-feed-support/" /><meta property="article:section" content="articles" />
|
||
<meta property="article:published_time" content="2019-09-04T17:22:44+08:00" />
|
||
<meta property="article:modified_time" content="2023-02-24T21:30:33+08:00" />
|
||
|
||
<meta itemprop="name" content="RSS, Atom, and JSON Feed Support">
|
||
<meta itemprop="description" content="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.
|
||
The Contentful theme doesn’t have a web feed export but we can have it with theme components."><meta itemprop="datePublished" content="2019-09-04T17:22:44+08:00" />
|
||
<meta itemprop="dateModified" content="2023-02-24T21:30:33+08:00" />
|
||
<meta itemprop="wordCount" content="274">
|
||
<meta itemprop="keywords" content="this is a test tag,tag2," /><link rel="canonical" type="text/html" href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/articles/rss-atom-and-json-feed-support/" />
|
||
|
||
<script>
|
||
let theme = window.localStorage.getItem('theme');
|
||
if (theme) {
|
||
document.documentElement.dataset.theme = theme;
|
||
}
|
||
</script>
|
||
|
||
</head>
|
||
<body><header aria-label="Site header">
|
||
<nav>
|
||
<a class="site__title" href="https://foo-dogsquared.github.io/hugo-theme-more-contentful">More Contentful</a>
|
||
<div class="list site__links">
|
||
|
||
<a href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/about/">About</a>
|
||
<a href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/categories/">Categories</a>
|
||
<a href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/recipes/">Recipes</a>
|
||
<a href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/tags/">Tags</a>
|
||
|
||
|
||
</div>
|
||
</nav>
|
||
<div class="site__theme-btn" aria-label="Theme toggle" aria-hidden="true">
|
||
|
||
<svg class="icon">
|
||
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/generic/swatch.svg#swatch"></use>
|
||
</svg>
|
||
|
||
<div class="site__theme-dropdown">
|
||
<div class="site__theme-dropdown-list">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="site__theme-item"
|
||
data-theme="Default Dark"
|
||
data-theme-dark
|
||
|
||
>Dark</div>
|
||
|
||
|
||
|
||
|
||
|
||
<div class="site__theme-item"
|
||
data-theme="Default Light"
|
||
|
||
data-theme-light
|
||
>Light</div>
|
||
|
||
|
||
|
||
<div class="site__theme-item"
|
||
data-theme="Dracula"
|
||
|
||
|
||
>Dracula</div>
|
||
|
||
|
||
<div class="site__theme-item"
|
||
data-theme="Gruvbox dark, hard"
|
||
|
||
|
||
>Gruvbox dark, hard</div>
|
||
|
||
|
||
<div class="site__theme-item"
|
||
data-theme="Gruvbox light, hard"
|
||
|
||
|
||
>Gruvbox light, hard</div>
|
||
|
||
|
||
<div class="site__theme-item"
|
||
data-theme="Nord"
|
||
|
||
|
||
>Nord</div>
|
||
|
||
|
||
<div class="site__theme-item"
|
||
data-theme="Solarized Dark"
|
||
|
||
|
||
>Solarized Dark</div>
|
||
|
||
|
||
<div class="site__theme-item"
|
||
data-theme="Solarized Light"
|
||
|
||
|
||
>Solarized Light</div>
|
||
|
||
<div class="site__theme-item" data-theme-system>
|
||
OS default
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<script>
|
||
function styleTheme() {
|
||
const selectedTheme = window.localStorage.getItem("theme");
|
||
for (const el of document.querySelectorAll(".site__theme-item")) {
|
||
if (el.dataset.theme == selectedTheme) {
|
||
el.classList.add("site__theme-item--selected");
|
||
} else {
|
||
el.classList.remove("site__theme-item--selected");
|
||
}
|
||
}
|
||
}
|
||
|
||
const themeDropdown = document.querySelector('.site__theme-btn');
|
||
themeDropdown.addEventListener('click', (event) => {
|
||
const { target } = event;
|
||
if (target.classList.contains("site__theme-item")) {
|
||
if (target.dataset.theme) {
|
||
theme = target.dataset.theme;
|
||
window.localStorage.setItem("theme", theme);
|
||
document.documentElement.dataset.theme = theme;
|
||
} else {
|
||
window.localStorage.removeItem("theme");
|
||
delete document.documentElement.dataset.theme;
|
||
}
|
||
}
|
||
|
||
styleTheme();
|
||
});
|
||
|
||
styleTheme();
|
||
</script>
|
||
|
||
</header>
|
||
<hr aria-hidden="true"/>
|
||
|
||
<div class="post--single">
|
||
<main>
|
||
<article>
|
||
<header>
|
||
<h1>RSS, Atom, and JSON Feed Support</h1>
|
||
|
||
<div class="list post__meta" aria-hidden="true"><span>
|
||
|
||
<svg class="icon">
|
||
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/generic/calendar.svg#calendar"></use>
|
||
</svg>
|
||
|
||
<time datetime="2019-09-04T17:22:44+08:00" title="Created" style="margin-left: 0.5em;">
|
||
2019-09-04
|
||
</time>
|
||
</span>
|
||
<span>
|
||
|
||
<svg class="icon">
|
||
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/generic/arrow-path.svg#arrow-path"></use>
|
||
</svg>
|
||
|
||
<time datetime="2023-02-24T21:30:33+08:00" title="Updated" style="margin-left: 0.5em;">
|
||
2023-02-24
|
||
</time>
|
||
</span>
|
||
<span data-authors="["John Doe","Jane Doe"]" title="Authors">
|
||
|
||
<svg class="icon">
|
||
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/generic/pencil.svg#pencil"></use>
|
||
</svg>
|
||
|
||
<span style="margin-left: 0.5em;">
|
||
John Doe, et al.
|
||
</span>
|
||
</span>
|
||
|
||
</div>
|
||
|
||
</header>
|
||
|
||
|
||
|
||
|
||
<div class="paragraph">
|
||
<p>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 <a href="https://www.rssboard.org/rss-2-0-1">RSS</a> and <a href="https://www.jsonfeed.org/">JSON</a> feeds where they are just plain text files describing the content.</p>
|
||
</div>
|
||
<div class="paragraph">
|
||
<p>The Contentful theme doesn’t have a web feed export but we can have it with <a href="https://gohugo.io/hugo-modules/theme-components/">theme components</a>.
|
||
For this demo, we’ll use the <a href="https://github.com/foo-dogsquared/hugo-web-feeds">web feed component</a> created by <a href="https://foo-dogsquared.github.io/">foo-dogsquared</a>.</p>
|
||
</div>
|
||
<div class="paragraph">
|
||
<p>If 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.</p>
|
||
</div>
|
||
<div class="listingblock">
|
||
<div class="content">
|
||
<pre class="highlight"><code class="language-toml" data-lang="toml">[[module.imports]]
|
||
path = "github.com/foo-dogsquared/hugo-web-feeds"
|
||
|
||
# Visit the following for more information:
|
||
# https://gohugo.io/templates/output-formats
|
||
|
||
# Defining the media type of the output formats
|
||
# For JSON format, it doesn't need to be since it's already built-in into Hugo
|
||
[mediaTypes]
|
||
[mediaTypes."application/atom+xml"]
|
||
suffixes = ["atom", "atom.xml"] # You can remove the "atom.xml" if you want
|
||
|
||
# Redefining RSS media type for the additional suffix
|
||
[mediaTypes."application/rss+xml"]
|
||
suffixes = ["rss", "rss.xml"] # You can remove the "rss.xml" if you want
|
||
|
||
[mediaTypes."application/feed+json"]
|
||
suffixes = ["json"] # You can remove the "rss.xml" if you want
|
||
|
||
|
||
# Including all of the feed output formats in the build
|
||
[outputFormats]
|
||
[outputFormats.Rss]
|
||
mediaType = "application/rss+xml"
|
||
baseName = "feed"
|
||
|
||
[outputFormats.Atom]
|
||
mediaType = "application/atom+xml"
|
||
baseName = "feed"
|
||
|
||
[outputFormats.Json]
|
||
mediaType = "application/feed+json"
|
||
baseName = "feed"
|
||
|
||
|
||
# Indicating what output formats shall be included
|
||
# for the following kinds
|
||
[outputs]
|
||
# .Site.BaseURL/index.* is available
|
||
home = ["HTML", "JSON", "RSS", "ATOM"]
|
||
|
||
# .Site.BaseURL/$section/index.* is available
|
||
section = ["HTML", "JSON", "RSS", "ATOM"]</code></pre>
|
||
</div>
|
||
</div>
|
||
|
||
</article>
|
||
</main>
|
||
|
||
<hr aria-hidden="true"/>
|
||
<div class="post__meta--single" aria-hidden="true">
|
||
|
||
<p data-content-author="["John Doe","Jane Doe"]">Authors: John Doe and Jane Doe</p>
|
||
|
||
|
||
<p data-content-publication-date="2019-09-04T17:22:44+08:00">Created: <time datetime="2019-09-04T17:22:44+08:00">2019-09-04</time></p>
|
||
|
||
|
||
<p data-content-modification-date="2023-02-24T21:30:33+08:00">Updated: <time datetime="2023-02-24T21:30:33+08:00">2023-02-24</time></p>
|
||
|
||
|
||
|
||
|
||
<p data-content-translations="["Tagalog"]">Translations: <a href=https://foo-dogsquared.github.io/hugo-theme-more-contentful/tl/articles/rss-atom-and-json-feed-support/>Tagalog</a></p>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<hr aria-hidden="true"/><footer aria-label="Site footer">
|
||
|
||
<a href="#top">Back to top</a>
|
||
|
||
|
||
|
||
<p>Available in other languages:
|
||
<span class="list site__languages">
|
||
|
||
<a href="/hugo-theme-more-contentful/en" hreflang="en">English</a>
|
||
|
||
<a href="/hugo-theme-more-contentful/tl" hreflang="tl">Tagalog</a>
|
||
|
||
</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
<ul class="list site__socials">
|
||
|
||
|
||
|
||
<li>
|
||
<a class="site__social-icon" rel="me" href="https://example.org/gmail" aria-label="E-mail">
|
||
<svg class="icon">
|
||
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/brand/gmail.svg#gmail"></use>
|
||
</svg>
|
||
</a>
|
||
</li><li>
|
||
<a class="site__social-icon" rel="me" href="https://example.org/keybase" aria-label="Keybase">
|
||
<svg class="icon">
|
||
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/brand/keybase.svg#keybase"></use>
|
||
</svg>
|
||
</a>
|
||
</li><li>
|
||
<a class="site__social-icon" rel="me" href="https://example.org/devdotto" aria-label="Dev.to">
|
||
<svg class="icon">
|
||
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/brand/devdotto.svg#devdotto"></use>
|
||
</svg>
|
||
</a>
|
||
</li><li>
|
||
<a class="site__social-icon" rel="me" href="https://example.org/github/" aria-label="GitHub">
|
||
<svg class="icon">
|
||
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/brand/github.svg#github"></use>
|
||
</svg>
|
||
</a>
|
||
</li><li>
|
||
<a class="site__social-icon" rel="me" href="https://example.org/gitlab" aria-label="GitLab">
|
||
<svg class="icon">
|
||
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/brand/gitlab.svg#gitlab"></use>
|
||
</svg>
|
||
</a>
|
||
</li><li>
|
||
<a class="site__social-icon" rel="me" href="https://example.org/lichess" aria-label="Lichess">
|
||
<svg class="icon">
|
||
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/brand/lichess.svg#lichess"></use>
|
||
</svg>
|
||
</a>
|
||
</li><li>
|
||
<a class="site__social-icon" rel="me" href="https://example.org/picartodottv" aria-label="Picarto.tv">
|
||
<svg class="icon">
|
||
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/brand/picartodottv.svg#picartodottv"></use>
|
||
</svg>
|
||
</a>
|
||
</li><li>
|
||
<a class="site__social-icon" rel="me" href="https://example.org/pixiv" aria-label="Pixiv">
|
||
<svg class="icon">
|
||
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/brand/pixiv.svg#pixiv"></use>
|
||
</svg>
|
||
</a>
|
||
</li><li>
|
||
<a class="site__social-icon" rel="me" href="https://example.org/twitch" aria-label="Twitch">
|
||
<svg class="icon">
|
||
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/brand/twitch.svg#twitch"></use>
|
||
</svg>
|
||
</a>
|
||
</li><li>
|
||
<a class="site__social-icon" rel="me" href="https://example.org/twitter" aria-label="Twitter">
|
||
<svg class="icon">
|
||
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/brand/twitter.svg#twitter"></use>
|
||
</svg>
|
||
</a>
|
||
</li><li>
|
||
<a class="site__social-icon" rel="me" href="https://example.org/youtube" aria-label="YouTube">
|
||
<svg class="icon">
|
||
<use href="https://foo-dogsquared.github.io/hugo-theme-more-contentful/icons/brand/youtube.svg#youtube"></use>
|
||
</svg>
|
||
</a>
|
||
</li></ul>
|
||
|
||
|
||
|
||
|
||
|
||
<p>© 2023 More Contentful</p>
|
||
</footer>
|
||
|
||
</body>
|
||
</html>
|