Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Structuring github pages

Tags:

github

If you have a site called http://username.github.com and a project called projectname, do you

  1. use http://github.com/username/projectname/tree/gh-pages to a) mirror your master branch, or b) create a webpage describing the project (to be reflected in http://username.github.com/projectname), or
  2. not have a http://github.com/username/projectname/tree/gh-pages branch at all?
like image 858
hatmatrix Avatar asked Mar 08 '11 06:03

hatmatrix


People also ask

What should we be careful of before deploying to GitHub Pages?

Even if the repository is private, the site is still publicly available on the internet — so the developer should always check for any sensitive data before deployment. Naturally, sending sensitive data (e.g. passwords or credit card information) is also unsafe.

Is GitHub Pages good for production?

Yes, Github Page is a great place for you to host a static website. All you need to do is to purchase a domain and configure the DNS. Basically, it is a free hosting service I think you can put it that way. This is absolutely awesome.


2 Answers

What I understand of gh_pages as presented in pages.github.com, is that it is for:

  • creating a separate branch: your repo has now two roots (one for master and all the dev branches, one for gh_pages for GitHub published content).
    The root for gh_pages branch has a special treatment when managed by GitHub.
  • "publish content to the web": and that can be any content you want.
    So if you don't need a full space for documentations, you can just go with a readme.md file or an index.html page ("user page").
    help.github.com itself is organized as documents within a gh_pages branches.
like image 136
VonC Avatar answered Oct 12 '22 14:10

VonC


I usually don't have a project page at all (most of my public github projects are mirrors of other open-source projects), but on the ones where I do, I have a web page describing the project.

Although I just had an idea: might be neat to make a project's gh-pages branch contain a highlighted, hyperlinked version of your code (run it through Doxygen and have it only generate cross-referenced source instead of documentation, for example).

like image 25
JonathonW Avatar answered Oct 12 '22 14:10

JonathonW