Created
January 18, 2024 16:34
-
-
Save danott/f5fc2928e13136a24a7680b8c85d726d to your computer and use it in GitHub Desktop.
Hypothetical markup for HTML based feeds. Riffing on the ideas shared at https://blog.jim-nielsen.com/2024/rss-in-html/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- | |
This is hypothetical markup for HTML based feeds. | |
Riffing on the ideas shared at https://blog.jim-nielsen.com/2024/rss-in-html/ | |
--> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Dan Ott's HTML Feed</title> | |
<!-- Tell the machines that there's an HTML feed available at /feed.html --> | |
<link | |
rel="alternate" | |
type="application/rss+html" | |
title="Dan Ott's HTML Feed" | |
href="/feed.html" | |
/> | |
<meta name="author" value="Dan Ott" /> | |
<meta | |
name="description" | |
value="A slightly longer description about Dan Ott's HTML Feed" | |
/> | |
</head> | |
<body> | |
<article id="stable_id:1"> | |
<header> | |
<h1>A post authored on January 1st</h1> | |
<time datetime="2024-01-01">January 1, 2024</time> | |
</header> | |
<p> | |
The text content of the <h1> is the post title. The | |
<code>datetime</code> attribute of the <code><time></code> element | |
is the post tile. The text content of the <code>datetime</code> is | |
purely ornamental for viewing the feed in the browser. | |
</p> | |
<p> | |
Everyting outside of the <code><header></code> element is the post | |
content. | |
</p> | |
<p>This paragraph? That's content too.</p> | |
</article> | |
<article id="stable_id:2"> | |
<header> | |
<h1>A post authored on January 3rd</h1> | |
<time datetime="2024-01-03">3 JAN 2024</time> | |
</header> | |
<main> | |
<p> | |
Another approach could be wrapping the content in an | |
<code><main></code> element. It could make things | |
<em>easier</em> for a parser. But computers are doing the parsing so | |
why add extraneous markup? | |
</p> | |
</main> | |
</article> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment