1 Make a github account
Github is a place where people store code projects. It's used for open source development because people can collaborate on projects, or take an existing project and adapt it. Github relies on git, a version control software (version control = keeping track of changes to files), but you don't have to worry about that yet - just know that git and github are different things. Also, while Github is great for code, it's not only for developers!
2 Fork my repo, simple-website-template
A repo or repository is just another word for project, & fork is just another word for copy. The cathydeng/simple-website-template repo is the code for this website. To fork a repo, click the fork button on the top right.
A few things happen when you fork simple-website-template:
gh-pages
branch, github will look for whatever is in index.html
& host it at https://[YOUR USERNAME].github.io/[YOUR REPO NAME]master
, and you'll have to create the gh-pages
branch. Within a repo, you can create however many branches you want.gh-pages
branch in cathydeng/simple-website-template, all forks of the repo will also have a gh-pages
branch3 Tweak stuff to your heart's content
HOW TO EDIT FILES
Within your simple-website-template repo on github (https://github.com/[YOUR USERNAME]/simple-website-template), you'll see index.html
, a folder called css/
with custom.css
inside it, and README.md
(whenever a repo has a README.md inside it, github displays it on the repo page below the file list). You can click the files to see their contents, and click the icon to edit your code, in your browser!
HOW TO 'SAVE' YOUR CHANGES
When you're happy with what you have, you'll need to commit your changes. Think of committing as saving. Each time you make a commit on github, you can put a message saying what you did - in the future, you can see each of your commits, and how your files changed (version control! yay). When you commit, see step 4!
PREVIEWING YOUR CHANGES
You'll probably want to see what your website will look like, without blindly tweaking html/css - after all, coding is mostly an exercise in trial & error. This is where codepen comes in - coding in a browser! You can create a new 'pen', copy over your html & css, and see the result. Try deleting everything within the <body>
tag in the html and making something completely new?
4 See the changes on your website! Instant gratification!
https://[YOUR USERNAME].github.io/simple-website-template