Commit cb4696d
committed
deploy: copy back a couple files to help transitioning away from Rails
Currently, Git's home page is still a Rails app. When we tried to
transition away from it to the new Hugo/Pagefind-backed site, we noticed
a couple of problems, where some pages would look quite odd.
The reason turned out to be both Cloudflare and browser caching, where
force-reloading some pages would still retrieve the original versions of
the pages, but the `.css` and `.js` files referenced by those original
versions were gone.
And it is not just because the Hugo site puts those files in different
locations: Rails automatically amends the file name of style sheets and
Javascript libraries with a hash so that stale caches would not play a
role when new versions of those files become available (historically,
browsers are quite challenged when it comes to force-reloading pages
where also their referenced `.css`/`.js` files need to be
force-reloaded).
We can help with that! Simply by "putting back" those `.css`/`.js` files
into the place where the Rails version of the pages expects them.
Luckily, those files haven't changed very much, the most recent one was
the September update to disallow font ligatures in code blocks, and the
second-most recent was the August update to add the `/` keyboard
shortcut to get to the search box. Here are the `Last-modified:` headers
of those files when fetching them from https://git-scm.com/:
application*.css: Tue, 10 Sep 2024 17:26:19 GMT
application*.js: Mon, 19 Aug 2024 07:40:42 GMT
modernize*.js: Tue, 15 Dec 2020 06:13:03 GMT
So those files are very unlikely to change a lot, especially now, during
the transition.
By adding them to the Hugo/Pagefind site, even partial caches should not
break the site when switching DNS over to GitHub Pages.
Signed-off-by: Johannes Schindelin <[email protected]>1 parent b1986a3 commit cb4696d
1 file changed
+19
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
62 | 81 | | |
63 | 82 | | |
64 | 83 | | |
| |||
0 commit comments