emfcamp / badge-2024-documentation

Tildagon badge documentation website
https://tildagon.badge.emfcamp.org/
21 stars 36 forks source link

Preview image does not use correct colour theme #222

Closed npentrel closed 2 months ago

npentrel commented 2 months ago

done some investigation with mkdocs but unsure how to change

andypiper commented 2 months ago

Pretty sure this is via the mkdocs-material plugin and the social section of the mkdocs.yml file. I have never tried tweaking this myself.

npentrel commented 2 months ago

Yes that's correct but I've not been able to get it to work. There's something with material insiders that would do it but I think it's paid and would make contributions harder. By default it seems to use the primary colour but I've tried setting it to green and it won't change the preview image

walkerdanny commented 2 months ago

The change I've implemented in #223 seems to fix this? At least it fixes the cache that gets generated when serving the docs, assume that's the same. I set it to the mid green rather than the dark green so the logo shows up.

npentrel commented 2 months ago

I've checked out the branch and when I go to http://127.0.0.1:8000/assets/images/social/index.png it still displays as purple. I'm happy to merge through, maybe it's something about my local machine...

npentrel commented 2 months ago

Yeah still all purple on https://www.opengraph.xyz/url/https%3A%2F%2Ftildagon.badge.emfcamp.org%2F

walkerdanny commented 2 months ago

That same URL displays as green for me, strange! Maybe the cache needs to update?

image

npentrel commented 2 months ago

That's so odd. if you inspect the html source on the deployed site, can you search for og:image and tell me what URL it goes to? for me that's https://tildagon.badge.emfcamp.org/assets/images/social/index.png

walkerdanny commented 2 months ago

Yep, same URL for me, and fetching it shows up as purple. Is there a way to force the deployed site to clear its cache of files and rebuild the images? I'd have thought it would do that automatically when being redeployed but maybe not?

npentrel commented 2 months ago

Hosted on GitHub Pages, I don't think we can do anything. I guess we'll wait a bit and see if it changes.

walkerdanny commented 2 months ago

To get it to work locally I deleted the .cache folder and that forced mkdocs to rebuild everything, so it feels like this must be the same issue.

npentrel commented 2 months ago

I can see it now! I spend like 2h yesterday changing settings and wondering why nothign was changing

npentrel commented 2 months ago

There was a cache being created in the github action. I managed to delete it and it's now working. Thank you so much for fixing it and finding the cache folder!