Setting up a _post in a docs/ folder of a project - site not found

Hello,

I am having problems in getting github pages to correct process the _post directory for a project.

Setup:

I have added a docs/ folder to my project frankieliu/pgm and I initialized it via

jekyll build

I have also installed github-pages gem via gem install github-pages, and modified the Gemfile with

gem “github-pages”, group: :jekyll_plugins

I tested with 

bundle exec jekyll serve

And I can navigate to the posts through the browser

I commited and pushed these changes, and tried to navigate to the corresponding project page and docs

frankieliu.github.io/pgm

I can see the index.html which was generated from index.md but when clicking through to the posts I get bad links: sorry this page does not exist.  Note I can see the links as  Github’s jekyll plugin is getting the correct files from _posts directory, but for some reason the links:

https://frankieliu.github.io/jekyll/update/2017/11/02/welcome-to-jekyll.html

https://frankieliu.github.io/github-pages/2017/11/02/setting-up-github-pages.html

are not reachable.  I get an error “Sorry this page does not exist.”.  Note I get no such errors from the local server.

Could you please advice how to fix this problem?

Thanks,

-f

1 Like

Based on the links you posted, it looks like you may need to add a baseurl of “/pgm” to your “_config.yml” file. Baseurl can be a bit confusing, but you’ll generally want set a baseurl when you’re building a site that won’t be published at the root of the domain. Parker, a Jekyll maintainer, wrote an article on his personal blog that goes into more detail if you’re interested.

https://byparker.com/blog/2014/clearing-up-confusion-around-baseurl/

Having said all of that, I took a look at your repository and it appears that you’ve figured this one out on your own. Great work! :smiley:

1 Like