Your FREE website

on GitHub

Tony Su


December 12, 2019

What is Github?

Free for public use, cost for private use

Today, owned by Microsoft

Utilizes Git as its versioning file system

Primarily used by Developers

Original concept innovatively combines code repository with social media access

Will serve static websites for free!


  • Github create a brand new website
  • Github modify and existing website
  • wget scrape a website
  • HTTrack scrap a website

Topics to be covered

Create a brand new website

  • Sign up, create an account on
    Login to test
  • Install necessary and desired tools, components

Following is openSUSE, but use whatever package manager for your own distro

zypper in git mlocate tree lxterminall httrack
  • Set up git client global properties
git config --global ""
git config --global "Github Username"

Create a brand new website 

  • Create a new repository on
  • Clone the website to your local machine
git clone [repository URL]
  • Create a gh-pages branch
git checkout --orphan gh-pages
  • Remove local files (You will likely have at least a file from the Main branch)

Page 2

git rm -rf .
  • Create or paste some content

Create a brand new website 

  • Create a new repository on
  • Upload and set target to gh-pages (required only once unless and until switch to another branch)
git push --set-upstream origin gh-pages

Page 3

Modify an existing website 

  • Fork the website
  • Clone a local working instance of your forked copy
git clone [repo url]
  • If your website was cloned awhile ago, update your local repo
git update
  • If you don't see website files, you may need to change to the gh-pages branch
git checkout gh-pages
  • Make your changes.


  • Stage your updated changes for uploading
  • The following actually uploads. 
git add .
  • Commit your changes and create an annotation so people will know what these changes are without inspecting your code directly
git commit -am "A comment"
git push
  • If for some reason the above complains about the branch, then

Unless you configured SSH or multi-factor authentication, you will be prompted for your Password (and maybe your Username if the global setting didn't take)

git push origin gh-pages


  • Check your handiwork.

Currently, for the KPLUG "website" repository, the URL is

Page 2

Website scraping

  • Wget
wget --recursive --level=5 --convert-links --page-requisites

Scraping can also mean extracting content from a web page. Today we are simply doing web duplication, but also in a way that translates links so that the website can be read without a webserver.

  • HTTrack

Some Additional Info


Free Website on Github

By Tony Su

Free Website on Github

  • 282
Loading comments...

More from Tony Su