13 Publishing a Quarto project
Once you have created your Quarto project, you will need to publish the rendered output so that others can access it. Quarto supports several publishing options, but for most teaching-related content at the University of Bath, publishing to Moodle is the recommended approach.
13.1 Publish to Moodle
For teaching materials intended for University of Bath students, we recommend publishing your Quarto website or mini-site through Moodle.
Benefits include:
- Available directly to students through Moodle.
- Included within the University’s Moodle archive processes.
- Covered by established institutional retention arrangements.
- Access controlled through Moodle course permissions.
- No requirement for students to visit external websites.
Quarto websites generate a collection of HTML, CSS, JavaScript, image, and supporting files. These can be hosted within Moodle as a self-contained mini-site.
13.1.1 Moodle publishing workflow
- Render your Quarto project.
- Locate the generated
_siteor output folder. - Create a ZIP archive containing the entire published site and all supporting files.
- In Moodle, create a File activity (not a Folder activity).
- Upload the ZIP file and use Moodle’s Unzip option.
- Set the site’s
index.htmlfile as the Main File. - Save the activity and test that the site launches correctly.
The University of Bath Moodle currently has a 50 MB upload limit for file activities. If your published site exceeds this size please contact tel@bath.ac.uk
Detailed step-by-step guidance is available at Publishing an HTML mini-site to Moodle
13.1.2 Updating a Moodle-hosted site
When you make changes to your Quarto project:
- Re-render the site locally.
- Create a new ZIP archive of the updated output.
- Replace the all existing files in Moodle.
- Ensure the correct
index.htmlfile remains set as the Main File.
13.2 Public Resources: GitHub Pages
If your Quarto content is intended for public access, GitHub Pages is an excellent option (no Moodle authentication required).
Advantages include:
- Free hosting.
- Integrated version control through Git.
- Collaborative authoring workflows.
- Automatic publishing when content is updated.
- Suitable for open educational resources, documentation, and public-facing guides.
Github pages looks for html either in a docs folder or the root of the repo. It’s a good idea to update your yaml accordingly:
project:
type: book
output-dir: docs