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


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


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

I can see the index.html which was generated from 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:

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?



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.

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