How to make a github pages for an organization - github

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

Related

Github Pages with single custom subdomain for multiple repositories (using paths)

I have multiple Github Repositories. By all of them gh-pages are enabled, and the repositories are accessible via paths for example:
username.github.io/repository1,
username.github.io/repository2,
...
Now I'm trying to create a custom subdomain docs.foo.tld and to have all my repositories gh-pages to be accessible via
docs.foo.tld/repository1
docs.foo.tld/repository2
...
I have created a CNAME entry docs.foo.tld to username.github.io
But when I'm adding this custom domain (docs.foo.tld) in repository1 repository settings on github, the gh-pages are directly accessible via docs.foo.tld, not via docs.foo.tld/repository1
How I use all this repositories in the path segments /repository1, /repository2 when using same custom subdomain for all of them.
Also to note, when I try to add this custom subdomain to repository2, I get the exception as the CNAME is already taken.
The CNAME and setting the custom domain should only be done in the .github.io repo.
Other repos should not contain a CNAME and you should not set the custom domain in the other repositories. Those settings are inherited from .github.io repo and setting them in the other repositories is overwriting the root site.
Just delete the CNAME records from the project repos, and remove the custom domain from the settings of the project repos. You may need to add the custom domain name back to the .github.io repo, but after that you should be all setup like you wish.
I had the exact same problem, but with the root account being an Organisation, not a User site (but this makes no difference). The solution is surprisingly simple (I had many trials and errors):
If not yet done, create the special Organisation/User "umbrella" Site as per the doc by creating a git repository called myorg.github.io.
In the Settings of that repo, under the "Pages" tab, choose your custom domain docs.mydomain.com. See picture:
The content of this repo is up to you. Personally I use VitePress with a small script which deploys at the root of the gh-pages branch. The script includes the creation of a CNAME file at the project root, with the content `docs.mydomain.com'
Configure your DNS zone with your Internet Provider by adding a CNAME entry pointing to myorg.github.io. (note the trailing dot – your IP may or may not add it automatically for you).
Return to the Pages Settings of your GitHub umbrella repo, and check that the subdomain is validated (it may take a few minutes).
That's all for the umbrella docs site, whose content contains links to docs.mydomain.com/project1, docs.mydomain.com/project2 etc.
Now, here is the trick: there is no trick. In all of your real projects, simply deploy your documentation. You can do so in the docs subfolder or not, in either branch, that is, in the master or gh-pages one, it doesn't seem to matter.
If any, the docs/ part of the url will be replaced by project1/ etc. There is no need for a CNAME, and no need for another custom subdomain.
Here is the config of one my project:
See how GitHub indicates under which URL the site is published.
Here is my GitHub organisation and its umbrella site
and the results:
https://docs.arcsecond.io
https://docs.arcsecond.io/cli
https://docs.arcsecond.io/oort
Bonus. If by any chance you configure your projects to have sub-subdomains (that's what I tried before finding the solution) – such as https://project1.docs.mydomain.com, the above configuration will also "work". That is, navigating to https://docs.mydomain.com/project1 will redirect you to https://project1.docs.mydomain.com
Internet is kind of amazing, isn't it?

username.github.io pages not published as github pages

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.

How to configure DNS to point to github project pages?

I have a domain name with name.com and my project's github pages is
my_username.github.io/project's name/
and I read this from their docs
CNAME does not resolve to URLs - i.e http://name.com/support - because it cannot handle special characters like : and /
so I am stuck here. Because I haven't seen many using A record, I wonder if it can be used with github pages. Thanks.
The DNS domain configuration is normally reserved for User & Organization pages, not for Project Pages.
For project page, you need to:
create a CNAME entry point to my_username.github.io. (note the final '.'!).
add a CNAME file to your project root in the gh-pages branch (with name.com as its content).
See:
"Custom domain for GitHub project pages",
"Redirecting Github project pages to a custom domain" by Zara Rahman.

Use Github pages on multiple repositories when one has a custom CNAME already?

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/

create a Jekyll GitHub blog as a subdirectory of an Organization

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/.