1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-12-26 02:22:09 +00:00
Commit graph

91 commits

Author SHA1 Message Date
Rohan Kumar
866ca1b386
Switch soem things from find -exec to xargs
Allows better filtering and doesn't supress exit codes. Since I'm no
longer supressing exit codes, I had to handle them properly in
copy-file-to-xhtml.sh by using if-statements.

This also allowed me to skip the generation of an XHTML redirect page.
2023-11-26 15:14:06 -08:00
Rohan Kumar
c98b28f6fe
Make redirect alias valid XHTML5 2023-11-26 14:57:42 -08:00
Rohan Kumar
8971d74dac
try to get xmllint to print diagnostics 2023-11-26 14:37:07 -08:00
Rohan Kumar
33b3c5211a
Move resume to "about"
Define a redirect alias too.

This also entails special xhtmlize behavior as redirects in Hugo don't
use trailing slashes.
2023-11-26 14:28:41 -08:00
Rohan Kumar
429dcda2cd
Minify feeds with xmllint
This works particularly well on my Atom feeds with embedded XHTML.
2023-11-25 19:05:53 -08:00
Rohan Kumar
9ae88a5bef
Remove obsolete awk cmd from post-processing 2023-11-25 18:40:29 -08:00
Rohan Kumar
74ff22b8f4
remove obsolete comment 2023-11-25 18:25:37 -08:00
Rohan Kumar
c0f7318090
Trivial style fix 2023-11-25 13:41:35 -08:00
Rohan Kumar
d1711699d4
Opportunistically use pipefail 2023-11-25 13:40:52 -08:00
Rohan Kumar
6c9a8a9b20
Run Nu HTML Checker with both HTML and XML parsers
Requires silencing an HTML-only error that isn't actually an error, but
a hint that doesn't apply to polygot markup (warns against trailing
slashes which aren't a problem if you always use quotes).
2023-11-25 13:32:55 -08:00
Rohan Kumar
2e10fce294
Fix webmention issues for extended offline periods
It was still broken augh. This'll do the trick.
2023-11-25 12:59:55 -08:00
Rohan Kumar
074620f70e
Support custom timeout 2023-11-25 12:59:38 -08:00
Rohan Kumar
ba3c58dfd9
Fix perms 2023-11-24 21:04:41 -08:00
Rohan Kumar
de65f4d506
Move some CI logic to scripts/makefile
Also update some of its docs
2023-11-24 13:02:52 -08:00
Rohan Kumar
d8eae6f057
fix fetching mentions when no webmention file exists 2023-11-23 20:05:54 -08:00
Rohan Kumar
aebc49772e
Fix: exit check_cached_webmentions early 2023-11-23 20:01:54 -08:00
Rohan Kumar
226ee52f85
Format shell scripts 2023-11-23 19:06:46 -08:00
Rohan Kumar
d88d98f829
Fix get-webmentions diagnostics 2023-11-23 19:03:40 -08:00
Rohan Kumar
2b016aa973
Refactor shell scripts.
- Avoid relative paths, so I can run them from any working directory.
- Make a dedicated curl-wrapping shell script instead of re-defining the
  same alias everywhere.
- Support extended offline periods: allow get-webmentions.sh to fall
  back to the cached copy of my webmentions for up to a day, and don't
  accidentally destroy it; keep changes atomic.
- Verify that the fetched webmentions are legit before replacing the
  cached ones.
- Make shellcheck happy about quoting in vnu.sh by passing the list of
  files with xargs instead of a shell variable.
2023-11-23 18:45:03 -08:00
Rohan Kumar
88df7ba119
fix bad regex substitution 2023-11-15 10:25:27 -08:00
Rohan Kumar
3487f6b9f2
oops, stop calling tidy 2023-11-15 09:33:13 -08:00
Rohan Kumar
dd6cf95e8c
fix code block whitespace again 2023-11-15 09:32:00 -08:00
Rohan Kumar
4910a7c2c1
Quit using HTML-Tidy
See https://github.com/htacg/tidy-html5/issues/1094. The most recent
commit without that regression can't handle `dl` elements with `div`
children.
2023-11-15 09:21:26 -08:00
Rohan Kumar
0dfcced14f
Make shellcheck happy 2023-11-15 02:31:06 -08:00
Rohan Kumar
bbfa381368
Add HTML-Tidy's generator tag manually
It auto-inserts it to the start of <head> but I want it at the end.
2023-11-15 02:26:52 -08:00
Rohan Kumar
2418560975
use curl -o instead of shell redirection 2023-11-14 23:01:46 -08:00
Rohan Kumar
82e678fe7e
typo oops 2023-11-14 22:54:21 -08:00
Rohan Kumar
0912a89ca9
Remove usage of htmlq in xhtmlize.sh
Now I no longer need to include htmlq in my binaries.tar.gz
2023-11-14 22:00:15 -08:00
Rohan Kumar
649f827f66
Refactor post-processing to use sed instead of sd
html-tidy takes care of some post-processing, rendering other
substitutions obsolete. Remove the obsolete regex substitutions.

Now that we did that, the remaining substitutions can be done with
vanilla POSIX or POSIX-Extended regular expressions. Replace sd with
sed, and group the substitutions together into one invocation instead of
multiple invocations piped together. This change speeds up
post-processing to be almost as fast as the initial build step.
2023-11-14 21:39:53 -08:00
Rohan Kumar
72aa3606c5
use html-tidy to format my pages 2023-11-13 17:33:18 -08:00
Rohan Kumar
522e322cf5
Switch accessibility checkers to pnpx 2023-11-10 10:43:16 -08:00
Rohan Kumar
9b82cf5740
netizens ring is dead 2023-09-27 18:02:10 -07:00
Rohan Kumar
25684aa384
post-processing: minor fixes 2023-08-29 20:37:47 -07:00
Rohan Kumar
afcc4fd760
Stricter feed validation false-positive filtering 2023-08-27 14:31:42 -07:00
Rohan Kumar
838d73ed22
Reduce zopfli level, switch from jq to jaq
jaq is faster and more strict which is exactly what I want. zopfli level
9 is overkill and takes almost twice as long for barely any difference.
2023-08-27 14:31:32 -07:00
Rohan Kumar
b4038cb54b
Compress JSON files too 2023-08-21 11:27:07 -07:00
Rohan Kumar
7e6b979fdc
Fucking quotes 2023-06-15 11:49:18 -07:00
Rohan Kumar
e9a2af4a2b
Fix connectivity check for ipv4-only builds 2023-06-15 11:47:57 -07:00
Rohan Kumar
e8ab433b22
Fix undefined "==" behavior in POSIX sh
Thanks, ShellCheck.
2023-02-09 22:51:12 -08:00
Rohan Kumar
5cbe4ef6c2
Clean up + rename get-webmention script
Now caches webmentions for an hour
2022-12-24 10:11:25 -08:00
Rohan Kumar
a22528a3b5
Fix: fetch webmention json only once
Hugo parallelization means the webmention json may be fetched multiple
times, which is excessive.
2022-12-24 08:26:31 -08:00
Rohan Kumar
8709bf9ec2
Overhaul webmention generation
Use a new branch of webmentiond that lets me pull in all webmentions for
all pages in a single JSON response

Before, Hugo would make one request to webmentiond per page to ask for
approved webmentions for that page. Sometimes, it makes two requests
because some pages used to have a different canonical location. In all,
it ended up making over 150 requests within a second or two. Webmentiond
can handle this for now, but this isn't sustainable: page count will
only increase with time. I wanted to have Hugo instead get all
webmentions for all pages in one cached request.

I recompiled webmentiond from
https://github.com/zerok/webmentiond/pull/65, which updates the API to
support admin access keys. The admin API allows pulling in all
webmentions for all pages, instead of pulling them in for one page at a
time.

Doing so requires getting a bearer token, so I had to manage a new CI
secret: the password for getting a token. I get the token in a shell
script (get-token.sh) and write it to a temporary file, then have Hugo
read the token from that file. The shell script gets the password using
either the CI secret (in CI) or using my password manager (on my
workstation).

TODO: support marginalia (mentions with fragments in their targets)
2022-12-19 11:07:57 -08:00
Rohan Kumar
ed04b8628d
Run Nu validator on xhtml
Nu updated to flag XHTML-isms. Run on XHTML files so it can default to
strict mode.
2022-11-26 00:16:55 -08:00
Rohan Kumar
07b87df10c
Leave GEORGE webring
Left bc I quit trying to make a good first-party iframe alternative
that conformed to my site design standards while also imparting the
message of GEORGE as intended.

Whether I join or leave, GEORGE lives on. Whether GEORGE of the JUNGLE
or CURIOUS GEORGE, GEORGE is coming and GEORGE will be known to all as
as the one true GEORGE.
2022-09-26 09:47:41 -07:00
Rohan Kumar
0fb45529c7
Fix webrings and webmentions 2022-09-16 20:24:43 -07:00
Rohan Kumar
e07e479460
fix file attrs 2022-08-31 20:35:37 -07:00
Rohan Kumar
679feb8f5c
exclude BIMI icon and search from Nu validator 2022-08-13 14:05:23 -07:00
Rohan Kumar
d73ee7ebf5
Speed up internal jobs
- Make xhtml and html alternates the same (we're polygot), cutting
  static-compression time in half
- Make axe-ff run on local files, reducing some overhead.
2022-08-10 21:30:22 -07:00
Rohan Kumar
21dc952eb2
Internal: speed-up/fix check-whole-site
- Run webhint in parallel with other site checks, right after the
  deployment finishes
- Fix webhint perf budget (it warns when within 0.5 sec so give it a
  0.5 sec buffer)
- Throttle LH a bit more
2022-08-08 21:34:58 -07:00
Rohan Kumar
7cf0e4bc9b
Internal: check-whole-site: deploy in parallel
Saves about a minute of time.
2022-08-05 22:49:18 -07:00