rladies / rladies.github.io

R-Ladies Hugo Website
Other
11 stars 20 forks source link

Preview build has broken image paths #210

Closed drmowinckels closed 7 months ago

drmowinckels commented 1 year ago

I think when I did the change to the hugo profiles, I might have made some change that breaks the paths to images in the previews that are made.

example https://6043692888--rladies-dev.netlify.app/directory

drmowinckels commented 1 year ago

had a peak atht the rendered html and found:

<img src="https://rladies.org/directory/alessia-visconti_hu6200f6eb60224859786202e032d821b9_54468_300x300_fill_box_smart1_3.png">

So its seems like the baseurl of the preview is not changed, meaning the bit in the workflow that should switch to building with a specific baseurl is not being triggered.

https://github.com/rladies/rladies.github.io/blob/main/.github/workflows/build.yaml#L132-L139

I believe switching the if statement in line 134 to the one below should fix it.

if [[ '${{github.ref}}' == 'refs/heads/main' &&  ${{github.event_name}} != 'workflow_dispatch']]; then