GitHub Pages
Learning Competencies
By the end of this, you should be able to:
- Fork an existing repository
- Practice making edits to HTML and CSS
- Understand what GitHub pages are
Summary
Today you'll practice using HTML and CSS to make a website your own, as well as learn how to deploy it live to the internet if you haven't done so already. You'll do so using a service called GitHub Pages. You'll fork a repo, clone it locally, change some files and push it up to GitHub Pages.
Time Box
| Application | Time |
|---|---|
| Fork and setup GitHub Pages | 5 minutes |
| Personalise your repository | 40 minutes |
| Reflect | 15 minutes |
Introduction
The purpose of the My Collection site is:
- To continue honing your skills in GitHub workflow
- To deploy a simple site to the internet
- To practice HTML and CSS
A functional appearance is what we're aiming for. Try out what you're curious about when it comes to HTML and CSS, make it your own, but don't spend more time than necessary. The goal of this site ultimately is to have something that is functional, it should work as a website. That means all the links actually link somewhere and be available on the internet.
As always, keep your learning objectives in mind and hone your practice. Follow the timebox suggestions and reach out to the community if you feel blocked.
Fork the My Collection Repo
- Fork the My Collection repository into your own personal GitHub.
Origin: https://github.com/dev-academy-foundations/my-collection
Destination: https://github.com/YOUR-GITHUB-USERNAME/my-collection
Figure 1: Fork Repo from origin

Figure 2: View of Forked repo in destination

Clone Repo
Important! On your computer, do not clone into an existing repo (e.g. reflections).
Cloning to the same parent directory is fine, for example:
Example: Good
User/Kiri/Dev-Academy/reflections
User/Kiri/Dev-Academy/ko-wai-koe
User/Kiri/Dev-Academy/my-collection
Example: Incorrect
User/Kiri/Dev-Academy/ko-wai-koe/my-collection
- Navigate to the directory where you want to clone your
my-collectionrepo - Clone it
Open the files to work on them
- Navigate INTO the
my-collectionrepo usingcd. - Open the whole folder with VS. (
code .) - In your terminal use
npx viteto start the website and view it in your browser athttp://localhost:5173
Make your changes
- Decide what collection you would like to show (favourite movies, books, games?)
- Make changes to the HTML files (create more if you like!)
- Use images of your own (you can put them in the 'public' folder and change the
<img>tag src attribute to the new filename) - Update the
style.cssCSS file to personalise the colours / design
Commit and Push
- Commit and Push the changes to your GitHub
- Navigate to your
my-collectionrepo on GitHub - Enter the settings menu for that repo and click on the Pages tab in the left sidebar
- Under the
Sourceoption, select the main branch - You can check out your live site by visiting
http://[USERNAME].github.io/my-collection
Reflect
Open my-reflections-sprint-1 and answer the questions following GitHub Pages.
Add, commit and push! Share your live collection if you like! http://[USERNAME].github.io/my-collection