From f271291f49bb82e3b05bdfe48b7988fbf06adbff Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Thu, 2 Jun 2022 17:25:52 -0700 Subject: [PATCH] Automate reply-context, add more metadata to Atom - Build reply-context from front-matter - Add more activitystreams, portblecontacts, ostatus, etc. metadata to Atom feed. Inspired by Pleroma's feeds. --- content/notes/answer-engines.md | 11 +++-- content/notes/commodified-and-commoditized.md | 12 +++-- content/notes/on-wordcounts.md | 11 +++-- content/notes/pale-moon.md | 10 ++-- content/notes/signal-security.md | 12 +++-- content/notes/things-can-get-better.md | 14 +++--- layouts/_default/list.atom.xml | 46 +++++++++++++++---- layouts/_default/notes.html | 7 ++- layouts/_default/rss.xml | 17 ++++++- layouts/partials/full-article.html | 3 ++ layouts/partials/reply-context.html | 15 ++++++ 11 files changed, 115 insertions(+), 43 deletions(-) create mode 100644 layouts/partials/reply-context.html diff --git a/content/notes/answer-engines.md b/content/notes/answer-engines.md index 241040c..d387588 100644 --- a/content/notes/answer-engines.md +++ b/content/notes/answer-engines.md @@ -1,12 +1,13 @@ --- title: "Answer engines" date: 2022-05-25T19:59:08+00:00 +lastMod: 2022-05-25T19:59:08+00:00 +replyURI: "https://kevq.uk/is-duckduckgo-duckduckdone/" +replyTitle: "Is DuckDuckGo, DuckDuckDone?" +replyType: "BlogPosting" +replyAuthor: "Kev Quirk" +replyAuthorURI: "https://kevq.uk/about/" --- - I read your article and share similar concerns. Using Microsoft Bing and Google Search's commercial APIs generally requires accepting some harsh terms, including a ban on mixing SERPs from multiple sources (this is why Ixquick shut down and the company pivoted to the Google-exclusive Startpage search service). But the requirement to allow trackers in a companion web browser was new to me. diff --git a/content/notes/commodified-and-commoditized.md b/content/notes/commodified-and-commoditized.md index 9abaf8c..79c4062 100644 --- a/content/notes/commodified-and-commoditized.md +++ b/content/notes/commodified-and-commoditized.md @@ -1,13 +1,15 @@ --- title: "Commodified and commoditized" date: 2022-06-01T00:47:55-07:00 +lastMod: 2022-06-01T00:47:55-07:00 +replyURI: "https://toot.cat/@idlestate/108396947965094826" +replyTitle: "not only are we not the customer, we aren't even the product: We're the commodified complement of the product" +replyType: "SocialMediaPosting" +replyAuthor: "@idlestate@toot.cat" +replyAuthorURI: https://toot.cat/@idlestate/ --- - -Commodification means something else; I'm assuming you're referring to "commoditize", as in "commoditize your complement". Although in this context the words have some _really interesting_ overlap, which is why I brought it up. See {{}}{{}} by {{}}{{}}. +Commodification means something else; I'm assuming you're referring to "commoditize", as in "commoditize your complement". Although in this context the words have some _really interesting_ overlap, which is why I brought it up. See {{}}{{}} by {{}}. We are first commodified by being made a complement to a product, then gradually commoditized as complements ideally are. diff --git a/content/notes/on-wordcounts.md b/content/notes/on-wordcounts.md index 2536bda..4d60217 100644 --- a/content/notes/on-wordcounts.md +++ b/content/notes/on-wordcounts.md @@ -1,12 +1,13 @@ --- title: "On displaying word counts" date: 2022-05-29T12:00:04-07:00 +lastMod: 2022-05-29T12:00:04-07:00 +replyURI: "https://social.treehouse.systems/@ayushnix/108364036611051719" +replyTitle: "What's your opinion on writing the number of words in a blog post and the estimated time it'll take to read it?" +replyType: "SocialMediaPosting" +replyAuthor: "Ayush Agarwal" +replyAuthorURI: "https://microblog.ayushnix.com/" --- - - Some of my posts are long. My longest post is almost 20k words as of right now (60-80 pages printed out), and will get longer as I update it. Length is an imperfect yet useful measure of the amount of detail one can expect. There are many "lists of practices" on the Web about web design. By communicating that mine would take an hour and a half to read, I communicate that my list has some more thought put into it. diff --git a/content/notes/pale-moon.md b/content/notes/pale-moon.md index 58df550..70b76f9 100644 --- a/content/notes/pale-moon.md +++ b/content/notes/pale-moon.md @@ -1,11 +1,12 @@ --- title: "Pale Moon" date: 2022-06-01T09:59:32-07:00 +replyURI: "https://social.treehouse.systems/@ayushnix/108403066213035358" +replyTitle: "I've never used Pale Moon but I also don't understand why anyone would use it. If I'm not mistaken, Pale Moon exists because it didn't want to part ways with XUL extensions?" +replyType: "SocialMediaPosting" +replyAuthor: "Ayush Agarwal" +replyAuthorURI: "https://microblog.ayushnix.com/" --- - Pale Moon's inception pre-dates Firefox 57 by many years; before its notoriety following the removal of XUL/XPCOM, it was popular among people who didn't like Electrolysis. @@ -16,3 +17,4 @@ WebExtensions that fill in missing functionality often require content injection I still wouldn't recommend it due to extremely weak sandboxing and a naive approach to security. The devs respond to sandboxing queries by saying it's secure because "it separates the content and application" which tells you how little they care or understand; untrusted content needs isolation not just from the browser but from other untrusted content. Given the scope of a browser, even Firefox isn't where it should be (even given their commendable progress on Fission, RLBox, and their utility process overhaul), let alone caught up to the mitigations in Chromium's Blink or WebKit's JavaScriptCore but I digress. It'd be totally fine if they described their browser as a complement to a more airtight one or as a dev tool (it's honestly a great dev tool given some addons, I'll happily concede that). But when you describe yourself as a replacement to other browsers but lack the security architecture to back it up, you're being irresponsible. + diff --git a/content/notes/signal-security.md b/content/notes/signal-security.md index d9d2709..bad1ef0 100644 --- a/content/notes/signal-security.md +++ b/content/notes/signal-security.md @@ -1,12 +1,14 @@ --- title: "Signal security" date: 2022-05-26T12:18:24-07:00 +lastMod: 2022-05-26T12:18:24-07:00 +replyURI: "https://disqordia.space/notice/AJqmgRLFlyVENIXcDA" +replyTitle: "europe wants to ban signal" +replyType: "SocialMediaPosting" +replyAuthor: "chjara" +replyAuthorURI: "https://tuxcrafting.online/" --- - - What do you mean by "false sense of security"? Signal's cryptography is pretty solid. It's one of the only messengers with such a lack of metadata leakage; if you combine it with Tor you can add enough noise to the network-layer metadata to be more private than almost any alternative. Don't get me wrong, [I dislike it on the grounds of being a closed platform](../../../../../posts/2021/01/27/whatsapp-and-the-domestication-of-users/), but few alternatives exist that support both offline messaging and have such little metadata leakage. I'm willing to hear suggested alternatives that do not bake a "cryptographically-secure, decentralized pyramid scheme" (cryptocurrency) into the protocol. I'm not aware of any such alternative at the moment. + diff --git a/content/notes/things-can-get-better.md b/content/notes/things-can-get-better.md index 29f6e6c..cc98939 100644 --- a/content/notes/things-can-get-better.md +++ b/content/notes/things-can-get-better.md @@ -1,18 +1,20 @@ --- title: "Things can get better" date: 2022-05-30T13:24:30-07:00 +lastMod: 2022-05-30T13:24:30-07:00 +replyURI: "https://mastodon.art/@TerryHancock/108392295120692087" +replyTitle: "Being annoyed with software is always going to be a part of the experience" +replyType: "SocialMediaPosting" +replyAuthor: "Terry Hancock" +replyAuthorURI: "https://mastodon.art/@TerryHancock" --- - - I'm in partial agreement with this take. On one hand, expectations change with time. Most people outside my bubble look at interfaces I like using and say they look "ugly" and that they're "weird" (their words); they wouldn't have said that when I was younger. -On the other hand, some "annoyances" are actually removable *barriers*. Accessibility comes to mind. If you take software that does not work with assistive technologies (ATs) and fix it, AT-users might move on to the next accessibility issue. But they'll be markedly happier than before, when they just couldn't use it. +On the other hand, some "annoyances" are actually removable _barriers_. Accessibility comes to mind. If you take software that does not work with assistive technologies (ATs) and fix it, AT-users might move on to the next accessibility issue. But they'll be markedly happier than before, when they just couldn't use it. Similar examples include localization and compatibility. Man, positive takes like this feel really out of character for me. + diff --git a/layouts/_default/list.atom.xml b/layouts/_default/list.atom.xml index d1c2974..b7886c4 100644 --- a/layouts/_default/list.atom.xml +++ b/layouts/_default/list.atom.xml @@ -2,13 +2,35 @@ {{- if .IsHome }} {{- $pages = where .Site.RegularPages "Section" "" -}} {{ end -}} +{{- $type := "article" -}} +{{- $period := "daily" -}} +{{- if eq .Section "notes" -}} + {{- $type = "note" -}} + {{- $period = "hourly" -}} +{{- end -}} +{{- $icon_svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" -}} +{{- $icon_png := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "md5" -}} - + {{ .Section | humanize}} on {{ .Site.Title }} + {{ $icon_png.Permalink }} {{ .Site.Params.icon | absURL }} {{ .Params.Description }} + {{ $period }} + 2 + http://activitystrea.ms/schema/1.0/person + Seirdy + Seirdy Rohan Kumar https://seirdy.one/ @@ -16,8 +38,8 @@ {{ .Permalink }} {{ range $pages }} - <div xmlns="http://www.w3.org/1999/xhtml">{{ .Title | safeHTML }}</div> - + {{ .Title }} + {{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }} {{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }} @@ -26,18 +48,22 @@ {{ .Permalink }} CC-BY-SA 4.0 by Rohan Kumar + {{- with .Params.replyURI }} + + {{- end -}} + {{- with .Params.replyAuthorURI }} + + {{- end -}}
+ {{- if .Params.replyURI -}} + {{- partial "reply-context" .Params | replaceRE `(?: )?(?:item(type|scope|prop|id|ref)="[^"]*"|class="language-figure")` "" | safeHTML }} + {{- end -}} {{ partial "processed-content.html" . | replaceRE `(?: )?(?:item(type|scope|prop|id|ref)="[^"]*"|class="language-figure")` "" | safeHTML }}
- - {{- if eq .Section "notes" -}} - note - {{- else if eq .Section "posts" -}} - article - {{- end -}} - + http://activitystrea.ms/schema/1.0/{{ $type }} + http://activitystrea.ms/schema/1.0/post
{{ end }}
diff --git a/layouts/_default/notes.html b/layouts/_default/notes.html index e110d97..8669be0 100644 --- a/layouts/_default/notes.html +++ b/layouts/_default/notes.html @@ -21,7 +21,12 @@ {{- if gt (sub .Lastmod.Unix .Date.Unix) 3600 -}} , updated {{ .Lastmod.Format "2006-01-02 15:04:05" }} {{- end }} -
{{ partial "processed-content.html" . }}
+
+ {{- if .Params.replyURI -}} + {{- partial "reply-context" .Params -}} + {{- end -}} + {{ partial "processed-content.html" . }} +
{{- end }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 3ad34b9..75ea42d 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -11,13 +11,26 @@ {{- $pages = $pages | first $limit -}} {{- end -}} {{- $currentSection := .Section -}} +{{- $type := "article" -}} +{{- $period := "daily" -}} +{{- $mins := "1440" -}} +{{- if eq .Section "notes" -}} + {{- $type = "note" -}} + {{- $period = "hourly" -}} + {{- $mins = "60" -}} +{{- end -}} {{- printf "" | safeHTML }} - + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} {{ .Permalink }} Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} - 1440 + {{ $mins }} + {{ $period }} + 1 Hugo -- gohugo.io{{ with .Site.LanguageCode }} {{.}}{{end}}{{ with .Site.Author.email }} {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} diff --git a/layouts/partials/full-article.html b/layouts/partials/full-article.html index 172c8c6..91914a4 100644 --- a/layouts/partials/full-article.html +++ b/layouts/partials/full-article.html @@ -9,6 +9,9 @@
+ {{- if .Params.replyURI -}} + {{- partial "reply-context" .Params -}} + {{- end -}} {{- partial "processed-content" . -}}
diff --git a/layouts/partials/reply-context.html b/layouts/partials/reply-context.html new file mode 100644 index 0000000..8e24bf0 --- /dev/null +++ b/layouts/partials/reply-context.html @@ -0,0 +1,15 @@ +{{- $schemaType := "SocialMediaPosting" -}} +{{- with .replyType -}} + {{- $schemaType = . -}} +{{- end -}} +