X Tutup
Skip to content

Fix absolute image URLs in events list#313

Merged
shushugah merged 1 commit intotechworkersco:developfrom
EvanHahn:fix-absolute-image-urls-in-events-list
Jul 20, 2025
Merged

Fix absolute image URLs in events list#313
shushugah merged 1 commit intotechworkersco:developfrom
EvanHahn:fix-absolute-image-urls-in-events-list

Conversation

@EvanHahn
Copy link
Contributor

events.yml and events.json were doing a simple concatenation of site.url and event.image, which worked for relative URLs but broke absolute URLs. For example,
https://info.rosalux.de/image/event/3bod2?type=2 became https://techworkersberlin.com/https://info.rosalux.de/image/event/3bod2?type=2, which is wrong.

This causes issues for anyone consuming this data, such as this bug on techworkerscoalition.org.

This fixes that with Jekyll's built-in absolute_url filter, which doesn't change URLs that are already absolute.

`events.yml` and `events.json` were doing a simple concatenation of
`site.url` and `event.image`, which worked for relative URLs but broke
absolute URLs. For example,
`https://info.rosalux.de/image/event/3bod2?type=2` became
`https://techworkersberlin.com/https://info.rosalux.de/image/event/3bod2?type=2`,
which is wrong.

This causes issues for anyone consuming this data, such as
[this bug on techworkerscoalition.org][0].

This fixes that with [Jekyll's built-in `absolute_url` filter][1], which
[doesn't change URLs that are already absolute][2].

[0]: techworkersco/twc-site#431
[1]: https://jekyllrb.com/docs/liquid/filters/#absolute-url
[2]: https://github.com/jekyll/jekyll/blob/76982c73c0df37ac79781ec1ef9518e08263a158/lib/jekyll/filters/url_filters.rb#L62
@netlify
Copy link

netlify bot commented Jul 12, 2025

Deploy Preview for techworkersberlin ready!

Name Link
🔨 Latest commit 1c9c5cb
🔍 Latest deploy log https://app.netlify.com/projects/techworkersberlin/deploys/6871aab59086fd00080b536f
😎 Deploy Preview https://deploy-preview-313--techworkersberlin.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@shushugah shushugah merged commit ed4e29d into techworkersco:develop Jul 20, 2025
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants

X Tutup