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

http://127.0.0.1:4000 #4

Open
nreith opened this issue Dec 5, 2014 · 3 comments
Open

http://127.0.0.1:4000 #4

nreith opened this issue Dec 5, 2014 · 3 comments
Labels

Comments

@nreith
Copy link

nreith commented Dec 5, 2014

Dear Gayan,

Sorry to bombard you with questions. I think it is the last one :-)

I have a small problem with the links on my site.

In the header and the footer, I used something like this:

 <li>   <a href="{{ site.url }}/about">About</a><span>/</span>    </li>

From the main page: nreith.github.io or nicholasreith.com, and any other pages, the links all work.

... EXCEPT... when you are located on the blog page at nicholasreith.com/blog

In that case, all of the link urls in the header point to:

http://127.0.0.1:4000/pagename

Of course, pagename is "blog" "resources" etc.

Is there a reason why the blog page might use a different header? Is something stuck in a cache somewhere?

Best,

-Nicholas

@gayanvirajith
Copy link
Owner

Dear Nicholas,

No worries, I am here to help 👍

I looked your source of nreith.github.io. Is there any special reason to have generated site folder in your repo?

Maybe this would be the reason for blog page.

Based on my knowledge the url http://127.0.0.1: is coming from _config.yml. Before commit to live, please try to generate the site folder by having the live url instead of http://127.0.0.1.

Example:

#in your _config.yml change `url` property to follows
url: nicholasreith.com

Hope you got the idea. Please let me know if your need further help. Also please keep your harmony fork up to date by having git fetch upstream.

Thank you

@nreith
Copy link
Author

nreith commented Dec 6, 2014

Hi Gayan,

Thanks again for your help!

It's still a work in progress, so this is what I can tell you:

I didn't exactly fork it into my repo (nreith.github.io)..

What I did was:

  1. Fork harmony to nreith/harmony in a project repo.
  2. Git clone that version of harmony to a local folder
  3. Copied that folder to one called _source, where I write blog posts and
    content.
  4. "Serve" the site locally for testing when I'm just making changes, using
    "bundle exec jekyll serve" from within _source
  5. When I'm ready to publish, I cleaned out my nreith.github.io clone
    folder locally, except for the .git subfolder.
  6. I then wrote a script, which "builds" _source to another folder called
    _deploy, copies all files from _deploy to nreith.github.io, adds, commits,
    and pushes.

I guess I'm still learning how github works, so perhaps I should either
fork your harmony repo to my main nreith.github.io repo directly, so I
could even make edits while on a different computer?

I was following tutorials on the jekyll website that showed the steps from
A-Z of how to use jekyll, and this was what they seemed to suggest.

Now that I'm getting comfortable, maybe I'll make my changes directly in
the fork of nreith/harmony. But my only real changes are mainly content for
now.


As for the url issue, I searched high and low in every file in both the
final site (nreith.github.io) and in _source. I can see that only the blog
archive page has local links, while all others are correct, so I suspect it
has to do with feed.xml, or something. But I can't figure out how the blog
archive is created from your harmony theme.

Neither _config.yml or _config-dev.yml have a url that is local. Both have
nicholasreith.com as the correct url.

So for now, I implemented a work-around. I ignored the blog archive, and
changed both the header link and the front page "blog archive" feed link to
"{{ site.url }}/blog" manually, and I created a blog archive page manually
using the technique below:

http://reyhan.org/2013/03/jekyll-archive-without-plugins.html

Sorry for the long post.

Keep up the good work man!

And thanks for the git and jekyll tips!

-Nicholas

On Fri, Dec 5, 2014 at 9:32 PM, Gayan Virajith [email protected]
wrote:

Dear Nicholas,

No worries, I am here to help [image: 👍]

I looked your source of nreith.github.io
https://github.com/nreith/nreith.github.io. Is there any special reason
to have generated site folder in your repo?

Maybe this would be the reason for blog page.

Based on my knowledge the url http://127.0.0.1: is coming from
_config.yml. Before commit to live, please try to generate the site folder
by having the live url instead of http://127.0.0.1.

Example:

#in your _config.yml change url property to follows
url: nicholasreith.com

Hope you got the idea. Please let me know if your need further help. Also
please keep your harmony fork up to date
https://help.github.com/articles/syncing-a-fork/ by having git fetch
upstream.

Thank you


Reply to this email directly or view it on GitHub
#4 (comment).

Nicholas E. Reith

PhD Candidate
Department of Sociology &
Population Research Center
University of Texas at Austin

@gayanvirajith
Copy link
Owner

Dear Nicholas,

Thanks for more details steps.

GitHub also supports jekyll. So no need to put generated folder, You can put same jekyll project there (The one you work on locally). It would be easy for you. In this approach you do not want to clean your nreith.github.io repository each & every time.

Let me know if you need further assist. Thank you so much.

dfjones89 added a commit to dfjones89/dfjones89.github.io that referenced this issue Aug 1, 2020
dfjones89 added a commit to dfjones89/dfjones89.github.io that referenced this issue Aug 1, 2020
dfjones89 added a commit to dfjones89/dfjones89.github.io that referenced this issue Aug 1, 2020
dfjones89 added a commit to dfjones89/dfjones89.github.io that referenced this issue Aug 2, 2020
dfjones89 added a commit to dfjones89/dfjones89.github.io that referenced this issue Aug 2, 2020
dfjones89 added a commit to dfjones89/dfjones89.github.io that referenced this issue Aug 4, 2020
dfjones89 added a commit to dfjones89/dfjones89.github.io that referenced this issue Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants