Automatically create a simple website for a GitHub project using the file as the home page. Optionally, creates a CNAME file to host the site on a custom domain.



Use ghsite to generate the appropriate web files, then you'll checkout the gh-pages branch and commit those files.

php ghsite.php "(app-name)" {app-url}

ghsite will create a ./docs directory and store your index there. On GitHub you'll need to setup the repo to use this directory for gh-pages.

Setting up GitHub

Setting up DNS

Linking to images

One strategy for including images in your README is to store them in the ./docs/image folder and include those using a direct link such as This will allow the image to work on both GitHub and on the site generated by ghsite and hosted on GitHub because both point to the site itself. It also prevents vendor lock-in if you opt to switch from GitHub to another hosting provider in the future because everything points to your own domain name and not to a GitHub domain.


This project is distributed under a MIT open source license.


created with ghsite