Github Readme File Example

  

To add an example we will use roxygen2 and add the following to the roxygen2 code we. Markdown is the default file type github uses to create a README.

The GitHub Pages feature allows you to publish content to the web by simply pushing content to one of your GitHub hosted repositories. There are two different kinds of Pages that you can create: User Pages and Project Pages.

User & Organization Pages

This tutorial teaches you GitHub essentials like repositories, branches, commits, and Pull. These changes will be made to just the README file on your. In this tutorial, you will learn to read / load properties file from classpath in Java by using load method of java.util.Properties class and getResourceAsStream method of ClassLoader class.

Let’s say your GitHub username is “alice”. If you create a GitHub repository named alice.github.com, commit a file named index.html into the master branch, and push it to GitHub, then this file will be automatically published to http://alice.github.com/.

On the first push, it can take up to ten minutes before the content is available.

The same works for organizations. If your org account is named “PlanEx”, creating the repo planex.github.com under the org will publish pages to http://planex.github.com/.

Real World Example: github.com/defunkt/defunkt.github.com → http://defunkt.github.com/.

Project Pages

Let’s say your GitHub username is “bob” and you have an existing repository named fancypants. If you create a new root branch named gh-pages in your repository, any content pushed there will be published to http://bob.github.com/fancypants/.

In order to create a new root branch, first ensure that your working directory is clean by committing or stashing any changes. Then create a new branch named gh-pages which is independent and totally disconnected from all the other branches. This branch will store all your files for your project’s webpage.

After running this you’ll have an empty working directory (don’t worry, your main repo is still on the master branch). Now you can create some content in this branch and push it to GitHub. For example:

On the first push, it can take up to ten minutes before the content is available.

Atomic number 21. Atomic number 21 - a white trivalent metallic element; sometimes classified in the rare earth group; occurs in the Scandinavian mineral thortveitite Sc, scandium metal, metallic element - any of several chemical elements that are usually shiny solids that conduct heat. Atomic Number 21. Atomic Number 21 is belong to element of Scandium. Chemical symbol for Scandium is Sc. Number of protons in Scandium is 21. Atomic weight of Scandium is 44.955908 u.

Real World Example: github.com/defunkt/[email protected] → http://defunkt.github.com/ambition.

Project Page Generator

If you don’t want to go through the steps above to generate your branch, or you simply would like a generic page, you can use our page generator to create your gh-pages branch for you and fill it with a default page.

First navigate to your project and click the ‘Admin’ button on the top right

Then check the ‘GitHub Pages’ check box.

A pop-up will appear. Click on the ‘Automatic GitHub Page Generator’

After your page is generated, you can check out the new branch:

Github Readme File Example

Sample Readme File Github

In addition to supporting regular HTML content, GitHub Pages support Jekyll, a simple, blog aware static site generator written by our own Tom Preston-Werner. Jekyll makes it easy to create site-wide headers and footers without having to copy them across every page. It also offers intelligent blog support and other advanced templating features.

Every GitHub Page is run through Jekyll when you push content to your repo. Because a normal HTML site is also a valid Jekyll site, you don’t have to do anything special to keep your standard HTML files unchanged. Jekyll has a thorough README that covers its features and usage.

As of April 7, 2009, you can configure most Jekyll settings via your _config.yml file. Most notably, you can select your permalink style and choose to have your Markdown rendered with RDiscount instead of the default Maruku. The only options we override are as follows:

If your Jekyll site is not transforming properly after you push it to GitHub, it’s useful to run the converter locally so you can see any parsing errors. In order to do this, you’ll want to use the same version that we use.

We currently use Jekyll 0.10.0 and run it with the equivalent command:

As of December 27, 2009, you can completely opt-out of Jekyll processing by creating a file named .nojekyll in the root of your pages repo and pushing that to GitHub. This should only be necessary if your site uses directories that begin with an underscore, as Jekyll sees these as special dirs and does not copy them to the final destination.

If there’s a feature you wish that Jekyll had, feel free to fork it and send a pull request. We’re happy to accept user contributions.

Real World Example: github.com/pages/pages.github.com → http://pages.github.com/.

GitHub Pages allows you to direct a domain name of your choice at your Page.

Readme git examples

Let’s say you own the domain name example.com. Furthermore, your GitHub username is “charlie” and you have published a User Page at http://charlie.github.com/. Now you’d like to load up http://example.com/ in your browser and have it show the content from http://charlie.github.com/.

Readme Git

Start by creating a file named CNAME in the root of your repository. It should contain your domain name like so:

Push this new file up to GitHub. The server will set your pages to be hosted at example.com, and create redirects from www.example.com and charlie.github.com to example.com.

Github Readme Sample

Next, you’ll need to visit your domain registrar or DNS host and add a record for your domain name. For a sub-domain like www.example.com you would simply create a CNAME record pointing at charlie.github.com. If you are using a top-level domain like example.com, you must use an A record pointing to 207.97.227.245. Do not use a CNAME record with a top-level domain, it can have adverse side effects on other services like email. Many DNS services will let you set a CNAME on a TLD, even though you shouldn’t. Remember that it may take up to a full day for DNS changes to propagate, so be patient.

Real World Example: github.com/mojombo/mojombo.github.com → http://tom.preston-werner.com/.

Github Readme File Example Free

Github readme file example online

If you provide a 404.html file in the root of your repo, it will be served instead of the default 404 page. Note that Jekyll-generated pages will not work, it must be an html file.

Readme Git Examples

Real World Example: http://github.com/tekkub/tekkub.github.com/blob/master/404.html → http://tekkub.net/404.html.