How to host sub project/another webapp on GitHub pages in a single account. I mean more than one. For ex: By default it is username.github.io but how can I host multiple like username.github.io/site2,username.github.io/site3, username.github.io/site4
https://help.github.com/articles/user-organization-and-project-pages/
Are you using "User Pages"? There is also "Project Pages" that can do exactly what you are looking for.
Say you have a repo my_repo, you can have a page with address http(s)://username.github.io/my_repo. Unlike User Pages repo(username.github.io), you may not want to use your master branch for Project Page. you have a couple more options - using only docs directory in your master branch, or use gh-pages branch.
This link kindly guides how to use.
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 uploaded my files to github, checked off readme, commit changes, selected masterbranch, and I got the following message as I scrolled down the page: Your site is published at https://tanishav842.github.io/Recipes/ but there is nothing there except for the word Recipes, which appears at the end of the site address that had been established for me through github. What did I do wrong?
Well, Tani, to have your own page hosted by GitHub Pages it need to be stored in one of the following places
In a public repository named <your-github-username>.github.io
Under a docs folder in master branch of any public repository you own
In gh-pages branch of any public repository you own
It means your Recipes repository are pretty much there.
Just copy your master branch content to a new branch named gh-pages and push it:
git checkout -b gh-pages
git push -u origin gh-pages
In addiction, as commented Edric, it would be cool to have your pretty nice stuff added to your page.
By now, I suppose GitHub is using your README.md that just have the word Recipes there!
Anyways, Here you can find a bunch of details about Working with GitHub Pages and also some step-by-step tutorials to learn how to do it properly
Hope this can help you!
Hosting a site is better supported by the GitHub application. Try following these steps to see if they help:
Download either GitHub for Mac or GitHub for Windows, depending on your operating system. Open the app and log in using the account you just created.
(On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.
Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the "Push to GitHub?" box is checked.
Move your website's files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called "index.html", and it must exist in the top-level directory.
Back in the GitHub application, you should see your files in the left column. Make sure they are all checked. If so, enter a message in the text box called "commit summary", something like "initial commit." Then, click the commit button.
Click the "Publish repo" button in the top right corner.
Give it about 10 minutes, then check your-username.github.io. Your website should be there!
Here's the reference link:
https://gist.github.com/TylerFisher/6127328
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 organization where I publish a webpage from the repository orgname.github.io. Of course, I have several project repositories where I'd like to host documentation about those projects. This is all possible through GitHub Pages.
However, I'm not sure how to synchronize the configuration of the organization page with the project pages. I want the website to look the same whether I'm at
http://orgname.github.io or if I'm at http://orgname.github.io/project.
What can I do to keep the Jekyll-based configuration in sync?
This is the solution we've come up with:
Create a repository to contain the Jekyll configuration, jekyll-website.
Fork/copy the repository to the repository <orgname>.github.io.
In every project, create a git subtree as the docs directory.
Whenever you need to make change to the look/design of the webpage, do it in jekyll-website, then pull those changes into <orgname>.github.io and all the project subtrees. This is a little bit of work whenever you need to make changes to the website, but it gets the job done.
Since the Github pages sites are hosted in the gh-pages branch of their respective repos, they are independent from each other and the project pages.
I'm assuming your content will be unique for each repo, so you're asking about syncing the theme/structure etc, which as far as I know that cannot be synced. I would recommend choosing a Jekyll theme for all of your sites and stick to editing content.
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/