Is it possible to publish a project page to http://username.github.com/ instead of http://username.github.com/projectname?
Create a repository called username.github.com and it will automatically be used as your top-level page.
Note that since April 2013 ("New GitHub Pages domain: github.io"):
User Pages repositories may now be named using the new username/username.github.io
Existing User Pages repositories named like username/username.github.com do not need to be renamed and will continue to be published indefinitely.
If both a username.github.io and a username.github.com repository exists, the username.github.io version wins.
So the solution is still valid, but be aware that:
If your Pages site was previously served from a username.github.com domain, all traffic will be redirected to the new username.github.io location indefinitely, so you won't have to change any links.
For example, newmerator.github.com now redirects to newmerator.github.io.
Related
I have just created my first jekyll page, trying to use github.io
What am I doing wrong, as the page seems to serve correctly on my local machine yet it does not on the GitPages.
If you want to use a github.io URL, the exact URL of your GitHub page depends on the name of your repository.
This is explained here in the GitHub Page documentation:
User, Organization, and Project Pages
If you want your website URL to be https://cstml.github.io/ (called "user page" in the docs), the repository must be named username.github.io, i.e. in your case:
https://github.com/cstml/cstml.github.io
If you want your website URL to be https://cstml.github.io/some-sub-dir (called "project page" in the docs), the repository must be named some-sub-dir, i.e. in your case:
https://github.com/cstml/some-sub-dir
In my search for trying to solve it I have changed the name of the repository to my cstml.github.io GitHub-pages and that seems to have fixed it. Don't really understand why that is at the moment but it seems to be working.
TL;DR: Changed my GH-Pages domain to a custom one, the custom one works well but the default (old) one is not redirecting to the custom one.
I have a GitHub pages repo that was on the default domain, then switched it to a custom domain, which worked fine, and the default domain was redirecting to the new one. I then changed the repo's name to the new domain's name, but when I went to the old domain, it returned 404, so I changed the repo's name back to the default one (mohamed3on.github.io), but it still returns 404 and says
There isn't a GitHub Pages site here.
The repo contains a CNAME with mohamed3on.online.
What do you think I should change?
Please make sure you have been included CNAME in the root directory.
I created a page for a github repository following these instructions:Getting Started with GitHub Pages. Worked perfectly, the page is already hosted.
But I would like to change the page URL, This is the currently URL: http://myusername.github.io/repositoryName/
Is there any way to remove the repository name? (http://myusername.github.io/)
I've seen the articles to configure a custom domain, but I think that's not the case.
To remove the repository name, you'll need to make it a User Page (or an Organization page). Create a repository named myusername.github.io, and commit your content to the master branch. See this help page for more information.
Some years ago I added a custom domain from free site just to try a new feature of Github. Now that I want to make a page my main url keeps getting redirect to myexpireddomain.com ...
http://myuser.github.io => myexpireddomain.com
http://myuser.github.io/page => myexpireddomain.com/page
and this all results in 404...since domain doesn't exist.
I think I need to remove cname file somewhere. But out 20 repos that I have I don't see any that should cname... which repo is at the root domain. http://myuser.github.io
For removal of custom domain, I removed all of the text from the custom domain field in the settings for that particular website, then pressed save. Then, I found out that you have to clear the browser cache (in google chrome I just cleared all of the browsing data for the last hour), otherwise it will still redirect to the custom domain!
Also, make sure that the CNAME file in your repository is deleted. Github pages creates this for you when you add a custom domain.
The repository for your main domain is either myuser.github.io, as documented on the Pages website, or possibly myuser.github.com in case your site is from before GitHub started using github.io for Pages.
Check the master branch for a file called CNAME in the repository root.
I am trying to figure out how to setup github pages for account rather than for a repository.
E.g
I want the blog address to be like this:
xxx.github.io rather than xxx.github.io/repo. Therefore when i go to xxx.github.iothe static markdown pages should appear rather than a 404 page.
Thanks.
You're looking for Pages' user / organization sites. The official site has a good getting started guide, but the first bit is the most important one:
Create a repository
Head over to GitHub and create a new repository named username.github.io, where username is your username (or organization name) on GitHub.
If the first part of the repository doesn’t exactly match your username, it won’t work, so make sure to get it right.
So, instead of creating a gh-pages branch as you would for a project site, you must create a repository that matches your user name.