This template can be used to publish a RevealJS website that has been written in Quarto. It includes a GitHub Action which will convert the Quarto source to HTML and publish them via GitHub Pages.
Its a useful way of making slides portable as they are then available via the URL and naturally the slides are version controlled.
Start by clicking on the "Use this Template" button and selecting "Create a new repository". You will have to choose a name for the repository. When ready click on "Create repository from template" and this will copy all the resources into a new repository under your GitHub account ready for you to start using. You will probably want to clone the repository locally to do so.
You will have to edit _quarto.yaml
and change the site-url
to reflect your GitHub user account and the name of the
repository you have chosen for this project. Its probably wise to modify the title
and description
too. The sample
code below shows in capitals the fields you should modify.
project:
type: website
website:
title: "<INSERT_TITLE>"
site-url: https://<YOUR_GITHUB_USERNAME>.github.io/<NAME_OF_REPOSITORY>
description: "<INSERT_DESCRIPTION>"
You will need to run quarto publish gh-pages
once locally before deploying this template.
You will also need to make sure your repository action settings are configured to allow read and write permissions.
You can find this settings at https://github.com/[USER]/[repo]/settings/actions
You are now ready to create your slides by editing the index.qmd
in the root of the repository. For more information
on writing RevealJS slides in Quarto see the RevealJS guide and the
Revealjs Reference.
A pre-commit configuration is included (see .pre-commit-config.yaml
) and includes a hook for
markdownlint-cli2 (see .markdownlint-cli2.yaml
for
configuration). To use pre-commit
you will have to install pre-commit
in your cloned repository. This requires
pre-commit
to be installed on your system or within a Python Virtual Environment. To find out more about installing
and configuring pre-commit
see the article pre-commit : Protecting your future
self or refer to the official documentation.
There is a growing number of useful Quarto extensions. These are installed as
part of the publish.yml
action that is included in the template to publish the slides via GitHub pages but to use and
render them locally when developing the slides you will have to install them.
quarto install extension jmbuhr/quarto-qrcode
quarto install extension grantmcdermott/quarto-revealjs-clean
The quarto-qrcode extension is particularly useful as it simplifies generating and embedding QR Codes that link to websites in your slides.
The quarto-revealjs-clean theme is a nice (clean!) theme. For a full example of all the features of this theme see the authors quarto-revealjs-clean-demo.