Show it to the World! Build a Free Art Portfolio Website on GitHub.io in 20 Minutes!
Practical walkthroughs on machine learning, data exploration and finding insight.
GitHub Walkthrough Code:
A Simple Hello World WebsiteWe'll start with a ‘Hello World’ website to get us started. Create a GitHub account if you don't already have one:
Now start a new project:
If this is not your first project, then select 'New repository'. Create your website’s main repository and add the repository name in the following format – your GitHub repository name followed by '.github.io', i.e. YOUR-REPO-NAME.github.io
Don’t forget to check 'Initialize this repository with a README’ as this will create a place holder file to help your project get started (you can always delete afterwards if you don’t need it).
Select ‘Create new file’, name it ‘index.html’ and add the following code:
<HTML> <BODY> Hello World! </BODY> </HTML>
It should look like:
GitHub has its own simple editor where you can enter and tweak your code directly on the site. Usually you will clone a repository onto your local machine and work from that vantage point. Of course, working off a local machine has many advantages starting from being able to use your own integrated development environment and having off-line access to your code. But being able to run things directly from the site offers simplicity, speed and code-from-anywhere advantages and that is what the cloud is all about.
Once you’ve entered all the HTML code, scroll down to the bottom and enter a comment explaining what you just did. Though this is optional, it is definitely recommended. This is an important tenant of source control; keeping a clear summary of all actions done to the code base will empower you to know what you, or anybody else did, throughout of the history of your project. GitHub offers the ability to ‘roll-back’ the code to any previously saved version – very handy for circumventing those new pesky bugs you just can’t find…
Say Hello to the World
And click the ‘Commit new file’ and that’s it! You now have an extremely simple page on the Internet! Your URL should look like:
https://YOUR-REPO-NAME.github.io/index.htmlIt may take a few minutes to propagate and be accessible but keep trying!