3

I have a Github pages site already up and running at http://pshrishi.github.io, where I have my resume posted at pshrishi.github.io/resume and a couple of other presentations at similar URLs/addresses like pshrishi.github.io/XYZ. I would like to host a blog at a URL like pshrishi.github.io/blog.

I have jekyll set-up on my MBP, and have been looking for a step-by step guide to go ahead with the blog. Any help would be appreciated, since I'd like the blog to go live as soon as possible.

I've listed the steps that I've tried so far, below:

  • cd pshrishi.github.io
  • Create a new jekyll project : jekyll new blog
  • Update the _config.yml file.
  • cd blog, and jekyll serve
  • The blog works just fine when I access it on my localhost at localhost:4000
1

3 Answers 3

2

Your jekyll is not at the top level of the repo. Github is not able to read it.

Simply move your jekyll out from /blog onto the root directory of this repo.

Added:

Your current wrong setup is like the following:

/pshrishi.github.io /blog /<jekyll-content> /index.html /_posts /_config.yml /blah-blah /resume /<jekyll-content-again> /index.html /_posts /_config.yml /blah-blah 

You should make the jekyll this way:

/pshrishi.github.io /<jekyll-content> /index.html /_posts /_config.yml /blah-blah 

Hope this helps :)

Sign up to request clarification or add additional context in comments.

1 Comment

I don't really need jekyll for the other pages. My current directory structure is something like: /pshrishi.github.io /resume index.html /css /js /factory index.html /css /js /blog /jekyll_stuff What should I do to get the following results? - Open pshrishi.github.io/resume to view my resume - Open pshrishi.github.io/XYZ to view any other pages I might add in the future. - Open pshrishi.github.io/blog to view my jekyll-based-blog.
2

As @ytbryan says, if your jekyll site is not at the root, it will not be generated by Github pages.

Two solutions :

1 - in your user repository pshrishi.github.io

  • put everything at the root
  • in _setting.yml, set permalink: /blog/:month-:day-:year/:title.html. this will generate your posts in /blog folder
  • put a link to your resume and other pages on the index page.

2 - in a blog repository

Just put your blog files in a gh-pages and all your Jekyll site will be accessible at pshrishi.github.io/blog

Comments

0

A good solution to use such "sub-domains" through github would be to first create an organization in your name (e.g. pshrishi_organization). Then, you create your website/blog/resume as respective repositories in this organization (e.g. called blog). The github.io address pointing to the root of your blog.git repository will now be: pshrishi_organization.github.io/blog

The disadvantage of this approach is that you won't be able to use the root address available (pshrishi_organization.github.io) - at least I could not figure out how to do that, yet.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.