Unwanted query string showing up in loop, but only once (RSS) #4044
-
|
I made a template to handle my RSS feed. The url attribute in the <enclosure/> tag has a mysterious query string inserted between the equal sign and the actual URL, but only for the most recent post — it works correctly for all older posts. I can't figure out where this is coming from. The image path comes from the post meta, e.g., if this is about.md: The image is "/assets/images/site/logo.webp" My RSS template looks like this: Here's the (truncated) output: Note the query string It looks like the cache-busting strings that 11ty creates for images. But I don't have any idea why it's there; nothing in my code should inseert anything there. Any help appreciated. URL to the live RSS is https://mercury.photo/rss.xml. View it in Firefox to see the error. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 16 replies
-
|
Can you share your Eleventy config? You might have a plugin that adds the parameter. |
Beta Was this translation helpful? Give feedback.
-
|
I can see a case where someone updates a featured image, so the cache busting forces any browser view to use the new image. I have no idea how RSS readers handle cache. The file format for RSS is actually .xml, so that's what you would target. Maybe add a config option where one can enter the path to the specific file(s) to be excluded? |
Beta Was this translation helpful? Give feedback.
-
|
@Denperidge I added this line to
|
Beta Was this translation helpful? Give feedback.
Looks like I should work on tests/compatibility with those minifiers! Which one do you prefer for now? That'll be the first one I work on
(and/or let me know if you would like the ignoreOutputFiles option!)