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

Invalid urls in feed.xml are generated when site url in _config.yml is protocol-less #288

Closed
kamilszymanski opened this Issue Apr 26, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@kamilszymanski
Contributor

kamilszymanski commented Apr 26, 2016

Links are generated based on site url and thus they're missing the protocol and start with just //

@mmistakes

This comment has been minimized.

Show comment
Hide comment
@mmistakes

mmistakes Apr 26, 2016

Owner

Only way around it is either use https:// and forget about being protocol agnostic. Or dump the jekyll-feed plugin and roll your own feed.xml.

It's probably better for SEO purposes to pick https or http and stick with one as site.url is also used to generate canonical URLs in <head>.

If you're hosting on GitHub I honestly can't think of a reason why you wouldn't just stick with https since your site can be accessed both ways regardless of what you put in _config.yml.

For example the MM demo site has a site.url of https://mmistakes.github.io and is accessible at https://mmistakes.github.io/minimal-mistakes/ and http://mmistakes.github.io/minimal-mistakes/

I probably should just remove the mention of protocol-less URLs from the documentation as it apparently is an "anti-pattern" now.

Owner

mmistakes commented Apr 26, 2016

Only way around it is either use https:// and forget about being protocol agnostic. Or dump the jekyll-feed plugin and roll your own feed.xml.

It's probably better for SEO purposes to pick https or http and stick with one as site.url is also used to generate canonical URLs in <head>.

If you're hosting on GitHub I honestly can't think of a reason why you wouldn't just stick with https since your site can be accessed both ways regardless of what you put in _config.yml.

For example the MM demo site has a site.url of https://mmistakes.github.io and is accessible at https://mmistakes.github.io/minimal-mistakes/ and http://mmistakes.github.io/minimal-mistakes/

I probably should just remove the mention of protocol-less URLs from the documentation as it apparently is an "anti-pattern" now.

@mmistakes mmistakes added this to the 3.1.3 milestone Apr 26, 2016

@mmistakes mmistakes self-assigned this Apr 26, 2016

@mmistakes mmistakes closed this in 9abae1f Apr 27, 2016

sobkowiak added a commit to sobkowiak/sobkowiak.github.io-new that referenced this issue Apr 29, 2016

cjmadsen pushed a commit to cjmadsen/cjmadsen.github.io that referenced this issue Dec 7, 2016

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