问题
I've recently published my Jekyll site to Github pages. I'm using my custom domain (example.com) that's mapped to my username.github.io account.
If I go to example.com/index or example.com/index.html, my site works.
However, if I just go to example.com I get a GitHub pages styled 404 page.
I've tried having an index.html file in my Jekyll root DIR. I've also tried replacing that with an index.md that has layout:home in the frontmatter, which calls a home layout in my _layouts folder.
Does anyone know how I can get this so example.com shows content on the homepage?
回答1:
For me, creating an additional index file named index.htm (without the trailing 'l') seemed to solve the issue. Oddly, after creating index.htm, it was index.html that was rendered by GitHub Pages; I verified that by making index.htm and index.html slightly different.
来源:https://stackoverflow.com/questions/44610801/github-pages-root-gives-404-with-jekyll