If you have a site called http://username.github.com and a project called projectname, do you
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
not have a http://github.com/username/projectname/tree/gh-pages
branch at all?
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.
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).
Related
I am now building portfolio to get my first tech job. I would like for any recruiters/potential employers to see my code in case they want to see how I am putting things together but I don't want anyone to be able to fork or copy my work.
How is this possible?
If I have a private GitHub repo does that mean that you can see the repo but just not the inner contents? I have looked at the GitHub documentation already.
If I have a private GitHub repo does that mean that you can see the repo but just not the inner contents?
If you can access a repository (public or private), that means you can read its content and/or clone it (and read its content locally)
You would need to setup a private repository dedicated to show your file
names, meaning a collection of files with:
dummy content
the exact names and folder structure than your actual projects.
That way, you can share to select collaborator access to that "showcase" repository, without compromising the sensitive content of your actual project repositories.
The documentation for geoplot is rendered via GitHub Pages, off of the gh-pages branch of its repository. However, some of the images on the following page fail to render: https://residentmario.github.io/geoplot/quickstart/quickstart.html.
Take as an example the image QuickStart_21_2.png and the image QuickStart_10_1.png. Both of these files are located in the _images folder in the gh-pages branch of the repository, but whilst the former is served correctly, the latter serves a 404.
Why would these files not be rendered?
This turned out to be due to some interesting dynamics around filename casing conventions and (probably) some kind of intermediate cache at GitHub. More details here: https://github.com/ResidentMario/geoplot/issues/175.
I have recently started using a GitHub repository to work on a personal web project, since GitHub allows me to host a website via GitHub Pages.
Is there a way to view a separate branch of this web project in my browser, just like I can view the master branch by accessing the URL [username].github.io? Otherwise, I find it difficult to really make use of the GitHub workflow since I'd have to commit changes to the website directly to the master in order to view them in the browser rather than reviewing changes in a separate branch.
Not that I can see. You can only view pages from:
gh-pages branch
or since August 2016, from master, or master:/docs
But each time, GitHub pages will reflect the content of one source, not giving an easy way to switch between branches.
A workaround would be to have a separate account, for a separate [username-review].github.io domain, allowing you to publish first in that second site, before pushing to the first one.
I wrote a readme.md file for my git page. Now I wanna advertise for my program on some forums. I don't want to always update every single forum entry, so I though I just link to my git repo and they people can get the information about my tool just by reading the readme (in the future, all I need to is update this single file).
However, the source files are placed on the top and 99% of the people that will visit my repo won't have a clue about code. Therefore it would attract people more if they just see the readme.md instead of code (which might scare them away "oh I don't get it and it looks to hard to get a fast overview leave").
Is there a way to switch the code section with the readme.md section?
Is there a way to switch the code section with the readme.md section?
There is not for now in a classic GitHub repo.
One workaround would be to limit the number of top elements to a minimum, moving all those folders into a src/ or project/ subfolder.
That would make the code section very short, and the README (just below) that much more visible.
A different repo, as commented by the OP TrudleR, is available with GitHub pages, like a project site using the gh-pages branch.
For that approach, I like to declare that branch as a submodule in the master branch of the same project repo: that way, I can update my project pages while updating the sources of the project itself.
Update August 2016: Simpler GitHub Pages publishing now allows to keep your page files in a subfolder of the same branch (no more gh-pages needed):
Those pages can be in a subfolder of the same branch now.
Is there any document about the whole process of building my blog with github pages?I have read the official introduction,but less help.
There are two different ways to create a GitHub page:
Create a repo called YOUR_USERNAME.github.io
Create a branch called gh-pages on a standard repo
Later, you must put some HTML files and commit. You will see the page running. You can also use Jekyll which has a template engine but it's a bit hard to start with it.