0

I'm trying to create a blog on GitHub pages using Jekyll. I followed the Jekyll-now guide and got everything running fairly quickly.

I did some work in my local repo and added a menu item (called "presentations") at the top of the page. When I use jekyll serve and view the site locally, everything works as expected. However, after pushing the changes to my remote repository, clicking the "presentations" link results in a 404.

I thought this may be due to the fact that _site is in .gitignore, but after adding _site to my remote repository, it still did not work. I'm confused as to why this is happening since the "about" link works fine when viewing the site both locally and on the web, but my "presentations" link only works locally. I'm guessing that this has to do with the way GitHub pages is ingesting things behind the scenes?


Here is the Jekyll-Now setup guide I was following. It has two menu items at the top of the page: "blog" and "about".

Here is my site. I have three menu items: "blog", "about", and "presentations". I tried to model the format of "presentations" after "about" as much as possible (similar markdown, layout, etc.).

Here is a link to my respository.


I tried modifying the url in _config.yml as suggested here, but this did not work for me.

I don't have anything relevant excluded in my _config.yml (as suggested here. It only contains

exclude:
  - Gemfile
  - Gemfile.lock
  - LICENSE
  - README.md
  - CNAME

I believe I'm using https throughout as suggested here.


EDIT

I kind of figured out the problem. I have a git repo called "presentations" (with a branch called gh-pages). When I clicked the "presentations" link at the top of the page, I'm guessing it was directed to this repository, and I'm guessing I got the 404 because it didn't find an index.html file here. I changed the link name and location from "presentations" to "slides" and everything works. Except I want to use the name "presentations" instead of slides. I need to figure out a way to get an index file in the presentations repo, but I'm not sure about the best approach (e.g. put my presentations in my username.github.io repo and VC them in there, symlink an index file from username.github.io repo to my presentations repo (this just sounds bad), or something else?).

My presentations repository is here.

haff
  • 918
  • 2
  • 9
  • 20
  • why do you exclude CNAME? I think you will need it and did you run 'jeyyll build' before git commit? – utkusonmez Mar 31 '17 at 07:30
  • @utkusonmez CNAME was excluded in the original file. It's empty anyway. Is that a problem? Initially I did not run `jekyll build` before `git commit`, but I tested this out and it did not have any effect. – haff Mar 31 '17 at 07:42
  • don't you have to put to repository named jekyll-now.github.io? – utkusonmez Mar 31 '17 at 14:19
  • i have mine with CNAME also. https://github.com/utkusonmez/utkusonmez.github.io – utkusonmez Mar 31 '17 at 14:19

0 Answers0