Github Pages root gives 404 with Jekyll

风格不统一 提交于 2019-12-11 00:16:15

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!