Add pages and navigation
Now that you have a basic website, you might want to add pages to it, and a menu for navigation.
Add a page
In VS Code, create a new text file and save it with a name ending in .qmd
. Put a YAML section at the front. You could simply copy it from an existing page, or do something like this which is an example YAML section from this very page you are reading right now:
---
title: "Add pages and navigation"
author: "Darren Irwin"
date: "5/21/2023"
execute:
echo: true
format:
pdf:
keep-tex: false
monofont: "JuliaMono"
html:
code-fold: true
jupyter: julia-1.9 ---
(We don’t actually need the jupyter: julia-1.9
line for this page, since no Julia code on it, but I’ve left it there because your page might have Julia code.)
Make sure you give your page an appropriate title in the YAML block, and then add content to this page. When ready, click “Render HTML” and see the rendered version of your page.
(If you have a bunch of .qmd
files that you have made changes to and you want to render them all–for instance before committing and synchronizing with Github–you can do this in one step by using a Terminal window and typing quarto render
while in the project directory. This might take some time so be patient and let it complete before continuing. It will not show a preview in VS Code, but the Terminal window will update you about completion.)