Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image links to /articles are broken. #670

Open
maxim-h opened this issue Dec 2, 2023 · 1 comment
Open

Image links to /articles are broken. #670

maxim-h opened this issue Dec 2, 2023 · 1 comment

Comments

@maxim-h
Copy link

maxim-h commented Dec 2, 2023

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
Copy link
Contributor

rkb965 commented Feb 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants