galaxyproject / galaxy-hub

Galaxy Community Hub
https://galaxyproject.org/
Other
99 stars 276 forks source link

Image links are wrong in the feed #2721

Closed arash77 closed 1 month ago

arash77 commented 2 months ago

It seems that the Atom feed generated at https://galaxyproject.org/eu/feed.atom contains incorrect image URLs, causing the images to not load properly. For example, in the post "What do you want to know about Galaxy-EU? Our first 'Ask us anything' Q&A session", the image URL is currently: https://galaxyproject.org/news/2024-07-29-ask-us-anything-report/questions_1.png However, it should be one of the following:

This issue was first identified while using the Atom feed to create automated Galaxy social PRs: https://github.com/usegalaxy-eu/galaxy-social/pull/86#discussion_r1697182311.

Could you please look into this?

Thank you!

bgruening commented 2 months ago

@dannon do you have a clever idea here?

arash77 commented 1 month ago

I realized that images not relatively addressed (external images) in the Markdown, remain unchanged. For example, in this post: https://galaxyproject.org/news/2024-07-08-galaxy-social/ The image mentioned in the Markdown is: https://github.com/arash77/galaxy-hub/assets/2973722/c8de8bdf-3cee-466f-aea3-d2462b4bc88f This image remains consistent across the website and in the feed.

dannon commented 1 month ago

Alright, I finally had a minute to look at this, sorry for the delay @arash77, @bgruening

The staging I was referring to (out of band in either dev meeting or chat, wherever) is here: https://github.com/galaxyproject/galaxy-hub/blob/master/src/build/run.mjs#L95. This is working. It stages the source file content/news/2024-07-29-Ask-Us-Anything-report/questions_1.png to dist/content/news/2024-07-29-Ask-Us-Anything-report/questions_1.png at the end of the build, for direct access. That dist dir is what we end up publishing as galaxyproject.org.

Note the case.

https://galaxyproject.org/news/2024-07-29-ask-us-anything-report/questions_1.png

Which is generated in the feed, fails, but the following URL exists and works.

https://galaxyproject.org/news/2024-07-29-Ask-Us-Anything-report/questions_1.png

I need to double check we're not relying on the case anywhere else, but we should probably just stick to forcing lowercase paths (on staging, automatically doable) and move on.

arash77 commented 1 month ago

Thank you, Dannon! So, this issue only happens with the images and not the posts?

bgruening commented 1 month ago

Indeed its https://galaxyproject.org/news/2024-07-26-shiny-phyloseq-on-EU/alpha-div.gif (available) vs. https://galaxyproject.org/news/2024-07-26-shiny-phyloseq-on-eu/alpha-div.gif (in the feed) ... :scream:

dannon commented 1 month ago

Right. I'm testing adjusting the staging to create all outputs at the toLowerCase paths, standardized.

dannon commented 1 month ago

Fixed w/ #2735

arash77 commented 1 month ago

@dannon It seems that the problem still exists in the feed with this image: https://galaxyproject.org/news/2024-08-14-galaxy-in-research/GalaxyInResearch_Jain2024.png https://github.com/galaxyproject/galaxy-hub/tree/master/content/news/2024-08-14-GalaxyInResearch

dannon commented 1 month ago

Scratch all that, I see the diff in the URL.

news/2024-08-14-GalaxyInResearch/
vs 
news/2024-08-14-galaxy-in-research/

The atom feed is slugifying this thing differently from the gridsome build -- let me see how we can standardize.

I wonder if that's a fluke of that branch being before the other fix was merged? When I build locally I do see:

[dannon@inneoin:~/work/galaxy-hub] find dist -name "GalaxyInResearch_Jain2024.png"                        master
dist/news/2024-08-14-galaxyinresearch/GalaxyInResearch_Jain2024.png

so that link should work. Let me trigger a manual rebuild.

arash77 commented 1 month ago

It seems they are all fixed! Thank you @dannon.

arash77 commented 3 weeks ago

@dannon There is also a problem with this post: https://galaxyproject.org/news/2024-09-05-galaxy-in-research-lin2024/ The image doesn't exist in the feed: https://galaxyproject.org/news/2024-09-05-galaxy-in-research-lin2024/Figure_Lin2024.jpeg cause break in the https://github.com/usegalaxy-eu/galaxy-social/pull/107