qmd-lab / closeread

https://closeread.dev
MIT License
128 stars 5 forks source link

GeoJSON 404 on published docs #105

Closed jimjam-slam closed 1 month ago

jimjam-slam commented 1 month ago

Oy! Indeed, on Chrome:

Screenshot 2024-10-19 at 5 48 41 PM

Do you think this is a browser update that broke this? I swear this one was working fine on chrome a week ago..

Originally posted by @andrewpbray in https://github.com/qmd-lab/closeread/issues/101#issuecomment-2424357157

jimjam-slam commented 1 month ago

This is actually working locally, and on the published docs the console is showing a 404 for the GeoJSON file. So I'm thinking maybe we've just forgotten to add it to the site resources somehow.

jimjam-slam commented 1 month ago

The GeoJSON file actually appears correctly in _site when I render locally even if I don't specify it in the resources key. I thought maybe there could be a difference in how site resources are handled between Quarto release (in the GHA) and my local prerelease, but the GeoJSON file still seems to make it even when I check out Quarto v.1.5.57 and render 🤔 Wonder why it isn't on Netlify?

jimjam-slam commented 1 month ago

Actually this is fine on the preview docs! It only occurs on the main docs. Not sure if there's a Quarto version difference between them or a file difference...

jimjam-slam commented 1 month ago

Even weirder — no difference in the OJS demo's index.qmd or the project _quarto.yml between main and dev branches 🤔

$ git diff dev main -- docs/gallery/demos/ojs-variables/index.qmd | cat
$ git diff dev main -- docs/_quarto.yml | cat
andrewpbray commented 1 month ago

It looks like closeread.dev (nee closeread.netlify.app) hasn't been updated since mid August, so. I'm on a pre-release and it works fine, so I'll publish from local using the same command as the action: quarto publish netlify docs --id 2a052dac-9a3d-43c1-9f3d-e37e3cb55af2.

andrewpbray commented 1 month ago

Aaaaand, it's fixed!

That's strange. The files that Netlify had access to haven't changed since August, yet the image and OJS stuff no longer worked. And somehow, a site rendered under a newer Quarto creates files that Netlify now renders correctly. Maybe Netlify made a change and Quarto adapted?

The action is now on main, so when we merge new stuff into main it should use the (functional) image/action to update closeread.dev.

jimjam-slam commented 1 month ago

@andrewpbray Could this have been the same issue as the missing image when we visited a page on Netlify without the trailing space?

andrewpbray commented 1 month ago

Might well be!