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

Compare commits

..

No commits in common. "3e3fda3ca29cff041cf02ca2cc0b64d3ea4a74d6" and "d8eae6f0572630d39c3c4f03cbb8c0896d451a6f" have entirely different histories.

13 changed files with 92 additions and 139 deletions

View file

@ -1,13 +1,13 @@
---
# we rsync binaries.tar.gz from the same server we deploy to.
# it contains these static-pie binaries:
# hugo, brotli, ect (like gzip/zopfli), and xmllint.
# hugo, brotli, ect (like gzip/zopfli), sd, htmlq (like jq for html), and xmllint.
image: alpine/edge
packages:
- curl # Fetches webmentions and webring links. Pre-inistalled.
- curl # for webring update script, pre-installed on builds.sr.ht images
- rsync
- git # Powers Hugo's gitInfo. Pre-installed
- bmake # gmake is fine too
- git # for Hugo's gitInfo, pre-installed on builds.sr.ht images
- bmake
sources:
- https://git.sr.ht/~seirdy/seirdy.one
secrets:
@ -19,8 +19,14 @@ triggers:
to: seirdy@seirdy.one
tasks:
- deps: |
sh seirdy.one/scripts/setup-ci.sh
printf "VerifyHostKeyDNS=yes\nKexAlgorithms=sntrup761x25519-sha512@openssh.com\n" >> ~/.ssh/config
# mirrored at https://seirdy.one/misc/binaries.tar.gz
rsync -Wv deploy@seirdy.one:/var/www/pb/binaries.tar.gz .
mkdir -p ~/bin
tar xzf binaries.tar.gz -oC ~/bin
- build_deploy: |
export PATH=~/bin:$PATH
cd seirdy.one
bmake ci
export PATH=~/bin:$PATH
# quick health + ip check
sh scripts/connectivity-check.sh
bmake deploy-prod deploy-onion

View file

@ -163,12 +163,6 @@ deploy-onion:
@$(MAKE) WWW_ROOT=/var/www/seirdy.onion HUGO_BASEURL='http://wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion/' OUTPUT_DIR=public_onion copy-to-xhtml
@$(MAKE) WWW_ROOT=/var/www/seirdy.onion HUGO_BASEURL='http://wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion/' OUTPUT_DIR=public_onion deploy-html
# in CI, check connectivity and then build + deploy the clearnet and onion sites.
.PHONY: ci
ci:
sh scripts/connectivity-check.sh
@$(MAKE) deploy-prod deploy-onion
# we only deploy html to the staging site
.PHONY: deploy-staging
deploy-staging:

View file

@ -6,7 +6,74 @@ Code for my personal website, [seirdy.one](https://seirdy.one). Built with Hugo.
Also builds my Gemini capsule: <gemini://seirdy.one/>.
My website features more documentation on:
I document [my site design standards](https://seirdy.one/meta/site-design/) on my website.
## Repository mirroring
This repository is pushed to the following forges:
- [Sourcehut](https://sr.ht/~seirdy/seirdy.one/)
- [GitLab.com](https://gitlab.com/Seirdy/seirdy.one)
- [GitHub](https://github.com/Seirdy/seirdy.one)
- [Codeberg (forgejo)](https://codeberg.org/Seirdy/seirdy.one)
- [envs.net (gitea)](https://git.envs.net/Seirdy/seirdy.one)
## Dependencies
### Build-time dependencies
- Hugo. I usually use the most recent version of Hugo at the time of publishing, but it _should_ work with any version of Hugo v0.116.0 or later (v0.116.0 had an improvement to `where` that I might use).
- bmake or GNU Make. OpenBSD make (omake) should work too, but I haven't tested it.
- Git (Hugo uses Git info for features like date last updated)
- curl, for fetching some webring code and all my webmentions. **this requires authentication.** When running locally, it invokes `pash`, my password manager; when running in CI, it reads a file for a secret. You may have to modify `scripts/get-webmentions.sh` to avoid this.
- POSIX utilities: `grep`, `find`, `sed`, POSIX-compliant `/bin/sh`, etc. Tested to work with Busybox and GNU Coreutils.
Before deploying, I use some tools for post-processing:
- `xmllint`, part of libxml2, to format the generated polygot XHTML5 markup.
- a [patched version of html-tidy](https://git.sr.ht/~seirdy/tidy-html5)
- More POSIX utilities.
I also apply static compression at max levels, using the following tools:
- [Efficient Compression Tool](https://github.com/fhanau/Efficient-Compression-Tool) It's like zopfli but more efficient and faster. If you don't have it installed, it should be trivial to edit `scripts/compress.sh` to replace `ect` with `gzip` or `zopfli`.
- Brotli
I package all build-time dependencies _except_ curl as statically-linked binaries in a tarball, available at <https://seirdy.one/pb/binaries.tar.gz>.
### Other dependencies
To deploy, I use rsync with SSH and zstd support.
Further tasks also use additional command-line utilities such as `sd`, `htmlq`, and a version of `xargs` that supports the `-P` flag (nearly all versions of `xargs` do, but it's not POSIX). I run all npm packages using `pnpm -s dlx` (similar to `npx`).
To lint:
- Stylelint
- [html-validate](https://html-validate.org/)
- A very recent build of the W3C's [Nu HTML checker](https://github.com/validator/validator) to validate the HTML and XHTML, available on your `$PATH` as `vnu`. I have a very simple shell-script wrapper for this that invokes `java -jar`.
- [jq](https://stedolan.github.io/jq/), to filter false-positives from the Nu HTML checker and to verify that JSON files parse.
- [HTMLProofer](https://github.com/gjtorikian/html-proofer), version 5 or later. Requires Ruby.
More in-depth local tests:
- Axe-Core, using the CLI and a headless browser (Firefox or Chromium).
- IBM Equal Access Checker, using the CLI and a headless Chromium. Runs on a patched version of the site with a modified stylesheet due to a bug (reported upstream).
Remote tests:
- Lighthouse
- WebHint (might not pass; only informative)
- Feed validator (requires Python)
## Build instructions
- To just build the HTML: `make hugo`
- To build the polygot formatted HTML and XHTML: `make hugo xhtmlize`
- To lint and validate: `make hugo xhtmlize lint-local`
- To build everything and compress: `make hugo xhtmlize compress copy-to-xhtml`
- To deploy the clearnet site and corresponding Tor hidden service: `make deploy-prod deploy-onion`.
`lint-local` and deployment tasks support limited parallelization with `-j`.
- [build instructions](https://seirdy.one/meta/build-this-site/)
- [site design standards](https://seirdy.one/meta/site-design/)

View file

@ -318,8 +318,7 @@ html {
/* The nav has to be distant-enough from the top to make room for a
* skip-link. The breadcrumbs also can't have their focus-outlines
* overflow while CSS containment is enabled. */
header > nav,
nav[itemprop="breadcrumb"] {
header > nav {
padding: .75em 0 .25em;
}

View file

@ -1,99 +0,0 @@
---
outputs:
- html
title: How to build this site
description: "Instructions for re-building seirdy.one from its source code"
date: "2023-11-24T21:44:00-08:00"
---
Wanna steal this website? You're allowed to! Just remember that it's licensed under the CC-BY-SA (for content) and ISC (for code) licenses.
Once you put a few binaries in your `$PATH`, building is just a `make` invocation away.
## Repository mirroring
I push the seirdy.one source code to the following forges:
- [Sourcehut](https://sr.ht/~seirdy/seirdy.one/)
- [GitLab.com](https://gitlab.com/Seirdy/seirdy.one)
- [GitHub](https://github.com/Seirdy/seirdy.one)
- [Codeberg (forgejo)](https://codeberg.org/Seirdy/seirdy.one)
- [envs.net (gitea)](https://git.envs.net/Seirdy/seirdy.one)
Clone the repository from any of those locations.
## Dependencies
### Build-time dependencies
- Hugo. I usually use the most recent version of Hugo at the time of publishing, but it _should_ work with any version of Hugo v0.116.0 or later (v0.116.0 had an improvement to `where` that I might use). I build Hugo with the `nodeploy` build-tag for a smaller binary and faster build-times.
- A `make` implementation. This site works with bmake (from NetBSD and FreeBSD) and GNU Make 4 or later. OpenBSD make ("omake") should work too, but I haven't tested it.
- Git. Hugo uses Git for generating modification timestamps.
- curl, for fetching some webring code and all my webmentions. **Fetching Webmentions requires authentication.** When running locally, it invokes `pash`, my password manager; when running in CI, it reads a file for a secret. You may have to modify `scripts/get-webmentions.sh` to avoid this.
- POSIX utilities: `grep`, `find`, `sed`, POSIX-compliant `/bin/sh`, etc. Tested to work with Busybox and GNU Coreutils. Shell scripts run with Zsh, Busybox `sh`, and the Debian Almquist shell.
Before deploying, I use some tools for post-processing:
- `xmllint`, part of libxml2, to format the generated polygot XHTML5 markup.
- ~~a [patched version of html-tidy](https://git.sr.ht/~seirdy/tidy-html5)~~ (I no longer use HTML-Tidy due to [a major upstream bug requiring a non-trivial fix](https://github.com/htacg/tidy-html5/issues/1094)).
- More POSIX utilities.
I also apply static compression at max levels, using the following tools:
- [Efficient Compression Tool](https://github.com/fhanau/Efficient-Compression-Tool) (`ect`). It's like zopfli but more efficient and faster. If you don't have it installed, it should be trivial to edit `scripts/compress.sh` to replace `ect` with `gzip` or `zopfli`.
- Brotli.
I package `xmllint`, `hugo`, `brotli`, and `ect` as statically-linked binaries in a tarball. You can download this tarball from <https://seirdy.one/pb/binaries.tar.gz>. You'll need to install `make`, `git`, POSIX utilities, and `curl` yourself. These should be fairly ubiquitous; there's a good chance that you already have them.
### Other dependencies
To deploy, I use rsync with SSH and zstd support.
Other lints/checks I run also use additional command-line utilities such as `sd`, `htmlq`, and a version of `xargs` that supports the `-P` flag (nearly all versions of `xargs` do, but it's not POSIX). I run most npm packages using `pnpm -s dlx` (similar to `npx`).
#### Quick linters
- Stylelint
- [html-validate](https://html-validate.org/)
- A very recent build of the W3C's [Nu HTML checker](https://github.com/validator/validator) to validate the HTML and XHTML, available on your `$PATH` as `vnu`. I have a very simple shell-script wrapper for this that invokes `java -jar`.
- [jaq](https://github.com/01mf02/jaq), to filter false-positives from the Nu HTML checker and to verify that JSON files parse. You can replace `jaq` with `jq` without any issue.
- [HTMLProofer](https://github.com/gjtorikian/html-proofer), version 5 or later. Requires Ruby.
- W3C feed validator (requires Python)
#### Slow linters
- Axe-Core, using the CLI and a headless browser (Firefox or Chromium).
- IBM Equal Access Checker, using the CLI and a headless Chromium. Runs on a patched version of the site with all instances of `content-visibility` removed from the stylesheet. I do this to work around [a false-positive, reported upstream](https://github.com/IBMa/equal-access/issues/1008).
#### Testing the deployed site
- WebHint (normally runs on every page in my sitemap)
- Lighthouse
- redbot
## Build instructions
- To just build the HTML: `make hugo`
- To build the polygot formatted HTML and XHTML: `make hugo xhtmlize`
- To lint and validate: `make hugo xhtmlize lint-local`
- To build everything and compress: `make hugo xhtmlize compress copy-to-xhtml`
- To deploy the clearnet site and corresponding Tor hidden service: `make deploy-prod deploy-onion`.
`lint-local` and deployment tasks support limited parallelization with `-j`.

View file

@ -1,4 +1,4 @@
The standard fossbro interjection goes:
A specter is haunting the Linux community. Where lies productive discourse about operating systems, there also lies a danger. For the longer such discourse lasts, the greater the risk that the discourse shall be interrupted by The Interjection: an abomination brandished by a raging fossbro determined to contribute absolutely nothing to the discussion. The standard fossbro interjection begins:
> I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.

View file

@ -16,7 +16,7 @@ syndicatedCopies:
- title: 'Tildes'
url: 'https://tildes.net/~comp/13nx/the_limited_utility_of_the_phrase_gnu_linux'
---
The standard fossbro interjection goes:
A specter is haunting the Linux community. Where lies productive discourse about operating systems, there also lies a danger. For the longer such discourse lasts, the greater the risk that the discourse shall be interrupted by The Interjection: an abomination brandished by a raging fossbro determined to contribute absolutely nothing to the discussion. [The standard fossbro interjection](https://stallman-copypasta.github.io/) begins:
> I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.

View file

@ -2,7 +2,7 @@ name,prev,home,next,random
Indieweb,https://xn--sr8hvo.ws/%F0%9F%98%A9%F0%9F%9A%A3%F0%9F%8D%91/previous,https://xn--sr8hvo.ws/,https://xn--sr8hvo.ws/%F0%9F%98%A9%F0%9F%9A%A3%F0%9F%8D%91/next,null
a11y-webring,https://a11y-webring.club/prev,https://a11y-webring.club/,https://a11y-webring.club/next,https://a11y-webring.club/random
Retroweb,https://webri.ng/webring/retroweb/previous?index=3,https://indieseek.xyz/webring/,https://webri.ng/webring/retroweb/next?index=3,https://webri.ng/webring/retroweb/random
CSS,https://webri.ng/webring/cssjoy/previous?via=https://seirdy.one/,https://cs.sjoy.lol/,https://webri.ng/webring/cssjoy/next?via=https://seirdy.one/,https://webri.ng/webring/cssjoy/random/
CSS,https://webri.ng/webring/cssjoy/previous?via=https://seirdy.one/,https://cs.sjoy.lol/,https://webri.ng/webring/cssjoy/next?via=https://seirdy.one/,https://webri.ng/webring/cssjoy/random//seirdy.one/
TheOldNet,https://webring.theoldnet.com/member/ba438275f00f5df1a2e78e547424d05e/previous/navigate,https://webring.theoldnet.com/,https://webring.theoldnet.com/member/ba438275f00f5df1a2e78e547424d05e/next/navigate,https://webring.theoldnet.com/member/ba438275f00f5df1a2e78e547424d05e/random/navigate
geekring,https://geekring.net/site/167/previous,https://geekring.net/,https://geekring.net/site/167/next,https://geekring.net/site/167/random
Loop (JS),https://loop.graycot.dev/webring.html?action=prev,https://docs.graycot.dev/s/MFowZsw_F,https://loop.graycot.dev/webring.html?action=next,https://loop.graycot.dev/webring.html?action=rand

1 name prev home next random
2 Indieweb https://xn--sr8hvo.ws/%F0%9F%98%A9%F0%9F%9A%A3%F0%9F%8D%91/previous https://xn--sr8hvo.ws/ https://xn--sr8hvo.ws/%F0%9F%98%A9%F0%9F%9A%A3%F0%9F%8D%91/next null
3 a11y-webring https://a11y-webring.club/prev https://a11y-webring.club/ https://a11y-webring.club/next https://a11y-webring.club/random
4 Retroweb https://webri.ng/webring/retroweb/previous?index=3 https://indieseek.xyz/webring/ https://webri.ng/webring/retroweb/next?index=3 https://webri.ng/webring/retroweb/random
5 CSS https://webri.ng/webring/cssjoy/previous?via=https://seirdy.one/ https://cs.sjoy.lol/ https://webri.ng/webring/cssjoy/next?via=https://seirdy.one/ https://webri.ng/webring/cssjoy/random/ https://webri.ng/webring/cssjoy/random//seirdy.one/
6 TheOldNet https://webring.theoldnet.com/member/ba438275f00f5df1a2e78e547424d05e/previous/navigate https://webring.theoldnet.com/ https://webring.theoldnet.com/member/ba438275f00f5df1a2e78e547424d05e/next/navigate https://webring.theoldnet.com/member/ba438275f00f5df1a2e78e547424d05e/random/navigate
7 geekring https://geekring.net/site/167/previous https://geekring.net/ https://geekring.net/site/167/next https://geekring.net/site/167/random
8 Loop (JS) https://loop.graycot.dev/webring.html?action=prev https://docs.graycot.dev/s/MFowZsw_F https://loop.graycot.dev/webring.html?action=next https://loop.graycot.dev/webring.html?action=rand

View file

@ -37,7 +37,7 @@
<activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
<poco:preferredUsername>Seirdy</poco:preferredUsername>
<poco:displayName>Seirdy</poco:displayName>
<name>Seirdy</name>
<name>Rohan Kumar</name>
<uri>https://seirdy.one/</uri>
</author>
<updated>{{ now.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
@ -48,8 +48,8 @@
<title>{{ .Title }}</title>
<link rel="alternate" type="text/html" href="{{ .Permalink }}" /><id>{{ .Permalink }}</id>
<published>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published><updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
<author><name>Seirdy</name><uri>https://seirdy.one/</uri></author>
<rights>CC-BY-SA 4.0</rights>
<author><name>Rohan Kumar</name><uri>https://seirdy.one/</uri></author>
<rights>CC-BY-SA 4.0 by Rohan Kumar</rights>
{{- with .Params.replyURI -}}
<thr:in-reply-to ref="{{ . }}" href="{{ . }}" />
{{- end -}}

View file

@ -1,5 +1,6 @@
{{/* All pages are one or two clicks from the navbar. If two clicks, add a breadcrumb list. */}}
{{- if and (not .IsHome) (not .Parent.IsHome) -}}
<hr />
<nav aria-labelledby="bc-label"
itemscope="" itemprop="breadcrumb" itemtype="https://schema.org/BreadcrumbList">
<span id="bc-label">You are here:&#160;</span>
@ -7,7 +8,6 @@
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
</ol>
</nav>
<hr />
{{- end -}}
{{ define "breadcrumbnav" }}
{{ if .p1.Parent }}

View file

@ -1,6 +1,5 @@
<hr />
<footer>
{{ partial "breadcrumblist.html" . }}
<p>
Copyright <time itemprop="copyrightYear" datetime="{{now.Year}}">{{now.Year}}</time> {{ partial "indieweb-author.html" -}}
</p>

View file

@ -36,4 +36,5 @@
{{- end }}
</ul>
</nav>
{{ partial "breadcrumblist.html" . }}
</header>

View file

@ -1,14 +0,0 @@
#!/bin/sh
# For CI: configures SSH and installs binaries that I use to build my site.
# The binaries are statically-linked for Linux on x86_64
set -e -u
# configure ssh
echo "VerifyHostKeyDNS=yes
KexAlgorithms=sntrup761x25519-sha512@openssh.com" >> ~/.ssh/config
# mirrored at https://seirdy.one/pb/binaries.tar.gz
rsync -WPv deploy@seirdy.one:/var/www/pb/binaries.tar.gz .
mkdir -p ~/bin
tar xzf binaries.tar.gz -oC ~/bin
rm binaries.tar.gz