update RSS layout to fix image rendering#491
Open
apreshill wants to merge 2 commits into
Open
Conversation
hadley
approved these changes
Dec 10, 2020
| <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> | ||
| <guid>{{ .Permalink }}</guid> | ||
| <description>{{ .Content | html }}</description> | ||
| {{- $content := replaceRE "a href=\"(#.*?)\"" (printf "%s%s%s" "a href=\"" .Permalink "$1\"") .Content -}} |
Member
There was a problem hiding this comment.
Could you please use a comment here to link back to that blog post that explains how this works?
It's unfortunate that hugo doesn't provide something built in for this case, because the regexp approach is going to be fragile (i.e. it relies on the alt attribute coming after the src attribute).
batpigandme
approved these changes
Dec 14, 2020
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.
I believe this is ready- the
index.xmlnow contains absolute urls to all images in posts, but the layout still allows relative image links by post authors (respecting page bundling).current:
https://www.tidyverse.org/blog/index.xml
updated:
https://deploy-preview-491--tidyverse-org.netlify.app/blog/index.xml
h/t to this individual: https://jdheyburn.co.uk/blog/who-goes-blogging-6-three-steps-to-improve-hugos-rss-feeds/