fix(rss): render photo_gallery and carousel blocks + attach captions#122
Merged
RonanHevenor merged 1 commit intomainfrom Apr 24, 2026
Merged
fix(rss): render photo_gallery and carousel blocks + attach captions#122RonanHevenor merged 1 commit intomainfrom
RonanHevenor merged 1 commit intomainfrom
Conversation
…o their images The RSS feed's lexical-to-HTML pass used the default converter from @payloadcms/richtext-lexical, which doesn't know about our custom `photo_gallery` and `carousel` blocks and emitted "Unknown node" in their place. The default upload converter also dropped `fields.caption`, so block-level and featured-image captions either disappeared or rendered next to the wrong image. - Pass a custom `converters` map to convertLexicalToHTML for the RSS route: `upload` wraps the image in <figure><img/><figcaption/></figure> and pulls the caption from `node.fields.caption`; `blocks.photo_gallery` and `blocks.carousel` iterate `fields.images[]` and emit one <figure> per image in sequence (vertical stack is the correct degrade in feed readers). - Absolute https://poly.rpi.edu/... URLs on every <img>, HTML-escaped captions, existing CDATA escaping untouched. - Verified against the live /feed endpoint: 0 "Unknown node" occurrences (down from many), 145 well-formed <figure> elements with paired <figcaption>s, xmllint --noout passes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Photo galleries and carousels were rendering as "Unknown node" in feed readers, and image captions either dropped or attached to the wrong image. Custom converters on the RSS route render each gallery image as a
with absolute URLs and a paired . Verified: 0 "Unknown node", 145 well-formed figures, xmllint passes.