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

@binlidaily binlidaily commented Oct 7, 2017

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

This comment has been minimized.

Copy link

@rajeevkannav rajeevkannav commented Oct 26, 2017

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

@johnta0

This comment has been minimized.

Copy link

@johnta0 johnta0 commented Nov 13, 2017

@binlidaily I got the same problem.

@mjthompson

This comment has been minimized.

Copy link

@mjthompson 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

This comment has been minimized.

Copy link

@ManZzup 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
- based on poole/lanyon#209
HM4725 added a commit to HM4725/hm4725.github.io that referenced this issue Feb 25, 2020
@mdo

This comment has been minimized.

Copy link
Member

@mdo mdo commented Apr 3, 2020

Fixed by #238.

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

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.