Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use absolute path for images in post.content #185

Closed
dtsn opened this issue Aug 2, 2017 · 4 comments
Closed

Use absolute path for images in post.content #185

dtsn opened this issue Aug 2, 2017 · 4 comments

Comments

@dtsn
Copy link

dtsn commented Aug 2, 2017

When you reference an image using a relative URL (e.g. /uploads/image1.jpg) in lots of common feed readers these aren't visible. Ideally, they need to be absolute URL's. I currently do this as a manual process however, we can perform a simple replace in the post.content to add the site.url to the beginning.

@benbalter
Copy link
Contributor

need to be converted to absolute URL's

Can you explain why they need to be converted?

@dtsn
Copy link
Author

dtsn commented Aug 2, 2017

Sorry, I've updated the original feature request to be clearer. In a number of feed readers, post images aren't shown if they are relative.

@dtsn dtsn changed the title Automatic conversion to full URL's Use absolute path for images in post.content Aug 2, 2017
@benbalter
Copy link
Contributor

We set the xml:base property, which should make rewriting the URLs themselves uncecesary.

Via the atom spec:

Any element defined by this specification MAY have an xml:base
attribute [W3C.REC-xmlbase-20010627]. When xml:base is used in an
Atom Document, it serves the function described in section 5.1.1 of
[RFC3986], establishing the base URI (or IRI) for resolving any
relative references found within the effective scope of the xml:base
attribute.

@dtsn
Copy link
Author

dtsn commented Aug 2, 2017

Thanks! It may just be my terrible RSS reader, i'll investigate some others.

@dtsn dtsn closed this as completed Aug 2, 2017
@jekyll jekyll locked and limited conversation to collaborators Apr 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants