12:18
<sideshowbarker>

So I spent some time trying to learn how the redirects are set up, and to find where the code for the redirects lives — but so I’ve not been able to find anything at all, really.

Given what I understand about what’s possible in GitHub Pages hosting, and given that when I make requests with curl, I just get a 200s, and the index files that come back from curl requests don’t seem to have any kind of client-side redirects in them, at this point it’s kind of baffling to me how the redirects are actually work, and however they’re set up, how they could actually even work.

The only clue I have so for is the BUILTBYGITHUBCI text macro I see in the bikeshed calls in the workflow file — but grepping around for that, I don’t find anywhere that’s actually used for anything.

So I’m pretty much stumped :(

12:19
<Andreu Botella>
I actually made some progress while investigating that
12:19
<Andreu Botella>
https://github.com/speced/bikeshed-boilerplate/blob/main/boilerplate/csswg/abstract.include <- this is where that macro is used
12:20
<sideshowbarker>
oh — I’ll look right now
12:20
<Andreu Botella>
that script only redirects if the page isn't being served by drafts.csswg.org
12:21
<sideshowbarker>
ah, the separate bikeshed-boilerplate repo — that’s the one place I had not thought to look at so far. Now it seems obvious that’s where I should have looked
12:22
<sideshowbarker>
https://github.com/speced/bikeshed-boilerplate/blob/main/boilerplate/csswg/abstract.include <- this is where that macro is used
OK yeah so it seems the draftUrl += "#"+location.hash step isn’t needed at all, maybe?
12:23
<Andreu Botella>
yeah, shouldn't be
12:23
<sideshowbarker>
OK
12:24
<sideshowbarker>
(but even if that step were needed, it should instead be draftUrl += location.hash, since location.hash already includes the #
12:24
<sideshowbarker>
so I see now that‘s why we end up with the doubled ##
12:25
<sideshowbarker>
e.g., https://drafts.csswg.org/css-backgrounds/#the-background##the-background
12:26
<Andreu Botella>
For unversioned specs, it seems like the mapping to a version is handled purely in the drafts server, and then the versioned spec is proxied from the github pages site
12:26
<Andreu Botella>
but since the github pages site doesn't build the index or the unversioned copies, opening those on the github pages site doesn't redirect to the drafts site
12:34
<sideshowbarker>
Andreu Botella: thanks, opened a PR at https://github.com/speced/bikeshed-boilerplate/pull/39 which just reverts the entire change that added the draftUrl += "#"+location.hash part