2 Quarto Books and GitHub Pages
3 Quarto Books and GitHub Pages
3.0.1 Search Engine
- Search “Quarto Books”
- Go to https://quarto.org/docs/books/
3.0.2 At the Terminal
- Created a folder called “work”.
- I ran the following in the terminal:
Terminal
quarto create project book mybook
- I will be prompted for a title
- I used “Python Stack”
- I will be prompted if I want to open in
vscode
- I accepted.
3.0.3 In VS Code
- Generating the book project automatically generated a
_quarto.yml
file.
_quarto.yml
project:
type: book
book:
title: "mybook"
author: "Jane Doe"
date: "8/18/2021"
chapters:
- index.qmd
- intro.qmd
- summary.qmd
- references.qmd
bibliography: references.bib
format:
html:
theme: cosmo
pdf:
documentclass: scrreprt
epub:
cover-image: cover.png
- I updated the file to be as follows, with only two chapters:
_quarto.yml
project:
type: book
book:
title: "Python Stack"
author: "Prof. Calvin"
date: "1/9/2025"
chapters:
- index.qmd
- VSCode.qmd
- Books.qmd
format:
html:
theme: cosmo
pdf:
documentclass: scrreprt
3.0.4 Creating Content
- I view the initial book by opening a .qmd file and using
Preview
- By default on Windows,
Crtl+Shift+K
- By default on Windows,
- I include some content in my new .qmd files.
- For me, this was a prior lecture “Python, VS Code, Quarto”
- For me, this was this .qmd on books & pages.
- I use a full
render
after creating content to ensure everything is up-to-date.
Terminal
quarto render
4 On GitHub
Follow this guide
4.0.1 Publish Content to GitHub Pages
- Search “Quarto Publish”
- Go to https://quarto.org/docs/publishing/github-pages.html
- Read the following:
an important pre-requisite: you need to have a Git repository on your local machine that is synced to GitHub.
4.0.2 Create a Git repository
- Navigate to https://github.com/
- Select the Green Button
🖥️New
- It will take you to this url: https://github.com/new
- Do some setup:
- Select an owner
- I am @cd-public
- Name the repository
- I’ll do “python-stack-book”
- Add a description.
- “Demo quarto book on the Python tech stack.”
- Select an owner
- Select the Green Button
Create repository
4.0.3 Create a New Repository on the Command Line
- Navigate in the file system to your book directory.
- You will need to set up Git at the command line.
4.0.4 Follow the Instruction from Quarto
- Return to https://quarto.org/docs/publishing/github-pages.html
- Follow instructions from Render to
docs
up toPublish Command