10:51
<Andreu Botella>
A hacky search-and-replace seems quite worthwhile... maybe I can just do that in the global whatwg build script
What this mirror does to avoid linking to drafts.csswg.org is to comb through the bikeshed anchor database and replace those links before building: https://github.com/w3c/csswg-drafts/blob/main/bin/configure-spec-data.py
10:52
<Andreu Botella>
I prefer that over a search and replace on the built specs
13:22
<sideshowbarker>
Andreu Botella: I wonder how practical it would be to have build-index.py also build/generate a data file (JSON I guess) with, at least, the last-modified (last-revised) time for each spec?
13:25
<sideshowbarker>
I can do it downstream — by fetching each spec and checking the git revision from the, meta element in each doc — e.g., <meta content="929f19ea6d7188d984d2e1c0783dff758d84ec57" name="document-revision"> — and then using https://docs.github.com/en/rest/commits/commits#get-a-commit from the GitHub API to get the commit data and pull out the date.
13:27
<sideshowbarker>
But if you think build-index.py could be patched to do basically the same thing upstream, I’d be happy to work on writing up a patch to do that.
13:28
<sideshowbarker>
my main need for it is for https://html-now.github.io/, in the Repo column, where the numbers in red and green and black indicate how many days it’s been since the spec was last updated.
13:30
<sideshowbarker>
Right now I get that by doing a HEAD request for each spec and checking the Last-Revised HTTP header — if there is one (which there is for drafts.csswg.org documents); and if there is not, I check the Last-Modified header.
19:03
<Domenic>
What this mirror does to avoid linking to drafts.csswg.org is to comb through the bikeshed anchor database and replace those links before building: https://github.com/w3c/csswg-drafts/blob/main/bin/configure-spec-data.py
This would be harder to hack into whatwg build scripts since those invoke the csswg API version of Bikeshed. Hmm.
20:22
<Bibi Zaiti>
Szia