qmd-lab / closeread

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

docs website #50

Closed andrewpbray closed 3 months ago

andrewpbray commented 3 months ago

We now have a GHA set up to publish the docs site to ghpages, and it... kinda works. The two closeread examples, though, aren't rendering correctly:

https://qmd-lab.github.io/closeread/gallery/demos/sticky-block-types/

Maybe the container is missing some dependency? Any ideas?

jimjam-slam commented 3 months ago

Quarto version in the container is 1.4.549. I'll see if I can roll my local version back to that temporarily to see whether it's the cause!

jimjam-slam commented 3 months ago

So I ran it locally with both 1.4.549 and the current pre-release, and it seemed to be working... although the blocks demo has a few elements not working (the hist and the scatter plots):

https://github.com/user-attachments/assets/da3d0cdc-307c-42f8-820b-508eaf8ac973

So not sure if this the version in the container after all!

jimjam-slam commented 3 months ago

Oh! I'm guessing the scatter and hist problems are part of the switch to using HTML IDs instead of custom IDs?

jimjam-slam commented 3 months ago

Okay, so the stuff from grid.scss isn't making it into bootstrap.min.css on the hosted Pages site, but it is making it into bootstrap.min.css locally. So there's some problem with the styles merging that is specific to the hosted setup.

Sorry to have this conversation across here and #48! The tl;dr is I think some Quarto team guidance might help 😁

andrewpbray commented 3 months ago

Ah, got it.

Yes, probably time for some css guidance from the pros. Please feel free to open an issue / discussion! I know Carlos has recently been mucking around in the vast jungles of the quarto css hierarchy.

jimjam-slam commented 3 months ago

https://github.com/quarto-dev/quarto-cli/issues/10383

andrewpbray commented 3 months ago

I'm quite sure 1.6 won't be out before posit::conf, so I'm thinking through work-arounds that would make sense just to get our gallery working. As you suggested, is the easiest just to change _quarto.yml to read:

format:
  html:
    theme:
      - [cosmo, "../_extensions/closeread/grid.scss"]

As a small aside, what do you think about renaming grid.scss to closeread.scss and scroller-init.js to closeread.js to flag which are our assets (vs borrowed from elsewhere).

andrewpbray commented 3 months ago

Well, looks like it... works?

closeread.netlify.app

which was built from https://github.com/qmd-lab/closeread/pull/53. Looks like we might just have some genuine clashes in our css files? (the gallery doesn't look right, sticky blocks look fine but nytimes has theme elements missing and messed up sidebar).

jimjam-slam commented 3 months ago

I'm quite sure 1.6 won't be out before posit::conf, so I'm thinking through work-arounds that would make sense just to get our gallery working. As you suggested, is the easiest just to change _quarto.yml to read:


format:

  html:

    theme:

      - [cosmo, "../_extensions/closeread/grid.scss"]

This should work for our case, but note it might not be generalisable: depending on how a user installs our extension (from GitHub or locally), it'll either be created inside our GitHub org's folder orb just go directly into _extensions. So we can't assume the extension path 😮‍💨

As a small aside, what do you think about renaming grid.scss to closeread.scss and scroller-init.js to closeread.js to flag which are our assets (vs borrowed from elsewhere).

Yeah, I was keen to do this!

andrewpbray commented 3 months ago

Yep, this is definitely a bit of a kludge to hold-over until there's a proper implemention. I suspect we'll end up binding our time until we get a bug report about the issue at which point we can direct them to the thread with the devs.