Github has a Pages feature gives free static website hosting. this is an intro of the steps to get started
- make an account on github
- my user name is
rubillionaire
, so replace the parts of the following URLs with your user name
- my user name is
- make a new repository on github
- https://github.com/new
- for our example, we will name it
portfolio-website
- you can make it public or private. if its public it will be listed on your github profile, and not if private.
- create your first file
- you will need to either upload an html file or write a quick one to reveal the rest of the UI. for example, you can press the "creating a new file" link, and it will drop you into a web editor for your new file.
- name it
index.html
in the text box above the main editor, and drop your initial html into the main editor. something like
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Portfolio Website</title>
</head>
<body>
<p>oh hai</p>
</body>
</html>
-
press "Commit changes..." when you are satisfied
-
write your commit message. this is typically a description of the changes made. the "commit message" box can be considered the subject line of your message, and the "extended description" can be considered the body, where you go into more detail about how and why you made the changes.
-
enable github pages
- https://github.com/rubillionaire/portfolio-website/settings/pages
- under "Build and deployment"
- choose "Deploy from a branch" as your "Source" value.
- choose "Main" as your "Branch" value, and press "save"
- you can refresh this page in a minute or two to see the new text on the page that says "Your site is live at https://rubillionaire.github.io/portfolio-website/"
-
continue to make your website
- from the "Code" tab of the interface, you can press the "+" button to create or upload new files. once a file exists, you can continue to edit it by navigating to the file, and pressing the pencil icon to edit.
- this is the edit url for the
index.html
file. - https://github.com/rubillionaire/portfolio-website/edit/main/index.html
- this is the edit url for the
- from the "Code" tab of the interface, you can press the "+" button to create or upload new files. once a file exists, you can continue to edit it by navigating to the file, and pressing the pencil icon to edit.