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

The URL of a post is overwrote to http://0.0.7.225/10/07/Jekyll-blog/ #209

Closed
binlidaily opened this issue Oct 7, 2017 · 5 comments
Closed

Comments

@binlidaily
Copy link

When I click one post from http://127.0.0.1:4000/, the URL of the post is overwrote to http://0.0.7.225/10/07/Jekyll-blog/. Of course, it's unreachable. Do you know what I can do for this issue?

I just copy the lanyon source code to the folder of my github page, the problem is there.

@rajeevkannav
Copy link

Try to match your _config.yml with _config.yml of gh-pages branch.

@johnta0
Copy link

johnta0 commented Nov 13, 2017

@binlidaily I got the same problem.

@mjthompson
Copy link

mjthompson commented Nov 26, 2017

Try changing references to {{site.baseurl}} to {{site.url}} (e.g. if using the default template, in index.html inside the post iteration)

@ManZzup
Copy link

ManZzup commented Apr 7, 2018

This happens to due a slight bug in index.html

lanyon/index.html

Lines 10 to 12 in ac85a31

<a href="{{ site.baseurl }}/{{ post.url }}">
{{ post.title }}
</a>

I had the same bug and fixed it by changing

 <a href="{{ site.baseurl }}/{{ post.url }}">

to

 <a href="{{ site.baseurl }}{{ post.url }}">

How you get the above IP is when you have base-url: "/", GitHub pages seems to overwrite the url to "" as well. Then the post links becomes in the format //2017/10/07/Jekyll-blog/. Now the browser treats this as an address and try to decode the first number into an IP giving 0.0.7.225

I assume that this bug started after Jekyll decided to remove "/" from the baseurl and added into post.url, anyhow, above fix worked for me so far.

ManZzup added a commit to ManZzup/lanyon that referenced this issue Apr 7, 2018
kertansul added a commit to kertansul/kertansul.github.io that referenced this issue May 13, 2018
@mdo
Copy link
Member

mdo commented Apr 3, 2020

Fixed by #238.

@mdo mdo closed this as completed Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants