1

Even though Github Pages is configured to build off the master branch and serve index.html from the /docs directory, it's still serving the README.md file from the root directory. Here are my configurations, in case I'm somehow mistaken:

Current Configurations

And here's the repo: https://github.com/mattyoungberg/RGBTrainer

Here's what it currently serves: https://mattyoungberg.github.io/RGBTrainer (The README.md file in \(root), not \docs)

Here's what I'd expect it to serve: https://mattyoungberg.github.io/RGBTrainer/docs/

This setup worked just fine two days ago on a feature branch. I merged it to master, changed the branch Github Pages pointed at to master, but now it's not behaving as I'd expect.

Can anyone tell me why this wouldn't work? I've looked at all the other StackOverflow questions I can find, but they all seem to have a different angle to the question which renders them unhelpful in my situation.

Any help is greatly appreciated.

myoungberg
  • 137
  • 6

2 Answers2

2

After reverting the commit in an attempt to try the answer from VonC, it looks like a simple rebuild from Github Page's deployment process got it rendering correctly.

This answer about whether or not you can force Github Pages to build without a commit is useful.

In short, you can't. But you can push an empty commit. In this case, the revert also caused it to build this time and render correctly.

myoungberg
  • 137
  • 6
0

Just for testing, try and add an index.md or README.md in your docs/ folder, to see if that file is picked up by the GitHub Pages generator.

index.md was mentioned in the 2016 announcement of that docs/ feature.
And I see a readme.md in jekyll/jekyll/master/docs.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • The conversion from .html to .md has caused Github Pages to add some elements to the page, such as a header and then a couple of links that interact awkwardly with the main body of my page. – myoungberg Dec 21 '20 at 23:31