tidyverse / tidyverse.org

Source of tidyverse.org
https://tidyverse.org
Creative Commons Attribution Share Alike 4.0 International
191 stars 113 forks source link

Image links to /articles are broken. #670

Open maxim-h opened 9 months ago

maxim-h commented 9 months ago

Hey, thanks for all the great work!

I saw somewhat similar issues, but not exactly this, so I thought maybe it's not reported yet.

Seems like all the blog posts that reference image locations in /articles/[date & post name]/figure-html don't have access to those paths. Results are blogs with broken images, like so:

image

Building the whole website locally works fine and blogs that use other image locations seem to be unaffected. So perhaps some changes in the deployment caused a problem.

Unfortunately I don't understand either hugo or netlify enough to see where the issue comes from.

rkb965 commented 7 months ago

I thought I might be able to help here (I was very wrong, and I know nothing about hugo or netlify so I shouldn't be surprised...) but I'm making note of things that I looked at, in case it helps anyone else. I used the file tidyverse.org/content/blog/2017/ggplot2-tidy-evaluation/index.markdown as my example, which references a pie chart:

<img src="/articles/2017-07-ggplot2-tidy-evaluation_files/figure-html/piechart-basic-1.png" width="700px" style="display: block; margin: auto;" />

  1. As @maxim-h said, the website renders fine locally and the images are found
  2. In this repo, the images are located within tidyverse.org/static/
  3. When you try to go directly to the url tidyverse.org/articles/2017-07-ggplot2-tidy-evaluation_files/figure-html/piechart-basic-1.png you get a 404 but you actually get automatically redirected to tidyverse.org/blog/2017-07-ggplot2-tidy-evaluation_files/figure-html/piechart-basic-1.png

I'm not sure if the solution is a netlify (or hugo) configuration change, moving image files from /articles/ to /blog/, moving image files from /articles/ to within each blogpost folder itself and updating the path in the markdown files, or something else. If it is something manual/basic that I can help with, I'm happy to do so.