Skip to main content

Private Preview

How the Pieces Fit Together

Quarto turns your source file into HTML. GitHub stores both. The private preview route stops there: course staff open the committed HTML or render the report in a fresh Codespace. GitHub Pages is an optional last step that turns the rendered HTML into a public website.

The publishing workflow: edit report.qmd, render with Quarto, preview the HTML, then commit and sync. A privacy check routes to a private preview by default, or optionally to a public GitHub Pages site.

Default Path

For this course, publishing usually means creating a rendered, shareable output for grading or private review. Public publishing is optional and should only happen after privacy and safety checks.

The default publishing route is a private preview unless the project passes privacy and stewardship checks for public sharing.

Private preview means:

  • the report renders to HTML;
  • the rendered file is committed if the assignment asks for it;
  • the repository link is submitted on Canvas;
  • course staff have access if the repository is private.

This is enough for A9 and M3.

NoteCommit required rendered artifacts

The submission list is authoritative. If an assignment or milestone explicitly requires a rendered HTML or PDF, commit it with the source so staff can inspect the work. Do not add global *.html or *.pdf patterns to the course workspace .gitignore.

Pre-Commit Privacy Checklist

Run this check every time, before you commit and sync:

  1. Open the Source Control panel and read the list of staged files.
  2. Unstage anything that should not go online: raw restricted or row-level data, credentials or tokens, .RData workspaces, OS junk such as .DS_Store, and unrelated generated files. Keep every rendered artifact named in the assessment brief staged.
  3. Open .gitignore and confirm it covers secrets, machine-specific files, and temporary support folders without globally excluding required HTML or PDF. If an unwanted file keeps reappearing, add a narrow rule for that file type or path.
  4. Skim the rendered HTML one last time for private URLs, tokens, or row-level records in printed output.

If any item fails, fix it before syncing. It is much easier to keep a file out of Git than to remove it after it has been pushed.

When Public Publishing Is Safe

GitHub Pages or another public preview is appropriate only when:

  • the data are public and allowed to be shared;
  • no restricted raw data are committed;
  • no sensitive row-level records appear in outputs;
  • no private URLs, tokens, or credentials appear;
  • the group agrees that public sharing fits the project context;
  • the README explains data source and sharing limits.

If any item is uncertain, keep the preview private.

WarningGitHub Pages sites are always public

A GitHub Pages site is public on the open internet even when the source repository is private. Turning on Pages publishes the rendered content for anyone to see. If your project must stay private, the “private equivalent” is course staff previewing in a fresh Codespace or reading the committed HTML in your private repository — not a Pages site.

GitHub Pages as an Optional Extension

WarningDemo only — not graded

This pathway is a demonstration only. It is not graded and not required. Using it for graded work requires instructor approval first. The supported, graded pathway in this course is the Quarto workflow.

GitHub Pages is useful for public portfolios, but it is not required for every student project. Public publishing should never outrank privacy, data-use rules, or stewardship obligations.

If your group uses GitHub Pages, record:

  • the public URL;
  • the commit hash;
  • what was checked before publishing;
  • what data or outputs are intentionally excluded.

Private Preview Checklist

For the default route, record:

  • report path;
  • rendered HTML path;
  • repository link;
  • latest commit hash;
  • who has access;
  • any files intentionally excluded from public sharing.

Common Errors and Fixes

Most rendering and publishing problems this week have boring causes. Check this table before asking for help.

What you see Likely cause Fix
quarto: command not found The terminal opened before Codespace setup finished Open a new terminal and retry; if it persists, rebuild the Codespace
Render stops with red text naming an R package The package is not installed in this environment Read the first error line for the package name, then follow the week’s setup steps; do not change the environment beyond that without asking
cannot open file or ... does not exist for a CSV Absolute path, or wrong working folder Make the path relative to the project root and re-render (see the path check on the Assignment 9 and M3 page)
Render finishes but no preview opens The preview pane did not launch Find the .html file named in the Output created: line, right-click it in the Explorer, and choose Download or Open Preview
Citations appear as [@key] in the output Bibliography file not found, or key misspelled Check the bibliography: path in the YAML header and the key spelling in references.bib
Pages site shows a 404 or old content Pages is not enabled, or is still deploying Wait a few minutes and refresh; check the repository’s Settings → Pages; remember Pages is optional

If the fix is not obvious after a careful read of the first error line, copy the exact error message into your help request.

Final Portfolio Connection

The same decision returns in the final portfolio. Public repositories can be excellent portfolio artifacts, but private repositories are the right choice when sharing would create privacy, stewardship, or licensing risk.