1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00

Re-introduce RSS discoverability alongside Atom

The RSS feeds use escaped HTML instead of XHTML, which improves
compatibility with certain feed readers (e.g. Microsoft Outlook).

Mention that Outlook uses its own weird engine for feed contents in my
web best practices article.
This commit is contained in:
Rohan Kumar 2022-06-17 08:51:53 -07:00
parent 696af47454
commit 9f3d6b9df3
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
7 changed files with 36 additions and 39 deletions

View file

@ -3,6 +3,7 @@ outputs:
- html
- gemtext
- atom
- RSS
title: Seirdy's Home
description: "Seirdy's Home: personal website and blog for Rohan Kumar, A.K.A. Seirdy. I write about and develop software to promote user autonomy."
sitemap:
@ -23,7 +24,7 @@ About this site
In addition to its [canonical url](https://seirdy.one), a "rough draft" of this website also exists on my [Tildeverse page](https://envs.net/~seirdy/ "{itemprop='sameAs' class='u-url' rel='me'}"). This site's content also appears on my [Gemini capsule](gemini://seirdy.one "{itemprop='sameAs' class='u-syndication' rel='me'}").
This is a basic [IndieWeb site](https://indieweb.org/) that contains articles, notes, and bookmarks. You can subscribe to a combined feed of my articles and notes using [the site's Atom feed](./atom.xml), or you can subscribe to sections independently.
This is a basic [IndieWeb site](https://indieweb.org/) that contains articles, notes, and bookmarks. You can subscribe to a combined feed of my articles and notes using [the site's Atom feed](./atom.xml), or you can subscribe to sections independently. If your feed reader has problems displaying entry contents (I know Outlook does), I also have a legacy [RSS feed for the whole site](./index.xml) and for each section.
About me
--------

View file

@ -174,4 +174,5 @@ This site is featured in some cool directories.
- [Just Another Useless Page](https://www.geocities.ws/jaup/jaup.htm)
- [Webrings Fanlisting](https://fanlistings.nickifaulk.com/webrings/)
- [Gossip's Web](https://gossipsweb.net/personal-websites)
- [Nixers](https://github.com/nixers-projects/sites/wiki/List-of-nixers.net-user-sites)

View file

@ -1418,17 +1418,18 @@ These tests begin reasonably, but gradually grow absurd. Once again, use your ju
8. Test keyboard navigability with the tab key and caret navigation. Even without specifying tab indexes, tab selection should follow a logical order if you keep the layout simple.
9. Test in textual browsers: lynx, links, w3m, ELinks, edbrowse, EWW, Netrik, etc.
10. Test in an online website translator tool.
11. Read the (prettified/indented) HTML source itself and parse it with your brain. See if anything seems illogical or unnecessary. Imagine giving someone a printout of your page's <body> along with a whiteboard. If they have a basic knowledge of HTML tags, would they be able to draw something resembling your website?
12. Test with unorthodox graphical browser engines, like NetSurf, Dillo, Servo, or the Serenity OS browser.
13. Test how your page renders in ancient browsers, like Netscape Navigator or Tkhtml. Use a TLS terminator or serve over HTTP from localhost.
14. Try printing out your page in black-and-white from an unorthodox graphical browser.
15. Download your webpage and test how multiple word processors render and generate PDFs from it.¹⁴
16. Combine conversion tools. Combine an HTML-to-EPUB converter and an EPUB-to-PDF converter, or stack multiple article-extraction utilities. Be creative and enjoy breaking your site. When something breaks, examine the breakage and see if it's caused by an issue in your markup, or a CSS feature with an equivalent alternative.
17. Build a time machine. Travel decades--or perhaps centuries--into the future. Keep going forward until the WWW is breathing its last breath. Test your site on future browsers. Figuring out how to transfer your files onto their computers might take some time, but you have a time machine so that shouldn't be too hard. When you finish, go back in time to meet Benjamin Franklin:
11. Test your feeds (RSS, Atom, JSON, etc.) in multiple readers to ensure they render your markup correctly. Microsoft Outlook uses Word's Internet-Explorer-based HTML engine to display these contents; Newsboat uses its own custom HTML renderer. Most don't support CSS.
12. Read the (prettified/indented) HTML source itself and parse it with your brain. See if anything seems illogical or unnecessary. Imagine giving someone a printout of your page's <body> along with a whiteboard. If they have a basic knowledge of HTML tags, would they be able to draw something resembling your website?
13. Test with unorthodox graphical browser engines, like NetSurf, Dillo, Servo, or the Serenity OS browser.
14. Test how your page renders in ancient browsers, like Netscape Navigator or Tkhtml. Use a TLS terminator or serve over HTTP from localhost.
15. Try printing out your page in black-and-white from an unorthodox graphical browser.
16. Download your webpage and test how multiple word processors render and generate PDFs from it.¹⁴
17. Combine conversion tools. Combine an HTML-to-EPUB converter and an EPUB-to-PDF converter, or stack multiple article-extraction utilities. Be creative and enjoy breaking your site. When something breaks, examine the breakage and see if it's caused by an issue in your markup, or a CSS feature with an equivalent alternative.
18. Build a time machine. Travel decades--or perhaps centuries--into the future. Keep going forward until the WWW is breathing its last breath. Test your site on future browsers. Figuring out how to transfer your files onto their computers might take some time, but you have a time machine so that shouldn't be too hard. When you finish, go back in time to meet Benjamin Franklin:
=> https://xkcd.com/567/ xkcd: Urgent Mission
I'm still on step 16, trying to find new ways to break this page. If you come up with a new test, please share it:
I'm still on step 17, trying to find new ways to break this page. If you come up with a new test, please share it:
=> mailto:~seirdy/seirdy.one-comments@lists.sr.ht Mailing list for this website
@ -1596,6 +1597,5 @@ I find Practical Typography quite useful for printed works, and incorporated a m
¹³ Consider disabling the JIT for your normal browsing too; doing so removes whole classes of vulnerabilities. In Firefox, toggle javascript.options.ion, javascript.options.baselinejit, javascript.options.native_regexp, javascript.options.asmjs, and javascript.options.wasm in about:config; in Chromium, run chromium with `--js-flags='--jitless'`; in the Tor Browser, set the security level to "Safer".
¹⁴ LibreOffice can also render HTML but has extremely limited support for CSS. OnlyOffice seems to work best, but doesn't load images. If your page is CSS-optional, it should look fine in both.
Fun fact: Microsoft Outlook renders HTML email with Microsoft Word's proprietary HTML engine.
¹⁵ Screen readers aren't alone here. Several programs strip inline formatting: certain feed readers, search result snippets, and textual browsers invoked with the `-dump` flag are some examples I use every day.

View file

@ -1128,7 +1128,7 @@ On lists with many links, I had to find other ways to ensure adequate tap-target
- The [webmention list](#webmentions) after this article separates links with timestamps and some paragraph spacing.
- Some list items have links with extra padding. These include description terms (`<dt>`) and navigation elements, such as the table of contents or the site header and footer,
- Some list items have links with extra padding. These include description terms (`<dt>`) and navigation elements, such as the table of contents or the site header and footer,
- The [posts list](../../../../) and the list of related articles at the beginning of [one of my posts](../../../../2022/02/02/floss-security/) separates links with non-interactive text descriptions
@ -1152,7 +1152,7 @@ Line spacing (leading) is at least space-and-a-half within paragraphs, and parag
{{</quotation>}}
Non-<wbr />brow&shy;sers: reading mode {#non-browsers-reading-mode}
------------------------------------
--------------------------------------
Fully standards-compliant browsers aren't the only programs people use. They also use "reading mode" tools and services.
@ -1442,21 +1442,23 @@ These tests begin reasonably, but gradually grow absurd. Once again, use your ju
10. Test in an online website translator tool.
11. Read the (prettified and indented) HTML source itself and parse it with your brain. See if anything seems illogical or un&shy;necessary. Imagine giving someone a printout of your page's `<body>` along with a whiteboard. If they have a basic knowledge of HTML tags, would they be able to draw something resembling your website?
11. Test your feeds (RSS, Atom, JSON, etc.) in multiple readers to ensure they render your markup correctly. Microsoft Outlook uses Word's Internet-Explorer-based HTML engine to display these contents; Newsboat uses its own custom HTML renderer. Most don't support CSS.
12. Test with unorthodox graphical browser engines, like NetSurf, Dillo, Servo, or the Serenity OS browser.
12. Read the (prettified and indented) HTML source itself and parse it with your brain. See if anything seems illogical or un&shy;necessary. Imagine giving someone a printout of your page's `<body>` along with a whiteboard. If they have a basic knowledge of HTML tags, would they be able to draw something resembling your website?
13. Test how your page renders in ancient browsers, like Netscape Navigator or Tkhtml. Use a TLS terminator or serve over HTTP from localhost.
13. Test with unorthodox graphical browser engines, like NetSurf, Dillo, Servo, or the Serenity OS browser.
14. Try printing out your page in black-and-white from an unorthodox graphical browser.
14. Test how your page renders in ancient browsers, like Netscape Navigator or Tkhtml. Use a TLS terminator or serve over HTTP from localhost.
15. Download your webpage and test how multiple word processors render and generate PDFs from it.[^25]
15. Try printing out your page in black-and-white from an unorthodox graphical browser.
16. Combine conversion tools. Combine an HTML-<wbr />to-<wbr />EPUB converter and an EPUB-<wbr />to-<wbr />PDF converter, or stack multiple article-extraction utilities. Be creative and enjoy breaking your site. When something breaks, examine the breakage and see if it's caused by an issue in your markup, or a CSS feature with an equivalent alternative.
16. Download your webpage and test how multiple word processors render and generate PDFs from it.[^25]
17. Build a time machine. Travel decades---or perhaps centuries---into the future. Keep going forward until the WWW is breathing its last breath. Test your site on future browsers. Figuring out how to transfer your files onto their computers might take some time, but you have a time machine so that shouldn't be too hard. When you finish, go back in time to [meet Benjamin Franklin](https://xkcd.com/567/).
17. Combine conversion tools. Combine an HTML-<wbr />to-<wbr />EPUB converter and an EPUB-<wbr />to-<wbr />PDF converter, or stack multiple article-extraction utilities. Be creative and enjoy breaking your site. When something breaks, examine the breakage and see if it's caused by an issue in your markup, or a CSS feature with an equivalent alternative.
I'm still on step 16, trying to find new ways to break this page. If you come up with a new test, please [share it](mailto:~seirdy/seirdy.one-comments@lists.sr.ht).
18. Build a time machine. Travel decades---or perhaps centuries---into the future. Keep going forward until the WWW is breathing its last breath. Test your site on future browsers. Figuring out how to transfer your files onto their computers might take some time, but you have a time machine so that shouldn't be too hard. When you finish, go back in time to [meet Benjamin Franklin](https://xkcd.com/567/).
I'm still on step 17, trying to find new ways to break this page. If you come up with a new test, please [share it](mailto:~seirdy/seirdy.one-comments@lists.sr.ht).
{{<image-figure representative="True">}} {{< picture name="serenity" alt="Retro-looking browser with bitmap fonts showing this article's \"Code snippet 4\"." class="pix" sf=2 >}}
@ -1665,6 +1667,4 @@ A special thanks goes out to GothAlice for the questions she answered in <samp>#
[^25]: LibreOffice can also render HTML but has extremely limited support for CSS. OnlyOffice seems to work best, but doesn't load images. If your page is CSS-optional, it should look fine in both.
Fun fact: Microsoft Outlook renders HTML email with Microsoft Word's proprietary HTML engine.

View file

@ -1,7 +1,7 @@
{{ define "main" -}}
<main itemprop="mainEntity" class="h-feed hfeed" itemscope="" itemtype="https://schema.org/DataFeed">
<h1 class="p-name" itemprop="name headline" id="notes">Notes</h1>
<p>This is my microblog, containing short informal entries. <a href="../posts/">See my blog</a> for longer entries. An <a href="./atom.xml">An Atom feed</a> contains the full text of all my notes.</p>
<p>This is my microblog, containing short informal entries. <a href="../posts/">See my blog</a> for longer entries. An <a href="./atom.xml">An Atom feed</a> contains the full text of all my notes. If that has any problems, I also have <a href="./index.xml">a legacy RSS feed</a>.</p>
<p role="doc-tip">
Timestamp format: <code>YYYY-MM-DD HH:MM:SS</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite>. Sorted newest to oldest.
</p>

View file

@ -1,31 +1,28 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = $pctx.RegularPages -}}
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{{- $pages := (where site.RegularPages "Section" .Section) -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- $currentSection := .Section -}}
{{- $type := "article" -}}
{{- $period := "daily" -}}
{{- $mins := "1440" -}}
{{- $title := .Section | humanize -}}
{{- if eq .Section "notes" -}}
{{- $type = "note" -}}
{{- $period = "hourly" -}}
{{- $mins = "60" -}}
{{- end -}}
{{- if .IsHome }}
{{- $period := "hourly" -}}
{{- $title = "All content" -}}
{{- $pages = .Site.RegularPages -}}
{{- $mins = "60" -}}
{{ end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xml:lang="{{ .Site.LanguageCode }}">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<title>{{ $title }} on {{ .Site.Title }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<ttl>{{ $mins }}</ttl>
@ -40,8 +37,7 @@
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ range where .Site.Pages "Kind" "page" }}
{{ if (eq .Section $currentSection ) }}
{{ range $pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
@ -51,6 +47,5 @@
<description>{{- .Content | replaceRE `(?: )?(?:item(type|scope|prop|id|ref)="[^"]*"|class="language-figure")` "" | html -}}</description>
</item>
{{ end }}
{{ end }}
</channel>
</rss>

View file

@ -5,7 +5,7 @@
{{- if $isStandalone -}}
<main itemprop="mainEntity" class="h-feed hfeed" itemscope="" itemtype="https://schema.org/DataFeed">
<h1 class="p-name" itemprop="name headline" id="posts">Posts</h1>
<p>These are all of my long-form posts. <a href="./atom.xml">An Atom feed</a> contains the full text of all my posts.</p>
<p>These are all of my long-form posts. <a href="./atom.xml">An Atom feed</a> contains the full text of all my posts. If that has any problems, I also have <a href="./index.xml">a legacy RSS feed</a>.</p>
{{- else -}}
<section class="h-feed hfeed" itemprop="hasPart" itemscope="" itemtype="https://schema.org/DataFeed">
<h2 class="p-name" itemprop="name" id="posts">Posts</h2>