Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@axelkar
Copy link
Contributor

@axelkar axelkar commented Apr 2, 2025

Summary

Forces cache busting in image shortcodes.

Related issue

Brief discussion in #503

Changes

Accessibility

Screenshots

Type of change

  • Bug fix (fixes an issue without altering functionality)
  • New feature (adds non-breaking functionality)
  • Breaking change (alters existing functionality)
  • UI/UX improvement (enhances user interface without altering functionality)
  • Refactor (improves code quality without altering functionality)
  • Documentation update
  • Other (please describe below)

Checklist

  • I have verified the accessibility of my changes
  • I have tested all possible scenarios for this change
  • I have updated theme.toml with a sane default for the feature
  • I have updated config.toml in tabi-start
  • I have made corresponding changes to the documentation:
    • Updated config.toml comments
    • Updated theme.toml comments
    • Updated "Shortcodes" post in English
    • (Optional) Updated "Mastering tabi" post in Spanish
    • (Optional) Updated "Mastering tabi" post in Catalan

@axelkar axelkar requested a review from welpo as a code owner April 2, 2025 18:19
@netlify
Copy link

netlify bot commented Apr 2, 2025

Deploy Preview for tabi-demo ready!

Name Link
🔨 Latest commit 3404092
🔍 Latest deploy log https://app.netlify.com/sites/tabi-demo/deploys/67ed894831d6890008d53aec
😎 Deploy Preview https://deploy-preview-504--tabi-demo.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 site configuration.

@welpo
Copy link
Owner

welpo commented Apr 2, 2025

Thank you! Appreciate this PR.

A few things:

  • are there any disadvantages to enabling cache busting? I can't think of any, so perhaps it should be on by default
  • related: perhaps it shouldn't be configurable? Unless we can think of a use-case for disabling it, I'd enable it by default

What are your thoughts?

@axelkar
Copy link
Contributor Author

axelkar commented Apr 2, 2025

I was also thinking of creating a theme-wide config option and/or a post-wide config option for this. I can't currently think of any reason to disable it either.

@welpo
Copy link
Owner

welpo commented Apr 2, 2025

I can't currently think of any reason to disable it either.

Let's go with default = on + no way to disable it, until someone complains :)

@welpo
Copy link
Owner

welpo commented Apr 2, 2025

Thank you so much!

@welpo welpo changed the title ✨ feat: add cachebust parameter to image shortcodes ✨ feat: cache bust images in shortcodes Apr 2, 2025
@welpo welpo added the enhancement New feature or request label Apr 2, 2025
@welpo welpo merged commit cc39652 into welpo:main Apr 2, 2025
8 of 10 checks passed
@axelkar
Copy link
Contributor Author

axelkar commented Apr 2, 2025

I just noticed an issue with this. Images which cannot be found by Zola at the time of build don't work: Error: Reason: `get_url`: Could not find or open file netconfig1.svg

@welpo
Copy link
Owner

welpo commented Apr 3, 2025

Thanks for letting me know. I see this as a feature, no? Or is there a use-case I'm missing?

@axelkar
Copy link
Contributor Author

axelkar commented Apr 3, 2025

Thanks for letting me know. I see this as a feature, no? Or is there a use-case I'm missing?

I'm not sure. It was a real error from my side, and dynamic content will use raw_path (if it even uses the image shortcodes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants