1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 21:02:09 +00:00

Add webmention URL re-writes

This allows me to update a webmention URL if it breaks or changes and
the admin didn't bother putting a re-direct in place.

I shouldn't have needed to do this. Cool URLs don't change.
This commit is contained in:
Rohan Kumar 2022-11-17 20:16:57 -08:00
parent 970ba274f5
commit 6ec8e63eee
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
5 changed files with 14 additions and 7 deletions

View file

@ -30,7 +30,7 @@ I am okay with you using whichever post-visibility you wish when replying to me,
If I want to make a well-thought-out post that could benefit others, Ill post it to my websites “notes” section and syndicate it to Fedi with the “#POSSE” (Publish on Own Site, Syndicate Elsewhere) hashtag. If I want to make a well-thought-out post that could benefit others, Ill post it to my websites “notes” section and syndicate it to Fedi with the “#POSSE” (Publish on Own Site, Syndicate Elsewhere) hashtag.
=> https://seirdy.one/notes/ My notes => https://seirdy.one/notes/ My notes
=> https://indieweb.org/posse POSSE => https://indieweb.org/POSSE POSSE
My notes also have a dedicated Atom and RSS feed. This is much lower-volume and “cleaner” than my Fediverse profile, if thats what you prefer. My notes also have a dedicated Atom and RSS feed. This is much lower-volume and “cleaner” than my Fediverse profile, if thats what you prefer.

View file

@ -38,7 +38,7 @@ I try to always always add content-warnings (<abbr title="content-warn or conten
I am okay with you using whichever post-visibility you wish when replying to me, but I speak only for myself. If I want to talk to you privately I will use an alternate means of communication. I am okay with you using whichever post-visibility you wish when replying to me, but I speak only for myself. If I want to talk to you privately I will use an alternate means of communication.
If I want to make a well-thought-out post that could benefit others, I'll post it to [my website's "notes" section](../../notes/) and syndicate it to Fedi with the "#POSSE" ([Publish on Own Site, Syndicate Elsewhere](https://indieweb.org/posse)) hashtag. My notes also have a dedicated Atom and RSS feed. This is much lower-volume and "cleaner" than my Fediverse profile, if that's what you prefer. If I want to make a well-thought-out post that could benefit others, I'll post it to [my website's "notes" section](../../notes/) and syndicate it to Fedi with the "#POSSE" ([Publish on Own Site, Syndicate Elsewhere](https://indieweb.org/POSSE)) hashtag. My notes also have a dedicated Atom and RSS feed. This is much lower-volume and "cleaner" than my Fediverse profile, if that's what you prefer.
I will probably not boost pictures lacking alt-text, descriptions in the post body, or captions in comments. If I see a nice un-captioned picture, Ill comment with my own caption instead. I often use a screen reader to reduce overstimulation and eye strain, and I sometimes use textual clients that can't display images; alt-text is really important to me! I will probably not boost pictures lacking alt-text, descriptions in the post body, or captions in comments. If I see a nice un-captioned picture, Ill comment with my own caption instead. I often use a screen reader to reduce overstimulation and eye strain, and I sometimes use textual clients that can't display images; alt-text is really important to me!

2
csv/rewrites.csv Normal file
View file

@ -0,0 +1,2 @@
https://www.tinybrain.fans/accessibility.html,https://tinybrain.fans/accessibility.html
https://brid.gy/post/twitter/seirdy/1536747178877673475,https://archive.today/Mzo9v
1 https://www.tinybrain.fans/accessibility.html https://tinybrain.fans/accessibility.html
2 https://brid.gy/post/twitter/seirdy/1536747178877673475 https://archive.today/Mzo9v

View file

@ -1,5 +1,9 @@
{{- $wbmLinks := (slice "https://si3t.ch/log/2021-04-18-entetes-floc.html" "https://xmpp.org/2021/02/newsletter-02-feburary/" "https://gurlic.com/technology/post/393626430212145157" "https://gurlic.com/technology/post/343249858599059461" "https://www.librepunk.club/@penryn/108411423190214816" "https://benign.town/@josias/108457015755310198" "http://www.tuxmachines.org/node/148146" "https://i.reddit.com/r/web_design/comments/k0dmpj/an_opinionated_list_of_best_practices_for_textual/gdmxy4u/" "https://bbbhltz.space/posts/thoughts-on-tech-feb2021/" "https://jorts.horse/@alice/108477866954580532" "https://brid.gy/comment/mastodon/@Seirdy@pleroma.envs.net/AK7FeQ4h2tUCKNwlXc/AK7GtGkE7JOVgm1Cgi" "https://fosstodon.org/@werwolf/108529382741681838" "https://mastodon.social/@WahbAllat/108986614624476982" "https://linuxrocks.online/@friend/109029028283860044" "https://fosstodon.org/@fullstackthaumaturge/108765040526523487" "https://inhji.de/notes/an-opinionated-list-of-best-practices-for-textual-websites" "https://ravidwivedi.in/whatsapp/" "https://hackers.town/@theruran/108440680870400884" "https://hackers.town/@theruran/108440475936938471" "https://mckinley.cc/twtxt/2022-may-aug.html#2022-06-25T16:06:07-07:00" "https://tarnkappe.info/lesetipps-bayern-it-sicherheit-db-app-trackt-neue-eu-datenbank/" "https://catcatnya.com/@kescher/109221687024062842" "https://catcatnya.com/@kescher/109221707054861018" "https://catcatnya.com/@kescher/109221721385520640" "https://catcatnya.com/@kescher/109221750082044200" "https://brid.gy/post/twitter/seirdy/1536747178877673475" "https://markesler.com/blog/website-design/" "https://catcatnya.com/@kescher/108601418196537980" "https://chaos.social/@n0toose/109035270210401105" "https://nicfab.it/en/posts/aware-digital-communication-respecting-privacy-and-the-apps-or-services-you-choose/") -}} {{- $wbmLinks := (slice "https://si3t.ch/log/2021-04-18-entetes-floc.html" "https://xmpp.org/2021/02/newsletter-02-feburary/" "https://gurlic.com/technology/post/393626430212145157" "https://gurlic.com/technology/post/343249858599059461" "https://www.librepunk.club/@penryn/108411423190214816" "https://benign.town/@josias/108457015755310198" "http://www.tuxmachines.org/node/148146" "https://i.reddit.com/r/web_design/comments/k0dmpj/an_opinionated_list_of_best_practices_for_textual/gdmxy4u/" "https://bbbhltz.space/posts/thoughts-on-tech-feb2021/" "https://jorts.horse/@alice/108477866954580532" "https://brid.gy/comment/mastodon/@Seirdy@pleroma.envs.net/AK7FeQ4h2tUCKNwlXc/AK7GtGkE7JOVgm1Cgi" "https://fosstodon.org/@werwolf/108529382741681838" "https://mastodon.social/@WahbAllat/108986614624476982" "https://linuxrocks.online/@friend/109029028283860044" "https://fosstodon.org/@fullstackthaumaturge/108765040526523487" "https://inhji.de/notes/an-opinionated-list-of-best-practices-for-textual-websites" "https://ravidwivedi.in/whatsapp/" "https://hackers.town/@theruran/108440680870400884" "https://hackers.town/@theruran/108440475936938471" "https://mckinley.cc/twtxt/2022-may-aug.html#2022-06-25T16:06:07-07:00" "https://tarnkappe.info/lesetipps-bayern-it-sicherheit-db-app-trackt-neue-eu-datenbank/" "https://catcatnya.com/@kescher/109221687024062842" "https://catcatnya.com/@kescher/109221707054861018" "https://catcatnya.com/@kescher/109221721385520640" "https://catcatnya.com/@kescher/109221750082044200" "https://brid.gy/post/twitter/seirdy/1536747178877673475" "https://markesler.com/blog/website-design/" "https://catcatnya.com/@kescher/108601418196537980" "https://chaos.social/@n0toose/109035270210401105" "https://nicfab.it/en/posts/aware-digital-communication-respecting-privacy-and-the-apps-or-services-you-choose/" "https://haxf4rall.com/2022/09/23/a-collection-of-articles-about-hardening-linux/") -}}
{{- $archivetodayLinks := (slice "https://example.com") -}} {{- $archivetodayLinks := (slice "https://example.com") -}}
{{- $rewritesDict := dict "" "" -}}
{{- range $i, $r := (getCSV "," "/csv/rewrites.csv") -}}
{{- $rewritesDict = merge $rewritesDict (dict (index $r 0) (index $r 1)) -}}
{{- end -}}
<hr /> <hr />
<section aria-labelledby="webmentions" data-nosnippet=""><!--data-nosnippet means this content shouldn't be used for url summaries in search engines.--> <section aria-labelledby="webmentions" data-nosnippet=""><!--data-nosnippet means this content shouldn't be used for url summaries in search engines.-->
<h2 id="webmentions" tabindex="-1">Web&#173;mentions</h2> <h2 id="webmentions" tabindex="-1">Web&#173;mentions</h2>
@ -35,6 +39,9 @@
{{- $title = $webmention.title | strings.TrimSuffix "…" | truncate 128 -}} {{- $title = $webmention.title | strings.TrimSuffix "…" | truncate 128 -}}
{{- end -}} {{- end -}}
{{- $src := $webmention.source -}} {{- $src := $webmention.source -}}
{{- with index $rewritesDict $src -}}
{{- $src = . -}}
{{- end -}}
{{- if in $wbmLinks $src -}} {{- if in $wbmLinks $src -}}
{{- $src = printf "https://web.archive.org/web/0/%s" $src -}} {{- $src = printf "https://web.archive.org/web/0/%s" $src -}}
{{- else if in $archivetodayLinks $src -}} {{- else if in $archivetodayLinks $src -}}

View file

@ -1,7 +1,7 @@
DirectoryPath: "public" DirectoryPath: "public"
IgnoreDirs: IgnoreDirs:
- "search" - "search"
CacheExpires: "72h" # 3.5 days CacheExpires: "50h" # 2 days
CheckFavicon: true CheckFavicon: true
EnforceHTML5: true EnforceHTML5: true
IgnoreAltMissing: true # an empty alt makes presentation-role explicit, it's not a defect. IgnoreAltMissing: true # an empty alt makes presentation-role explicit, it's not a defect.
@ -31,7 +31,7 @@ IgnoreURLs:
- "^gemini://" - "^gemini://"
- "mailto:" - "mailto:"
- "git@git" - "git@git"
- "http://[^/]*.onion" - "http://[^/]*\\.onion"
- "https://archive.is" - "https://archive.is"
- "https://archive.ph" - "https://archive.ph"
- "https://archive.today" - "https://archive.today"
@ -61,6 +61,4 @@ IgnoreURLs:
- "https://faq.whatsapp.com/general/security-and-privacy/answering-your-questions-about-whatsapps-privacy-policy" # my DNS filters block this domain, cbf to work around it just for htmltest - "https://faq.whatsapp.com/general/security-and-privacy/answering-your-questions-about-whatsapps-privacy-policy" # my DNS filters block this domain, cbf to work around it just for htmltest
- "https://doi.org/10.1515/popets-2017-0023" # redirects to a different domain which tends to block requests. DOI is generally good about keeping links alive; it's kinda the point of the service. - "https://doi.org/10.1515/popets-2017-0023" # redirects to a different domain which tends to block requests. DOI is generally good about keeping links alive; it's kinda the point of the service.
- "https://docs.graycot.dev/s/MFowZsw_F" # DNSSEC issue - "https://docs.graycot.dev/s/MFowZsw_F" # DNSSEC issue
- "https://tinybrain.fansaccessibility.html" # parsing error for https://www.tinybrain.fans/accessibility.html
- "https://www.tinybrain.fans/accessibility.html"
OutputDir: "linter-configs/htmltest" OutputDir: "linter-configs/htmltest"