World map

 

BM: Baca dalam Bahasa Melayu

World 9: Power Tools

GitHub Pages

You will learn: how to turn your repo into a website.

The problem

Your diary site works on your laptop. Your friend in Kuching wants to see it. Do you send a zip file?

Pick one answer.

Watch

Tap each point on the timeline.

GitHub Pages: Hosting that turns plain files in your repo (HTML, CSS, JavaScript) into a website. turns files in your repo into a website. It hosts plain files only: HTML, CSS and JavaScript. No server code, no database.

Try it

Switch Pages on. Put the steps in order.

First step at the top. Put these in order. Use the arrows, or drag.

  • Click Save, then wait a few minutes
  • Go to Settings, then Pages
  • Open your repo on GitHub
  • Choose main and the root folder
  • Pick Deploy from a branch

Predict

Your username is aina-codes. The repo is diary. Where does the site live?

Pick one answer.

Try it

Pages can use a Markdown file as your home page. Write one. Add a title and a link.

Add a # title line and a link.

Preview

Hi! This is my diary.

0 of 2 goals done

Check

Can Pages host it? Sort each one.

Drag a card into a box. Or tap the card, then tap the box.

      Try it

      Real mission: switch on Pages for your diary repo. Pages sites are public, so keep secrets out. Then check it here.

      Check it on GitHub

      Your username is sent only to api.github.com.

      • Your diary repo is publicNot checked yet
      • GitHub Pages is onNot checked yet

      You did it!

      You can now publish a website from your repo.

      Go deeper (optional)

      Name a repo your-name.github.io, and it becomes your main site, at the root. Pages looks for index.html, index.md or README.md first. You can also publish with a GitHub Actions workflow. Custom domains work too. Changes can take up to 10 minutes to show.