GitHub Pages

Hosting your repository content on the web

Jonathan Peake

What is GitHub Pages?

  • Turn your repository into a website

  • Share your project, resume, portfolio, documentation, or even a blog with the world

  • Takes content from main branch and publishes to a website

Why use GitHub Pages?

How to turn on GitHub Pages

Access GitHub Pages in the Settings menu under Code and automation

How to turn on GitHub Pages

Make sure Source is set to “Deploy from a branch”

Select the branch to deploy from (usually this is main)

How to turn on GitHub Pages

Select the folder to deploy from (/(root) is the main directory of the repository)

Save your changes

How GitHub Pages recognizes content

  • A GitHub Pages “action” runs after every commit

  • Any HTML file in the source directory is indexed and can be linked to

  • Any Markdown file will be rendered and indexed

  • But not Quarto…

    • Need to render to HTML first

    • GitHub Actions can help us with this

Theming a basic page

Add a file called _config.yml to your repository

Add the line theme: jekyll-theme-slate to your file

Theming a basic page

Add a file called _config.yml to your repository

Add the line theme: jekyll-theme-slate to your file