iwantmyname and github pages sitting in a tree, K I S S I N G
If you need to throw up a static website with lightening speed… Here is one method.
I forget these steps, and if you do them wrong… it’s a PITA to fix, but if you do them right, you have a working domain in a couple minutes.
So here is the recipe:
- Register a domain with iwantmyname.com
- Create a github repo
- In Settings click Automatic Page generator
- Clone the repo and
git checkout gh-pages
- Add a file
CNAME
which contains the domain name you’ve registered - Commit and
git push origin gh-pages
- In the iwantmyname.com dashboard, find your new domain
- Click Install Application and find Github
- In the textbox, enter {username}.github.com and submit
- In a browser go to https://{username}.github.com/{repository-name}
- If it’s a 404, hit refresh after a minute or two
- Eventually, you will see the project page github automatically generated
- Try your custom domain
I usually screw up step #9 by putting the project name in that input field. Don’t do that… Put your user name there.
Iwantmyname.com will setup your DNS and give you a proper A record
to github.com.
The CNAME
file allows github to do proper virtualhost resolution and serve up your site.
DNS can take a few minutes… and then you should be in business.
You can delete all the HTML, CSS, etc in the gh-pages
branch and build your static app. After you commit and push to the gh-pages, your website will be updated in a few minutes.
This is great for prototypes and static websites that don’t change often, usually promoting some code you’ve written and host on github.
Have fun!