Install Theme
A quick tutorial to get started
Step 1
Install
From the GitHub repo, use as a template
Go to https://github.com/nhs-r-community/quarto-nhs-theme and at the top right of the page there should be a green button that says Use this template > Create a new repository
.
Use the Owner drop-down menu, and select the account you want to own the repository.
Type a name for your repository, and an optional description.
Choose a repository visibility. Either public
for open-source/open-data work or private
. See NHS Digital’s RAP community notes on how and when to publish your code in the open.
If using a personal account or your organisation allows GitHub Apps, and you want to enalbe comments, select giscus
to enable comments. Note: you will also need to enable discussions
in your repo settings for giscus
to work.
Click Create repository from template and we are ready to edit.
Step 2
Configue
Edit the quarto.yml
file
Open the quarto.yml
file in your new repository and change nhs-r-community/quarto-nhs-theme
to {your-user-name}/{your-project-name}
.
You can also delete links to any pages you don’t need here, including the top and side bar menus.
If you want to change the bootstrap icons in the top bar menu you can change the icon perameter icon: "box-seam"
for example, with any bootstrap icon available here: https://icons.getbootstrap.com/
Step 3
Add Content
Read the contribution guide
If you want to add new pages to the docs here, please read the contribute.qmd
page for details.
Step 4
Render
First publish locally
Your new repository will not have a gh_pages
branch to render to, so we need to run the quarto publish gh-pages
command in the terminal at the project folder location.
See the Quarto publishing docs for full details.
Step 5
Publish
Setup GitHub.io pages
On your repo page on GitHub, go to settings > pages > source
and click deploy from branch
. Below that change the branch from none
to gh_pages
. In approx 60 seconds your new website should be deployed at https://{user-name}.github.io/{project-name}
.
When you push any changes to the docs/
folder from now on a tool called GitHub actions will essentially automate the preceding steps, saving a lot of time clicking. See the GitHub Actions docs for full details.