Why is GitHub Pages redirecting me to a weird URL? - github-pages

While GitHub is successfully publishing my gh-pages branch to github.io, and the URL <organization>.github.io/<repo> successfully takes me my pages, GitHub is redirecting the request to a funny, temporary looking host. Examples are like this:
https://effective-lamp-816e8e33.pages.github.io/
or
https://brilliant-avocado-29b3ce22f.pages.io/
I can copy the site to the <organization>.github.io repo, and then everything works, but GitHub's auto-publish is NOT copying to this repo and results in this weird host name.
Any idea what's going on?

Related

Hugo Site hosted in GitHub Pages. Main page shows ok but the Blog goes to 404

I have a site hosted on GitHub Pages:
https://mcbridebr.github.io/mysite-hugo/
I have it setup to publish to pages from the docs/ directory in the master branch. When I run hugo it will publish to docs/.
I can bring up the home page just fine. But when I click on Blog it goes to 404. I have a blog post that is blank under content/post/. If I run this locally and access it with localhost:1313 the BLOG link works. I am not sure what is happening here, any advice would be greatly appreciated.
Source Repo: https://github.com/mcbridebr/mysite-hugo
I had to go back and add additional layout index.html files to accommodate for the blog section.

Host Hugo website on github-pages

I created a static website using Hugo and I don't know how to host it on github. The documentation on their website didn't help me.
After finishing my website, I created the public folder which contains in theory all the files needed for the website (whith this command : hudo -t hyde-hyde). When I open index.html with chrome I only see the content of my website without the theme. Is it normal ?
Then I moved all the files within the public folder into my gihub repo username.github.io/ , but I can't see any result (I can only see my previous commit which is a simple Hello World).
How should I porceed to generate correctly my website and host it on github ? Thanks.
How to create with HUGO
If you have a problem while creating your site, check this tutorial.
How to Host HUGO website on GitHub (Pages)
Check this LINK where it shows you step by step all the procedures to host HUGO on GitHub, on both User/Organization Pages and on Project Pages.
Check list:
When I open index.html with chrome I only see the content of my website without the theme. Is it normal ?
I know it might seem a little too obvious, but check the spelling. Sometimes you spend hours trying to find the error and it's just a typo, this case in the theme you wanted to.
Have you tried another browser? It might not be the case, but checking it will get you out of doubt, also remember to delete the cache just in case.
Then I moved all the files within the public folder into my gihub repo username.github.io/ , but I can't see any result (I can only see my previous commit which is a simple Hello World).
Do you have a User/Organization Page (syntax: username.github.io) or a Project Page (syntax: username.github.io/project)?
UPDATE 1: Follow the instructions on this video for hosting on GitHub if unclear.
Could you add a link to your repo? Thanks.

Sub-pages on a GitHub pages site

I've just set up a new GitHub Pages page: https://philipnye.github.io/ainfo. I'm not using Jekyll.
My GitHub repo has a web folder that itself contains a number of sub-folders, e.g. web/2044. Within each is an html file, with a name such as Abbey-Academies-Trust.html.
I was expecting to be able to view the relevant page at https://philipnye.github.io/ainfo/web/2044/Abbey-Academies-trust.html, but I'm getting a 404 error.
In that particular folder - web/2044 - I've also created an index.html file, but I'm getting a 404 error for https://philipnye.github.io/ainfo/web/2044/index.html too.
I'm clearly missing something, but I can't see anything in the documentation that suggests why this isn't working.
For the first url, it's a caps problem on Trust : https://philipnye.github.io/ainfo/web/2044/Abbey-Academies-Trust.html.
For the second url everything is ok. The problem was certainly that you have near 2000 pages and that Github page took a while to generate your site.

Github Pages not using index.html

I have a gh-pages branch in my repository. My gh-pages branch and master branch are in an identical state. Both have index.html included in them. The settings page for my repository says Your site is published at https://[me].github.io/[appName]/. When I visit that URL, I receive a 404 error. When I visit https://[me].github.io/[appName]/index.html (with the specific asset index.html specified explicity) then it works, meaning the expected assets are located where expected, and function correctly. How can I get GH Pages to pick up my index.html file?
The problem resolved with a subsequent code change and push to origin. I don't know why, but after performing a bug fix and pushing the code via git push origin gh-pages everything showed up on all machines in all regions in all browsers that were previously not working.
Make sure you have declared a proper !DOCTYPE in your index file.
If you had just added the file, then give it some time and let github detect the file. https://[me].github.io/[appName]/ should work after a while.

Github Pages 404 for everything but index.html

I have a Github pages website for our team at http://olinaeromarketing.github.io/. I've tried opening index.html locally and it works perfectly in chrome on my pc. Everything loads perfect. However, when I push everything to Github and try to open it with http://olinaeromarketing.github.io/, everything except index.html gives a 404 error and can't load. I'm pretty stumped as to why this is happening. I also haven't been able to find anything on the web regarding this issue.
The repository is located at https://github.com/OlinAeroMarketing/OlinAeroMarketing.github.io. BTW, the website is currently a WIP and not yet finished.
By default, Jekyll is used to process GitHub Pages. Files/directories that begin with an underscore have special meaning for Jekyll and are, therefore, treated differently.
Since you don't seem to be using Jekyll, your simplest solution is to add a file named '.nojekyll' to the root path to disable Jekyll functionality.
Check out https://help.github.com/articles/files-that-start-with-an-underscore-are-missing/ for more info.
Edit: Just to be clear, the offending directory is '_include'.