Is there any way to activate the Pages machinery in GitHub without going through the subdomains? A practical case could be in a GitHub Enterprise instance.
To view GitHub Pages (gh-pages branch) on your github enterprise server, use this URL structure:
http://[github-enterprise-domain]/pages/[username]/[repo]/
This URL structure doesn't work for github.com.
For user or organization pages, you can't create a "username.github.io" repo. Instead, you can create a repo and name it the same as your username or org, and then you use:
/pages/[username]/[username]/
The 2nd [username] is simply the name of your repo.
Related
We have an organization on github, and in one of the repo's I'm trying to convert it to a simple github.io page to present the MD files in the repo. I'm following this guide.
It seemed easy enough, I added an _config.yml file to the repo and enabled github pages in the settings.
The problem is that github now shows that the site is published at our www.ORGANIZATION_NAME.org/wiki. But we don't own that domain. That domain isn't a registered domain in our github organization settings. I really have no clue where it got the name from, it seems completely arbitrary.
Is there any way to get a ORGANIZATION_NAME.github.io or similar default domain?
The message from Github settings page (organization name supplanted)
Your site is published at http://www.ORAGANIZATION_NAME.org/wiki/
To use the feature where your pages are exposed on *.github.io you need to make sure your github repository follows the correct naming convention.
Use the repository name <username or org-name>.github.io the github system sees this as a "Personal Page" and exposes the repository via https://<username or org-name>.github.io.
see: https://pages.github.com/
You can can customize the exposed URL by adding the "CNAME" file at the root of the repository.
Example:
I have the github repository Loki-Astari.github.io
Github repo: https://github.com/Loki-Astari/Loki-Astari.github.io
Exposed here: https://Loki-Astari.github.io
CNAME here: https://LokiAstari.com
Another Example:
Github repo: https://github.com/academicpages/academicpages.github.io
Exposed here: https://academicpages.github.io
I have Created the repository named as username.github.io and tried to access the same URL in browser but i'm getting 404 error.
Checked in repository settings -> Under Github Pages Section, But it was not showing the message "your site is published at username.github.io"
Apart from this, is there anything i have to do...
Screenshot:
Actual URL: https://username.github.io
To create a GitHub Pages site for your own username (i.e. a personal website and not a website for a repository), you need to replace the username part of username.github.io with your GitHub username. For example, if my username on GitHub is abcde, I would create a repository called abcde.github.io and then enable GitHub Pages in its settings as you have done.
You need select source branch to publish(Initially it will be none. So nothing published) in
Settings -> Github pages --> source and click save. Then only it will be published to username.github.io URL.
Make sure your branch has index.html file.
Normally, github pages URLs are generated as username.github.io/repo-name.
I'm not sure what naming the repo as you did would do, but in most cases, just name the repo as you normally would (a description of the project) and then publish the sites that way. If you already have code, here is how to rename the project in Github and updating the remote url
I'm not sure exactly why your pages aren't generating, but it likely has to do with the name of your repo.
I have a Github repository set up to host a small static site. The repository that hosts this is in the following format:
username.github.io
This repository is setup to use a custom domain and has a CNAME file to do so properly. This repository works exactly as expected.
Now I want to set up a project page and utilize the gh-pages branch for a different repository. When I do this, though, the CNAME in the first repository seems to apply and I am redirected to example.com/REPOSITORYNAME instead of using the expected username.github.io/projectname associated with this separate repository.
How can I continue to use the username.github.io repository with a custom domain and the gh-pages branch on a different repository without redirecting the gh-pages repository to the custom domain defined in the first repository?
As of Aug 2016, I don't think this is possible. (https://help.github.com/articles/custom-domain-redirects-for-github-pages-sites/)
The Github Pages help article states that
Project Pages site owned by a user account, such as username.github.io/projectname, will be Automatically redirected to a subdirectory of a User Pages site custom domain (user.example.com/projectname), unless a different CNMAE is specified, such as project.example.com
See Github pages - Disable custom domain redirection for all but a single site?
The easiest way is to create a Github Organisation for each website you decide to manage this way.
In this case, I had to publish to master instead of gh-pages.
More informations here : https://help.github.com/articles/user-organization-and-project-pages/
I want to know if creating a Jekyll GitHub blog for a particular GitHub page will associate itself with that entire GitHub entity or if it is possible to make multiple Jekyll blogs under the auspices of a single GitHub profile.
I'm part of an "Organization" on GitHub, my research group, and I want to create a blog for a particulat project following this tutorial, i.e. "Jekyll QuickStart: Host on GitHub in 3 Minutes".
At first I created an entirely new and seperate GitHub profile from which to host this blog, but it would be better if I could create this blog as a repository within the Organization to which I belong since most the people that need to access this blog are already associated with that organization.
But it would be suboptimal if this one blog were the only things that could be associated with the organization since the organization is involved in things other than this project as well.
So for these GitHub blogs is it 1 page/organization = 1 blog, or can we have a one to many mapping?
If you've already got a Github Pages repository set up for the organization (e.g. some-org.github.io), then any additional gh-pages repository will be accessible via some-org.github.io/<repo name>.
For example, I've got the organization "SusHack", and it has a repository called sushack.github.io.
sushack.github.io serves the main domain of sushack.co.uk, and we've got a project repository under that organization with a gh-pages branch, e.g. https://github.com/sushack/PuppetMaster/tree/gh-pages, and it is accessible via sushack.github.io/PuppetMaster or sushack.co.uk/PuppetMaster
So to recap:
Make a <orgname>.github.io repository under the Organization. In this you can create a file called CNAME to define a custom domain, or just use <orgname>.github.io.
Make a repository called blog with a gh-pages branch. You can push your Jekyll codebase to this branch, and Github will build it for you
Access your blog via <orgname>.github.io/blog/.
Github allows you to host your static website for free. On this page, Github describes the difference between User Pages and Project Pages. I can't understand the difference!
Currently, my website is running on github well. but I want to add a sub-domain to it.
www.123.github.io -> redirects to 123.com (which is a repository on Github, too.)
www.123.com -> is working
www.blog.123.com -> how? -> should it be "Project pages"?
I mean, can I run a domain and a subdomain in one repository?In summary:
Can I host a domain and a subdomain using Github-Pages?
Can I host different subdomains (a.123.com, b.123.com, ....) on github? Is it possible into one repository? (according to the Github limitations, the repository name should be the same as Github username, so we can just create just one repository under each account!)
The difference is that each repo can have its own Project Page (from gh-pages branch) but you can have only one User pageāin a specially named repo.
However you can also create multiple Organizations from a single user; Org Pages are similar in spirit to user Pages.
Project pages are served in subdirectories of the same domain (username.github.io/projectname), but each can have its own custom domain if you add a CNAME file (and arrange DNS)).
In any case, you at most get one domain per repo.
You can use a.123.com and b.123.com for different repos but I'm not sure if you can get it simultaneously with 123.com.
Unfortunately GitHub doesn't allow multiple subdomains in a single repository, so you'd need to have two repos pointing to the two different URLs.