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

Fix relative URLs

- No relative URLs in the RSS feed except plain anchor links
- Eliminate the need for excessive "../" in URLs.
This commit is contained in:
Rohan Kumar 2021-06-14 15:31:08 -07:00
parent eee23d1574
commit 204600fae3
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
5 changed files with 18 additions and 6 deletions

View file

@ -16,7 +16,7 @@ Following the drama, I'm putting together a multi-part guide on how to leverage
I'll update this post as I add articles to the series. At the moment, I've planned to write the following articles: I'll update this post as I add articles to the series. At the moment, I've planned to write the following articles:
1. [Hydra Hosting](../../../2020/11/18/git-workflow-1.html): repository hosting. 1. [Hydra Hosting](/2020/11/18/git-workflow-1.html): repository hosting.
2. Community feedback (issues, support, etc.) 2. Community feedback (issues, support, etc.)
3. Community contributions (patches) 3. Community contributions (patches)
4. CI/CD 4. CI/CD
@ -45,5 +45,5 @@ Q: I'm not interested in trying anything new, no matter what the benefits are.
A: First of all, that wasn't a question. Second, this series isn't for you. You should not read this. I recommend doing literally anything else. A: First of all, that wasn't a question. Second, this series isn't for you. You should not read this. I recommend doing literally anything else.
Next: Resilient Git, Part 1: [Hydra Hosting](../../../2020/11/18/git-workflow-1.html) Next: Resilient Git, Part 1: [Hydra Hosting](/2020/11/18/git-workflow-1.html)

View file

@ -14,7 +14,7 @@ title: Keeping platforms open
--- ---
This article is the second entry of series of posts exploring situations in which <abbr title="free, libre, and open-source software">FLOSS</abbr> alone isn't enough to secure user freedom. This article is the second entry of series of posts exploring situations in which <abbr title="free, libre, and open-source software">FLOSS</abbr> alone isn't enough to secure user freedom.
My previous article, [Whatsapp and the domestication of users](../../../2021/01/27/whatsapp-and-the-domestication-of-users.html), got more attention than I was expecting. Some responses gave me a lot to think about,[^1] especially regarding _actions_ we can take. I suggest reading that article first; it explained what "user domestication" is and why it's a problem. It enumerated three countermeasures: FLOSS, simplicity, and open platforms. My previous article, [Whatsapp and the domestication of users](/2021/01/27/whatsapp-and-the-domestication-of-users.html), got more attention than I was expecting. Some responses gave me a lot to think about,[^1] especially regarding _actions_ we can take. I suggest reading that article first; it explained what "user domestication" is and why it's a problem. It enumerated three countermeasures: FLOSS, simplicity, and open platforms.
Hard problems, by definition, lack easy solutions. Simply choosing (or creating) a platform that avoids user domestication isn't enough if that platform can change. The price of freedom is eternal vigilance; in addition to settling on the right platform, we must ensure that it honors its users in both the present _and the future_. Keeping a platform FLOSS and simple is more straightforward[^2] than keeping a platform "open". Hard problems, by definition, lack easy solutions. Simply choosing (or creating) a platform that avoids user domestication isn't enough if that platform can change. The price of freedom is eternal vigilance; in addition to settling on the right platform, we must ensure that it honors its users in both the present _and the future_. Keeping a platform FLOSS and simple is more straightforward[^2] than keeping a platform "open".

View file

@ -13,7 +13,7 @@ footnote_heading: References and endnotes
--- ---
This is a tale of the intersection between thermal physics, cosmology, and a tiny amount of computer science to answer a seemingly innocuous question: "How strong does a password need to be for it to be physically impossible to brute-force, ever?" This is a tale of the intersection between thermal physics, cosmology, and a tiny amount of computer science to answer a seemingly innocuous question: "How strong does a password need to be for it to be physically impossible to brute-force, ever?"
[TLDR]({{<ref "#conclusiontldr" >}}) at the bottom. [TLDR](#conclusiontldr) at the bottom.
_Note: this post contains equations. Since none of the equations were long or complex, I decided to just write them out in code blocks instead of using images or MathML the way Wikipedia does._ _Note: this post contains equations. Since none of the equations were long or complex, I decided to just write them out in code blocks instead of using images or MathML the way Wikipedia does._
@ -41,7 +41,7 @@ How strong should your password be for it to be safe from a brute-force attack b
### Quantifying password strength. ### Quantifying password strength.
_A previous version of this section wasn't clear and accurate. I've since removed the offending bits and added a clarification about salting/hashing to the [Caveats and estimates]({{<ref "#caveats-and-estimates" >}}) section._ _A previous version of this section wasn't clear and accurate. I've since removed the offending bits and added a clarification about salting/hashing to the [Caveats and estimates](#caveats-and-estimates) section._
A good measure of password strength is **entropy bits.** The entropy bits in a password is a base-2 logarithm of the number of guesses required to brute-force it.[^1] A good measure of password strength is **entropy bits.** The entropy bits in a password is a base-2 logarithm of the number of guesses required to brute-force it.[^1]

View file

@ -0,0 +1,12 @@
{{- $parsedDest := urls.Parse (.Destination | absURL) -}}
{{- if (strings.HasPrefix .Destination "#") -}}<!-- if it's a fragment -->
<a href="{{ .Destination }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a>
{{- else if not (strings.HasPrefix .Destination $parsedDest.Scheme) -}}<!-- if it's a relative url -->
{{- $baseURL := trim .Page.Site.BaseURL "/" -}}
{{- $fragment := "" -}}
{{- with $parsedDest.Fragment -}}{{- $fragment = printf "#%s" . -}}{{- end -}}
{{- $href := printf "%s%s%s" $baseURL $parsedDest.Path $fragment | absURL -}}
<a href="{{ $href }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a>
{{- else -}}
<a href="{{ .Destination }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a>
{{- end -}}

View file

@ -24,7 +24,7 @@
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }} {{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }} {{ end }}
{{ range where .Site.Pages "Kind" "page" }} {{ range where .Site.Pages "Kind" "page" }}
{{ if or (eq .Section "posts") (eq .Section "post") }} {{ if or (eq .Section "posts") (eq .Section "post") }}