Project Options
Options that define the type, render targets, and output of a project. Project options are specified under the project
key. For example:
---
project:
type: default
output-dir: _output
---
title |
|
type |
Project type ( |
render |
Files to render (defaults to all files) |
execute-dir |
Control the working directory for computations.
|
output-dir |
Output directory |
lib-dir |
HTML library (JS/CSS/etc.) directory |
resources |
Additional file resources to be copied to output directory |
preview |
Options for |
pre-render |
Scripts to run as a pre-render step |
post-render |
Scripts to run as a post-render step |
Preview
Specify options that control the behavior of quarto preview
within the preview
key. For example:
---
project:
type: default
output-dir: _output
preview:
port: 4200
browser: false
---
Available preview
options include:
port |
Port to listen on (defaults to random value between 3000 and 8000) |
host |
Hostname to bind to (defaults to 127.0.0.1) |
serve |
Options for external preview server (see Serve) |
browser |
Open a web browser to view the preview (defaults to true) |
watch-inputs |
Re-render input files when they change (defaults to true) |
navigate |
Navigate the browser automatically when outputs are updated (defaults to true) |
timeout |
Time (in seconds) after which to exit if there are no active clients |
Serve
If you are creating a project extension for another publishing system that includes its own preview server (for example, Hugo or Docusaurus) then use the preview: serve
options to customize the behavior of the preview server.
cmd |
Serve project preview using the specified command. Interpolate the |
args |
Additional command line arguments for preview command. |
env |
Environment variables to set for preview command. |
ready |
Regular expression for detecting when the server is ready. |
See the Hugo and Docusaurus extension source code for example usages of preview: serve
.