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

Compare commits

...

12 commits

Author SHA1 Message Date
Rohan Kumar
840bf38de6
Whitespace fixes 2022-06-02 20:01:50 -07:00
Rohan Kumar
74842ce644
New note: JS-enabled engines 2022-06-02 18:32:30 -07:00
Rohan Kumar
f271291f49
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.
2022-06-02 17:36:06 -07:00
Rohan Kumar
a9ebc9e0c4
Don't compress envs deploy 2022-06-02 17:17:19 -07:00
Rohan Kumar
f52aaed4f2
Whitespace fixes 2022-06-02 17:21:15 -07:00
Rohan Kumar
1d43cce53e
Fix extra backslash 2022-06-02 17:19:55 -07:00
Rohan Kumar
cb26956bca
Internal: improve scripts
- I forgot to compress xhtml files. fix that.

- Stylistic change: remove unnecessary brace expansions
- Don't repeatedly append to a file; run commands in a different scope
  and write all at once.

Move Nu HTML validator filtering into a shell script:
- Return a bad exit code if validation errors are found after filtering
- Remove null-ish values from the JSON output; the final output *should*
  be an empty string, since nothing should be reported.
2022-06-02 17:18:13 -07:00
Rohan Kumar
b02a619260
Add missing tabindex 2022-06-02 13:14:20 -07:00
Rohan Kumar
449a1be659
Typo 2022-06-02 13:08:09 -07:00
Rohan Kumar
c1f991efff
xhtmlize: switch back to using xmllint
Switch back to using xmllint, but now extract + replace the CSS to
address the escaping.
2022-06-01 22:11:40 -07:00
Rohan Kumar
6a47371a05
Cosmetic fixes
- Drop copyright symbol: I put it there because certain programs
  explicitly look for it, but between rel=license, schema.org microdata,
  and creative commons RDFa, I think scrapers should be covered.
- Update the theme-color and friends to work with my site's updated dark
  theme.
2022-06-01 21:52:11 -07:00
Rohan Kumar
e77046bf99
Demote RSS feeds in favor of Atom
Explicitly mark RSS feeds as "legacy" because I have joined the A-Town
Atom gang and they have a strict full-time attendance policy.

Thanks Forever for pointing out the spelling/grammar error here.
2022-06-01 21:50:48 -07:00
29 changed files with 254 additions and 108 deletions

View file

@ -7,7 +7,7 @@ packages:
- rsync - rsync
- git # for Hugo's gitInfo - git # for Hugo's gitInfo
- bmake - bmake
- moreutils - libxml2-utils # for xmllint
sources: sources:
- https://git.sr.ht/~seirdy/seirdy.one - https://git.sr.ht/~seirdy/seirdy.one
secrets: secrets:

View file

@ -42,7 +42,7 @@ lint-css: $(CSS_DIR)/*.css
.PHONY: lint-html .PHONY: lint-html
lint-html: lint-html:
$(VNU) --stdout --format json --skip-non-html --also-check-svg $(OUTPUT_DIR) | jq --from-file linter-configs/vnu_filter.jq $(VNU) --stdout --format json --skip-non-html --also-check-svg $(OUTPUT_DIR) | sh scripts/filter-vnu.sh
.PHONY: hint .PHONY: hint
hint: hugo .hintrc-local hint: hugo .hintrc-local
@ -105,11 +105,11 @@ deploy: deploy-html deploy-gemini
@$(MAKE) clean @$(MAKE) clean
@$(MAKE) hugo @$(MAKE) hugo
@$(MAKE) xhtmlize @$(MAKE) xhtmlize
@$(MAKE) compress
# deploy steps need to happen one at a time # deploy steps need to happen one at a time
.PHONY: deploy-prod .PHONY: deploy-prod
deploy-prod: .prepare-deploy deploy-prod: .prepare-deploy
@$(MAKE) compress
@$(MAKE) deploy @$(MAKE) deploy
.PHONY: deploy-onion .PHONY: deploy-onion
@ -119,23 +119,18 @@ deploy-onion:
# we only deploy html to the staging site # we only deploy html to the staging site
.PHONY: deploy-staging .PHONY: deploy-staging
deploy-staging: deploy-staging:
@$(MAKE) HUGO_FLAGS='--gc' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging .prepare-deploy @$(MAKE) HUGO_FLAGS='' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging .prepare-deploy
@$(MAKE) HUGO_FLAGS='--gc' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging deploy-html @$(MAKE) HUGO_FLAGS='' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging compress
@$(MAKE) HUGO_FLAGS='' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging deploy-html
# we can lint and compress in parallel if cores are available
.PHONY: .lint-and-prepare-deploy
.lint-and-prepare-deploy:
@$(MAKE) clean
@$(MAKE) hugo
@$(MAKE) xhtmlize
@$(MAKE) lint-local compress
.PHONY: lint-and-deploy-staging .PHONY: lint-and-deploy-staging
lint-and-deploy-staging: lint-and-deploy-staging:
@$(MAKE) HUGO_FLAGS='--gc' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging .lint-and-prepare-deploy @$(MAKE) HUGO_FLAGS='' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging .prepare-deploy
@$(MAKE) HUGO_FLAGS='--gc' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging deploy-html @$(MAKE) HUGO_FLAGS='' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging compress lint-local
@$(MAKE) HUGO_FLAGS='' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging deploy-html
.PHONY: deploy-envs .PHONY: deploy-envs
deploy-envs: deploy-envs:
@$(MAKE) NO_STATIC=1 HUGO_FLAGS='--gc' USER=seirdy@envs.net WWW_ROOT=/home/seirdy/public_html GEMINI_ROOT=/home/seirdy/public_gemini HUGO_BASEURL='https://envs.net/~seirdy/' OUTPUT_DIR=public_envs .lint-and-prepare-deploy @$(MAKE) NO_STATIC=1 HUGO_FLAGS='' USER=seirdy@envs.net WWW_ROOT=/home/seirdy/public_html GEMINI_ROOT=/home/seirdy/public_gemini HUGO_BASEURL='https://envs.net/~seirdy/' OUTPUT_DIR=public_envs .prepare-deploy
@$(MAKE) NO_STATIC=1 HUGO_FLAGS='--gc' USER=seirdy@envs.net WWW_ROOT=/home/seirdy/public_html GEMINI_ROOT=/home/seirdy/public_gemini HUGO_BASEURL='https://envs.net/~seirdy/' OUTPUT_DIR=public_envs deploy @$(MAKE) NO_STATIC=1 HUGO_FLAGS='' USER=seirdy@envs.net WWW_ROOT=/home/seirdy/public_html GEMINI_ROOT=/home/seirdy/public_gemini HUGO_BASEURL='https://envs.net/~seirdy/' OUTPUT_DIR=public_envs lint-local
@$(MAKE) NO_STATIC=1 HUGO_FLAGS='' USER=seirdy@envs.net WWW_ROOT=/home/seirdy/public_html GEMINI_ROOT=/home/seirdy/public_gemini HUGO_BASEURL='https://envs.net/~seirdy/' OUTPUT_DIR=public_envs deploy

View file

@ -9,8 +9,8 @@
"description": "{{ .Site.Params.Description }}", "description": "{{ .Site.Params.Description }}",
"lang": "en-US", "lang": "en-US",
"display": "minimal-ui", "display": "minimal-ui",
"theme_color": "#0f0f0b", "theme_color": "#191919",
"background_color": "#0f0f0b", "background_color": "#191919",
"scope": "/", "scope": "/",
"start_url": "/", "start_url": "/",
"icons": [ "icons": [

View file

@ -13,7 +13,7 @@ sitemap:
Seirdys Home Seirdys Home
============= =============
I'm <a itemprop="url" href="https://seirdy.one" rel="author me home canonical" class="u-url u-uid url"> {{% indieweb-icon %}} <span itemprop="name" class="p-name fn n"> <span itemprop="givenName" class="p-given-name given-name">Rohan</span> <span itemprop="familyName" class="p-family-name family-name">Kumar</span></span></a>, a.k.a. <span itemprop="alternateName" class="p-nickname nickname">Seirdy</span> (online handle). I'm <a itemprop="url" href="https://seirdy.one" rel="author me home canonical" class="u-url u-uid url"> {{% indieweb-icon %}} <span itemprop="name" class="p-name fn n"> <span itemprop="givenName" class="p-given-name given-name">Rohan</span>&#160;<span itemprop="familyName" class="p-family-name family-name">Kumar</span></span></a>, a.k.a. <span itemprop="alternateName" class="p-nickname nickname">Seirdy</span> (online handle).
Other versions of this website Other versions of this website
------------------------------ ------------------------------

View file

@ -0,0 +1,14 @@
---
title: "JS-enabled engines"
date: 2022-06-02T18:30:30-07:00
replyURI: "https://mk.nixnet.social/notes/911asmc9rn"
replyTitle: "if search engine crawlers didn't run JavaScript the Web would be better"
replyType: "SocialMediaPosting"
replyAuthor: "Alexandra"
replyAuthorURI: "https://www.alm.website/me"
---
The only engines I know of that run JavaScript are Google, Bing, and maybe Petal. None of the other engines in my list appear to support it. I don't even think Yandex does.
It's common practice for sites to give a JavaScript-lite version to search engines, though if the content differs heavily you run the risk of hitting a manual action. I'd imagine that search-crawler-exclusive editions would become the norm if crawlers stopped handling JavaScript.
Marginalia actually seems to penalize its use.

View file

@ -1,12 +1,13 @@
--- ---
title: "Answer engines" title: "Answer engines"
date: 2022-05-25T19:59:08+00:00 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/"
--- ---
<aside role="note">
Reply to {{< mention-work itemprop="about" itemtype="BlogPosting" reply=true >}}{{<cited-work name="Is DuckDuckGo, DuckDuckDone?" extraName="headline" url="https://kevq.uk/is-duckduckgo-duckduckdone/">}} by {{<indieweb-person first-name="Kev" last-name="Quirk" url="https://kevq.uk/about/" itemprop="author">}}{{</mention-work>}}
</aside>
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 <abbr title="Search Engine Result Pages">SERPs</abbr> 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. 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 <abbr title="Search Engine Result Pages">SERPs</abbr> 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.

View file

@ -1,13 +1,15 @@
--- ---
title: "Commodified and commoditized" title: "Commodified and commoditized"
date: 2022-06-01T00:47:55-07:00 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/
--- ---
<aside role="note">
Reply to {{< mention-work itemprop="about" itemtype="SocialMediaPosting" reply=true >}}{{<cited-work name="not only are we not the customer, we aren't even the product: We're the commodified complement of the product." url="https://toot.cat/@idlestate/108396947965094826">}} by {{<indieweb-person name="@idlestate@toot.cat" url="https://toot.cat/@idlestate" itemprop="author">}}
{{</mention-work>}}
</aside>
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 {{<mention-work itemprop="citation" role="doc-credit" itemtype="BlogPosting">}}{{<cited-work url="https://rushkoff.com/commodified-vs-commoditized/" name="Commodified vs. Commoditized">}} by {{<indieweb-person first-name="Douglas" last-name="Rushkoff" url="https://rushkoff.com">}}{{</mention-work>}}. 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 {{<mention-work itemprop="citation" role="doc-credit" itemtype="BlogPosting">}}{{<cited-work url="https://rushkoff.com/commodified-vs-commoditized/" name="Commodified vs. Commoditized">}} by {{<indieweb-person first-name="Douglas" last-name="Rushkoff" url="https://rushkoff.com" itemprop="author">}}{{</mention-work>}}.
We are first commodified by being made a complement to a product, then gradually commoditized as complements ideally are. We are first commodified by being made a complement to a product, then gradually commoditized as complements ideally are.

View file

@ -1,12 +1,13 @@
--- ---
title: "On displaying word counts" title: "On displaying word counts"
date: 2022-05-29T12:00:04-07:00 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/"
--- ---
<aside role="note">
Reply to {{< mention-work itemprop="about" itemtype="SocialMediaPosting" reply=true >}}{{<cited-work name="What's your opinion on writing the number of words in a blog post and the estimated time it'll take to read it?" url="https://social.treehouse.systems/@ayushnix/108364036611051719">}} by {{<indieweb-person first-name="Ayush" last-name="Agarwal" url="https://microblog.ayushnix.com/" itemprop="author">}}
{{</mention-work>}}
</aside>
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. 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. 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.

View file

@ -1,11 +1,12 @@
--- ---
title: "Pale Moon" title: "Pale Moon"
date: 2022-06-01T09:59:32-07:00 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/"
--- ---
<aside role="note">
Reply to {{< mention-work itemprop="about" itemtype="SocialMediaPosting" reply=true >}}{{<cited-work name="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?" url="https://social.treehouse.systems/@ayushnix/108403066213035358">}} by {{<indieweb-person first-name="Ayush" last-name="Agarwal" url="https://microblog.ayushnix.com/" itemprop="author">}}
{{</mention-work>}}
</aside>
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. 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. 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. 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.

View file

@ -1,12 +1,14 @@
--- ---
title: "Signal security" title: "Signal security"
date: 2022-05-26T12:18:24-07:00 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/"
--- ---
<aside role="note">
Reply to {{< mention-work itemprop="about" itemtype="SocialMediaPosting" reply=true >}}{{<cited-work name="europe wants to ban signal" url="https://disqordia.space/notice/AJqmgRLFlyVENIXcDA">}} by {{<indieweb-person name="chjara" url="https://tuxcrafting.online/" itemprop="author">}}
{{</mention-work>}}
</aside>
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. 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. 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.

View file

@ -1,18 +1,20 @@
--- ---
title: "Things can get better" title: "Things can get better"
date: 2022-05-30T13:24:30-07:00 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"
--- ---
<aside role="note">
Reply to {{< mention-work itemprop="about" itemtype="SocialMediaPosting" reply=true >}}{{<cited-work name="Being annoyed with software is always going to be a part of the experience" url="https://mastodon.art/@TerryHancock/108392295120692087">}} by {{<indieweb-person first-name="Terry" last-name="Hancock" url="https://mastodon.art/@TerryHancock" itemprop="author">}}
{{</mention-work>}}
</aside>
I'm in partial agreement with this take. 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 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. Similar examples include localization and compatibility.
Man, positive takes like this feel really out of character for me. Man, positive takes like this feel really out of character for me.

View file

@ -2,21 +2,8 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{- default "" .Site.LanguageCode }}" xml:lang="{{- default "" .Site.LanguageCode }}" prefix="cc: http://creativecommons.org/ns#"> <html xmlns="http://www.w3.org/1999/xhtml" lang="{{- default "" .Site.LanguageCode }}" xml:lang="{{- default "" .Site.LanguageCode }}" prefix="cc: http://creativecommons.org/ns#">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="disabled-adaptations" content="watch" /><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <meta name="disabled-adaptations" content="watch" />
<meta name="robots" content="noindex,nofollow" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>{{ .Title }}</title>
{{ if not (in site.BaseURL ".onion") -}}
{{ $icon_svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" }}
{{- printf `<link rel="icon" sizes="any" href="%s" type="image/svg+xml" />` $icon_svg.RelPermalink | safeHTML }}
{{- end }}
{{ $icon_192 := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "md5" }}
{{- printf `<link rel="icon" sizes="192x192" href="%s" type="image/png" />` $icon_192.RelPermalink | safeHTML -}}
{{ $favicon := resources.Get "/favicon.png" -}}
{{ $favicon_base64 := $favicon.Content | base64Encode }}
{{ printf `<link rel="icon" sizes="32x32" href="data:image/png;base64,%s" type="image/png" />` $favicon_base64 | safeHTML }}
<meta name="color-scheme" content="light dark" />
<meta name="theme-color" content="#111" media="(prefers-color-scheme:dark)" />
<meta name="theme-color" content="#fff" media="(prefers-color-scheme:light)" />
<!-- inline CSS; remember to allow it with a hash in the CSP --> <!-- inline CSS; remember to allow it with a hash in the CSP -->
{{- $resources := slice -}} {{- $resources := slice -}}
{{- $resources = $resources | append (resources.Get "/css/main.css") -}} {{- $resources = $resources | append (resources.Get "/css/main.css") -}}
@ -27,7 +14,17 @@
{{ $resources = $resources | append (resources.Get "css/print.css" | resources.ExecuteAsTemplate "print.css" .) -}} {{ $resources = $resources | append (resources.Get "css/print.css" | resources.ExecuteAsTemplate "print.css" .) -}}
{{- $css := $resources | resources.Concat "css/style.css" | minify -}} {{- $css := $resources | resources.Concat "css/style.css" | minify -}}
<style>{{ $css.Content | safeCSS }}</style> <style>{{ $css.Content | safeCSS }}</style>
{{ hugo.Generator }} <meta name="robots" content="noindex,nofollow" />
<title>{{ .Title }}</title>
{{ if not (in site.BaseURL ".onion") -}}
{{ $icon_svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" }}
{{- printf `<link rel="icon" sizes="any" href="%s" type="image/svg+xml" />` $icon_svg.RelPermalink | safeHTML }}
{{- end }}
{{ $icon_192 := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "md5" }}
{{- printf `<link rel="icon" sizes="192x192" href="%s" type="image/png" />` $icon_192.RelPermalink | safeHTML -}}
<meta name="color-scheme" content="light dark" />
<meta name="theme-color" content="#191919" media="(prefers-color-scheme:dark)" />
<meta name="theme-color" content="#fff" media="(prefers-color-scheme:light)" />
</head> </head>
<body> <body>
<header> <header>

View file

@ -2,13 +2,35 @@
{{- if .IsHome }} {{- if .IsHome }}
{{- $pages = where .Site.RegularPages "Section" "" -}} {{- $pages = where .Site.RegularPages "Section" "" -}}
{{ end -}} {{ 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" -}}
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ .Site.LanguageCode }}"> <feed
xmlns="http://www.w3.org/2005/Atom"
xmlns:activity="http://activitystrea.ms/spec/1.0/"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:ostatus="http://ostatus.org/schema/1.0"
xmlns:poco="http://portablecontacts.net/spec/1.0"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:thr="http://purl.org/syndication/thread/1.0"
xml:lang="{{ .Site.LanguageCode }}">
<title>{{ .Section | humanize}} on {{ .Site.Title }}</title> <title>{{ .Section | humanize}} on {{ .Site.Title }}</title>
<link rel="self" type="application/atom+xml" href="{{ .Permalink }}atom.xml" /> <link rel="self" type="application/atom+xml" href="{{ .Permalink }}atom.xml" />
<logo>{{ $icon_png.Permalink }}</logo>
<icon>{{ .Site.Params.icon | absURL }}</icon> <icon>{{ .Site.Params.icon | absURL }}</icon>
<subtitle>{{ .Params.Description }}</subtitle> <subtitle>{{ .Params.Description }}</subtitle>
<sy:updatePeriod>{{ $period }}</sy:updatePeriod>
<sy:updateFrequency>2</sy:updateFrequency>
<author> <author>
<activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
<poco:preferredUsername>Seirdy</poco:preferredUsername>
<poco:displayName>Seirdy</poco:displayName>
<name>Rohan Kumar</name> <name>Rohan Kumar</name>
<uri>https://seirdy.one/</uri> <uri>https://seirdy.one/</uri>
</author> </author>
@ -16,8 +38,8 @@
<id>{{ .Permalink }}</id> <id>{{ .Permalink }}</id>
{{ range $pages }} {{ range $pages }}
<entry> <entry>
<title type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">{{ .Title | safeHTML }}</div></title> <title>{{ .Title }}</title>
<link href="{{ .Permalink }}" /> <link rel="alternate" type="text/html" href="{{ .Permalink }}" />
<published>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published> <published>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published>
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated> <updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
<author> <author>
@ -26,18 +48,22 @@
</author> </author>
<id>{{ .Permalink }}</id> <id>{{ .Permalink }}</id>
<rights>CC-BY-SA 4.0 by Rohan Kumar</rights> <rights>CC-BY-SA 4.0 by Rohan Kumar</rights>
{{- with .Params.replyURI }}
<thr:in-reply-to ref="{{ . }}" href="{{ . }}" />
{{- end -}}
{{- with .Params.replyAuthorURI }}
<link rel="mentioned" ostatus:object-type="http://activitystrea.ms/schema/1.0/person" href="{{ . }}"/>
{{- end -}}
<content type="xhtml" xml:base="{{ .Permalink }}"> <content type="xhtml" xml:base="{{ .Permalink }}">
<div xmlns="http://www.w3.org/1999/xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">
{{- 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 }} {{ partial "processed-content.html" . | replaceRE `(?: )?(?:item(type|scope|prop|id|ref)="[^"]*"|class="language-figure")` "" | safeHTML }}
</div> </div>
</content> </content>
<object-type xmlns="http://activitystrea.ms/spec/1.0/"> <activity:object-type>http://activitystrea.ms/schema/1.0/{{ $type }}</activity:object-type>
{{- if eq .Section "notes" -}} <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
note
{{- else if eq .Section "posts" -}}
article
{{- end -}}
</object-type>
</entry> </entry>
{{ end }} {{ end }}
</feed> </feed>

View file

@ -2,7 +2,7 @@
<main itemprop="mainEntity" class="h-feed hfeed" itemscope="" itemtype="https://schema.org/DataFeed"> <main itemprop="mainEntity" class="h-feed hfeed" itemscope="" itemtype="https://schema.org/DataFeed">
<h1 class="p-name" itemprop="name headline" id="notes">Notes</h1> <h1 class="p-name" itemprop="name headline" id="notes">Notes</h1>
<p>This is my microblog. These are my short informal entries, sorted by date (newest first). For longer entries, <a href="../posts/">see my blog</a>.</p> <p>This is my microblog. These are my short informal entries, sorted by date (newest first). For longer entries, <a href="../posts/">see my blog</a>.</p>
<p>An <a href="./atom.xml">Atom</a> and <a href="./index.xml">RSS</a> feed is availabe, containing the full text of all my notes.</p> <p>An <a href="./atom.xml">Atom</a> feed is availabe, containing the full text of all my notes. A legacy <a href="./index.xml">RSS</a> feed also exists.</p>
<p role="doc-tip"> <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> 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>
</p> </p>
@ -21,7 +21,12 @@
{{- if gt (sub .Lastmod.Unix .Date.Unix) 3600 -}} {{- if gt (sub .Lastmod.Unix .Date.Unix) 3600 -}}
, updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02 15:04:05" }}</time> , updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02 15:04:05" }}</time>
{{- end }} {{- end }}
<div class="e-content entry-content" itemprop="articleBody">{{ partial "processed-content.html" . }}</div> <div class="e-content entry-content" itemprop="articleBody">
{{- if .Params.replyURI -}}
{{- partial "reply-context" .Params -}}
{{- end -}}
{{ partial "processed-content.html" . }}
</div>
</article> </article>
</li> </li>
{{- end }} {{- end }}

View file

@ -11,13 +11,26 @@
{{- $pages = $pages | first $limit -}} {{- $pages = $pages | first $limit -}}
{{- end -}} {{- end -}}
{{- $currentSection := .Section -}} {{- $currentSection := .Section -}}
{{- $type := "article" -}}
{{- $period := "daily" -}}
{{- $mins := "1440" -}}
{{- if eq .Section "notes" -}}
{{- $type = "note" -}}
{{- $period = "hourly" -}}
{{- $mins = "60" -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} {{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <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> <channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title> <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<ttl>1440</ttl> <ttl>{{ $mins }}</ttl>
<sy:updatePeriod>{{ $period }}</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }} <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}

View file

@ -1,6 +1,6 @@
<footer> <footer>
<p> <p>
Copyright<span aria-hidden="true"> ©</span> <time itemprop="copyrightYear" datetime="{{now.Year}}">{{now.Year}}</time> {{- partial "indieweb-author.html" -}} Copyright <time itemprop="copyrightYear" datetime="{{now.Year}}">{{now.Year}}</time> {{ partial "indieweb-author.html" -}}
</p> </p>
{{ partial "search.html" }} {{ partial "search.html" }}
<nav aria-label="site info"> <nav aria-label="site info">

View file

@ -9,6 +9,9 @@
<div class="e-content entry-content" itemprop="articleBody"> <div class="e-content entry-content" itemprop="articleBody">
<meta itemprop="author" content="Rohan Kumar" /> <meta itemprop="author" content="Rohan Kumar" />
<!--That was needed bc some reading modes get confused by other authors referenced in the text--> <!--That was needed bc some reading modes get confused by other authors referenced in the text-->
{{- if .Params.replyURI -}}
{{- partial "reply-context" .Params -}}
{{- end -}}
{{- partial "processed-content" . -}} {{- partial "processed-content" . -}}
</div> </div>
</article> </article>

View file

@ -1,7 +1,18 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }} {{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
<meta name="disabled-adaptations" content="watch" /><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <meta name="disabled-adaptations" content="watch" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<!-- inline CSS; remember to allow it with a hash in the CSP -->
{{- $resources := slice -}}
{{- $resources = $resources | append (resources.Get "/css/main.css") -}}
{{ $dark := .Site.Params.dark | default "auto" -}}
{{- if not (eq $dark "off") -}}
{{ $resources = $resources | append (resources.Get "css/dark.css" | resources.ExecuteAsTemplate "dark.css" .) -}}
{{- end -}}
{{ $resources = $resources | append (resources.Get "css/print.css" | resources.ExecuteAsTemplate "print.css" .) -}}
{{- $css := $resources | resources.Concat "css/style.css" | minify -}}
<style>{{ $css.Content | safeCSS }}</style>
{{ if or (eq site.BaseURL site.Params.CanonicalBaseURL) (in site.BaseURL "wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion") -}} {{ if or (eq site.BaseURL site.Params.CanonicalBaseURL) (in site.BaseURL "wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion") -}}
<meta name="robots" content="index,follow,max-image-preview:large,max-snippet=-1" /> <meta name="robots" content="index,follow,max-image-preview:large,max-snippet=-1" />
{{ end -}} {{ end -}}
@ -44,18 +55,8 @@
{{- printf `<link rel="icon" sizes="192x192" href="%s" type="image/png" />` $icon_192.RelPermalink | safeHTML -}} {{- printf `<link rel="icon" sizes="192x192" href="%s" type="image/png" />` $icon_192.RelPermalink | safeHTML -}}
<meta name="color-scheme" content="light dark" /> <meta name="color-scheme" content="light dark" />
<meta name="format-detection" content="telephone=no" /><!-- Why does apple do this --> <meta name="format-detection" content="telephone=no" /><!-- Why does apple do this -->
<meta name="theme-color" content="#111" media="(prefers-color-scheme:dark)" /> <meta name="theme-color" content="#191919" media="(prefers-color-scheme:dark)" />
<meta name="theme-color" content="#fff" media="(prefers-color-scheme:light)" /> <meta name="theme-color" content="#fff" media="(prefers-color-scheme:light)" />
<!-- inline CSS; remember to allow it with a hash in the CSP -->
{{- $resources := slice -}}
{{- $resources = $resources | append (resources.Get "/css/main.css") -}}
{{ $dark := .Site.Params.dark | default "auto" -}}
{{- if not (eq $dark "off") -}}
{{ $resources = $resources | append (resources.Get "css/dark.css" | resources.ExecuteAsTemplate "dark.css" .) -}}
{{- end -}}
{{ $resources = $resources | append (resources.Get "css/print.css" | resources.ExecuteAsTemplate "print.css" .) -}}
{{- $css := $resources | resources.Concat "css/style.css" | minify -}}
<style>{{ $css.Content | safeCSS }}</style>
<meta property="og:title" content="{{ .Title }}" /> <meta property="og:title" content="{{ .Title }}" />
<meta property="og:site_name" content="{{ $.Site.Title }}" /> <meta property="og:site_name" content="{{ $.Site.Title }}" />
{{- if not (or (ne "page" .Kind) (eq $canonicalRelPermalink "/bookmarks/") (eq $canonicalRelPermalink "/posts/")) }} {{- if not (or (ne "page" .Kind) (eq $canonicalRelPermalink "/bookmarks/") (eq $canonicalRelPermalink "/posts/")) }}

View file

@ -8,7 +8,7 @@
{{- else -}} {{- else -}}
{{- $logURL = $logURL | strings.ReplaceRE `\.md` `.gmi` -}} {{- $logURL = $logURL | strings.ReplaceRE `\.md` `.gmi` -}}
{{- end -}} {{- end -}}
{{- $action }} <time{{ if not (.Params.evergreen) }} itemprop="dateCreated datePublished" class="dt-published published"{{ end }} datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time> by {{- partial "indieweb-author.html" -}} on his <a rel="canonical" itemprop="mainEntityOfPage url" class="u-url url" href="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">Website</a>{{- with .OutputFormats.Get "gemtext" -}}{{- printf " " -}}and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>{{- end -}}. {{- $action }} <time{{ if not (.Params.evergreen) }} itemprop="dateCreated datePublished" class="dt-published published"{{ end }} datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time> by {{ partial "indieweb-author.html" -}} on his <a rel="canonical" itemprop="mainEntityOfPage url" class="u-url url" href="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">Website</a>{{- with .OutputFormats.Get "gemtext" -}}{{- printf " " -}}and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>{{- end -}}.
{{- if gt (sub .Lastmod.Unix .Date.Unix) 900 -}} {{- if gt (sub .Lastmod.Unix .Date.Unix) 900 -}}
<br /> <br />
Last updated <time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>. <a href="{{ $logURL }}">Changelog</a>. Last updated <time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>. <a href="{{ $logURL }}">Changelog</a>.

View file

@ -6,7 +6,7 @@
<main itemprop="mainEntity" class="h-feed hfeed" itemscope="" itemtype="https://schema.org/CompleteDataFeed"> <main itemprop="mainEntity" class="h-feed hfeed" itemscope="" itemtype="https://schema.org/CompleteDataFeed">
<h1 class="p-name" itemprop="name headline" id="posts">Posts</h1> <h1 class="p-name" itemprop="name headline" id="posts">Posts</h1>
<p>These are all of my posts, sorted by date (newest first).</p> <p>These are all of my posts, sorted by date (newest first).</p>
<p>An <a href="./atom.xml">Atom</a> and <a href="./index.xml">RSS</a> feed is availabe, containing the full text of all my posts.</p> <p>An <a href="./atom.xml">Atom</a> feed is availabe, containing the full text of all my posts. A legacy <a href="./index.xml">RSS</a> feed also exists.</p>
{{- else -}} {{- else -}}
<section class="h-feed hfeed" itemprop="hasPart" itemscope="" itemtype="https://schema.org/DataFeed"> <section class="h-feed hfeed" itemprop="hasPart" itemscope="" itemtype="https://schema.org/DataFeed">
<h2 class="p-name" itemprop="name" id="posts">Posts</h2> <h2 class="p-name" itemprop="name" id="posts">Posts</h2>

View file

@ -50,4 +50,9 @@
{{- $endNotesNotFocusable := `<li id="fn:([0-9]*)">` -}} {{- $endNotesNotFocusable := `<li id="fn:([0-9]*)">` -}}
{{- $endNotesFocusable := `<li id="fn:${1}" tabindex="-1">` -}} {{- $endNotesFocusable := `<li id="fn:${1}" tabindex="-1">` -}}
{{- .Content | replaceRE $referencesWithoutHeading $referencesWithHeading | replaceRE $badNoteRef $goodNoteRef | replaceRE $endnotesClosingDiv $endnotesClosingSection | replaceRE $tocHeadingOutside $tocHeadingInside | replaceRE $footnoteBacklinksBad $footnoteBacklinksGood | replaceRE $repeatedFootnoteBacklinksBad $repeatedFootnoteBacklinksGood | replaceRE $endNotesNotFocusable $endNotesFocusable | replaceRE `\&rsquo;` `` | replaceRE `\&nbsp;` `\&#160;` | replaceRE `\&ldquo;` `“` | replaceRE `\&rdquo;` `”` | replaceRE `\&hellip;` `—` | replaceRE `\&mdash;` `—` | replaceRE `\&shy;` `\&#173;` | replaceRE `&lsquo;` ``| safeHTML -}}
<!--Since language-figure doesn't seem to work for some reason just use regex to replace it-->
{{- $extraLanguageFigure := `<pre><code class="language-figure">` -}}
{{- $replacedLanguageFigure := `<pre tabindex="0"><code translate="no" itemprop="text">` -}}
{{- .Content | replaceRE $referencesWithoutHeading $referencesWithHeading | replaceRE $badNoteRef $goodNoteRef | replaceRE $endnotesClosingDiv $endnotesClosingSection | replaceRE $tocHeadingOutside $tocHeadingInside | replaceRE $footnoteBacklinksBad $footnoteBacklinksGood | replaceRE $repeatedFootnoteBacklinksBad $repeatedFootnoteBacklinksGood | replaceRE $endNotesNotFocusable $endNotesFocusable | replaceRE $extraLanguageFigure $replacedLanguageFigure | replaceRE `\&rsquo;` `` | replaceRE `\&nbsp;` `&#160;` | replaceRE `\&ldquo;` `“` | replaceRE `\&rdquo;` `”` | replaceRE `\&hellip;` `—` | replaceRE `\&mdash;` `—` | replaceRE `\&shy;` `&#173;` | replaceRE `&lsquo;` ``| safeHTML -}}

View file

@ -0,0 +1,15 @@
{{- $schemaType := "SocialMediaPosting" -}}
{{- with .replyType -}}
{{- $schemaType = . -}}
{{- end -}}
<aside role="note">
Reply to <span class="h-cite in-reply-to" itemprop="about" itemscope="" itemtype="https://schema.org/{{ $schemaType }}">
<cite itemprop="name" class="p-name">
<a class="u-url" itemprop="url" href="{{ .replyURI }}">{{ .replyTitle | safeHTML}}</a>
</cite> by
<span itemprop="author" itemscope="" itemtype="https://schema.org/Person" class="h-card vcard p-author">
<a itemprop="url" href="{{ .replyAuthorURI }}" class="u-url url">
<span itemprop="name" class="p-name fn n">{{ .replyAuthor }}</span></a>
</span>
</span>
</aside>

View file

@ -8,5 +8,5 @@
just use the beginning for the label and the full thing for the aria description. just use the beginning for the label and the full thing for the aria description.
--> -->
<figure aria-labelledby="{{ $id }}" itemprop="hasPart" itemscope="" itemtype="https://schema.org/SoftwareSourceCode"> <figure aria-labelledby="{{ $id }}" itemprop="hasPart" itemscope="" itemtype="https://schema.org/SoftwareSourceCode">
{{ .Inner | markdownify -}} {{ .Inner | .Page.RenderString -}}
</figure> </figure>

View file

@ -24,6 +24,5 @@
<a itemprop="url" href="https://seirdy.one/" rel="author me home cc:attributionURL" class="u-url u-uid url" property="cc:attributionName"> <a itemprop="url" href="https://seirdy.one/" rel="author me home cc:attributionURL" class="u-url u-uid url" property="cc:attributionName">
{{ partial "indieweb-icon.html" -}} {{ partial "indieweb-icon.html" -}}
<span itemprop="name" class="p-name fn n"> <span itemprop="name" class="p-name fn n">
<span itemprop="givenName" class="p-given-name given-name">Rohan</span> <span itemprop="givenName" class="p-given-name given-name">Rohan</span>&#160;<span itemprop="familyName" class="p-family-name family-name">Kumar</span></span></a>
<span itemprop="familyName" class="p-family-name family-name">Kumar</span></span></a>
</span> </span>

View file

@ -15,4 +15,4 @@
) )
) | not ) | not
) )
) ) | del(..|select(. == [])) | del(..|select(. == {})) | select(. != null)

View file

@ -10,7 +10,7 @@ set -e -u
output_dir="$1" output_dir="$1"
format="$2" format="$2"
alias find_compressible='find "$output_dir" -type f \( -name "*.html" -o -name "*.xml" -o -name "*.webmanifest" -o -name "*.*.svg" \)' alias find_compressible='find "$output_dir" -type f \( -name "*.html" -o -name "*.xhtml" -o -name "*.xml" -o -name "*.webmanifest" -o -name "*.*.svg" \)'
if [ "$format" = "gzip" ]; then if [ "$format" = "gzip" ]; then
compress_level="$3" compress_level="$3"

13
scripts/filter-vnu.sh Normal file
View file

@ -0,0 +1,13 @@
#!/bin/sh
# filters the Nu HTML Validator's JSON output. Operates on stdin.
set -e -u
root_dir="$(dirname "$0")/.."
vnu_output="$(jq --from-file "$root_dir/linter-configs/vnu_filter.jq")"
if [ "$vnu_output" = '' ]; then
echo "All markup is valid"
else
echo "Markup errors found!" 1>&2
echo "$vnu_output"
exit 1
fi

View file

@ -0,0 +1,42 @@
#!/bin/sh
# copies an .html file to an equivalent .xhtml file, but replaces
# the meta charset with an XML declaration for compatibility with some
# XML tooling.
# Expects polygot XHTML(5) markup.
# Formats both the .html and .xhtml file.
# this means that every index.html file has an equivalent index.xhtml file.
# content negotiation allows an agent to pick html or xhtml.
# use xmllint to do the formatting.
# xmllint ruins inline CSS so delete the inline CSS and re-insert it.
# xmllint also adds extra whitespace around <pre><code> which we remove
# with "sd". I chose sd since it handles newlines well.
set -e -u
export html_file="$1"
export tmp_file="$html_file.tmp"
export xhtml_file=${html_file%*.html}.xhtml
cleanup() {
rm -f "$tmp_file"
}
trap cleanup EXIT
trap cleanup EXIT
sed 7d "$html_file" | xmllint --format --encode UTF-8 --noent - -o "$tmp_file"
{
head -n7 "$tmp_file"
cat tmp.css
tail -n +8 "$tmp_file" \
| sd '<pre(?: tabindex="0")?>\n\t*<code ' '<pre tabindex="0"><code ' \
| sd '(?:\n)?</code>\n(?:[\t\s]*)?</pre>' '</code></pre>' \
| sd '</span>.span itemprop="familyName"' '</span> <span itemprop="familyName"'
} >>"$xhtml_file"
# replace the html file with the formatted xhtml5 file, excluding the xml declaration
tail -n +2 "$xhtml_file" > "$html_file"
# remove the redundant charset declaration from the xhtml file. It's the
# first thing in the <head>
sed -i 5d "$xhtml_file" # busybox sed supports "-i"

View file

@ -1,11 +1,19 @@
#!/bin/sh #!/bin/sh
# takes an arg for the output dir. # takes an arg for the output dir.
# copies every .html file to an equivalent .xhtml file, but replaces # Runs xhtmlize-single-file.sh on every single html file in the output dir.
# the meta charset with an XML declaration for compatibility with some
# XML tooling.
# this means that every index.html file has an equivalent index.xhtml file.
# content negotiation allows an agent to pick html or xhtml.
find "$1" -type f -name '*.html' \ set -e -u
-exec sh -c 'echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" >"${0%*.html}.xhtml" && xmlfmt -i " " -f "$0" | busybox sed -e :a -e "/./,\$!d;/^\n*\$/{\$d;N;};/\n\$/ba" | sd -f m "\n(?:\t*)?</" "</" | sd -f m "<pre>\n\t*<code" "<pre><code" | sd -f m "\(\n\t*<abbr" "(<abbr" | pee "sed 5d >>\"${0%*.html}.xhtml\"" "sponge \"$0\""' {} \;
output_dir="$1"
script_dir="$(dirname "$0")"
printf '\t\t<style>%s</style>\n' "$(htmlq -t style <"$output_dir/index.html")" >tmp.css
cleanup() {
rm -f "tmp.css"
}
trap cleanup EXIT
export XMLLINT_INDENT=' '
find "$output_dir" -type f -name '*.html' \
-exec sh "$script_dir/xhtmlize-single-file.sh" {} \;
# done # done