htlin222

quarto-netlify

Quarto + Netlify Deployment Setup. Use when setting up a Quarto project for Netlify deployment with RevealJS presentation support.

htlin222 79 4 Updated 7mo ago
GitHub

Install

npx skillscat add htlin222/dotfiles/quarto-netlify

Install via the SkillsCat registry.

About this skill

We need to produce a 2-3 sentence plain-text summary, objective, factual, no marketing, no superlatives, no calls to action. Must be at most 60 words. No quotes, no markdown, no bullet points, no headings. Just plain text. Summarize: skill sets up Quarto project for Netlify deployment with RevealJS support. It provides configuration files (_quarto.yml, netlify.toml, .gitignore, Makefile) and instructions for building and deploying. Use when deploying Quarto sites to Netlify, especially RevealJS presentations. We need 2-3 sentences. Let's craft ~45 words.

SKILL.md

Quarto + Netlify Deployment Setup

Set up a Quarto project for Netlify deployment with RevealJS presentation support.

When to use

  • When deploying a Quarto project to Netlify
  • When setting up RevealJS presentations with Quarto
  • When configuring automated builds for Quarto sites
  • When you need the proven netlify.toml configuration for Quarto

Instructions

_quarto.yml Configuration

project:
  type: default
  output-dir: _site # Keep root clean, output to _site/
  render:
    - index.qmd

format:
  revealjs:
    output-file: slides.html
    theme: [default, custom.scss]
    slide-number: true
    # Add plugins as needed

netlify.toml (Proven Pattern)

[build]
  command = """
    curl -LO https://quarto.org/download/latest/quarto-linux-amd64.deb && \
    dpkg -x quarto-linux-amd64.deb . && \
    export PATH=$PWD/opt/quarto/bin:$PATH && \
    quarto render
  """
  publish = "_site"

[[redirects]]
  from = "/"
  to = "/slides.html"
  status = 302

Key points:

  • Use .deb package with dpkg -x extraction (not tar.gz)
  • Extract to current dir . (not a subfolder)
  • Path is $PWD/opt/quarto/bin (not nested)
  • Just quarto render (uses _quarto.yml automatically)

.gitignore

# Quarto output
/.quarto/
/_site/

# Node modules
node_modules/

# OS/Editor
.DS_Store
*.swp

Makefile

.PHONY: all render preview clean

render:
	quarto render index.qmd

preview:
	quarto preview index.qmd

clean:
	rm -rf _site .quarto

RevealJS Extensions

Copy _extensions/ folder for plugins:

  • simplemenu - Navigation menu bar
  • reveal-auto-agenda - Auto-generated agenda
  • code-fullscreen - Expand code to fullscreen
  • codefocus - Progressive line highlighting

Deployment Steps

  1. gh repo create [name] --public --source=. --remote=origin
  2. git push -u origin main
  3. Netlify: Import from GitHub, auto-detects netlify.toml
  4. Deploy triggers on push to main