Publishing Quarto Content

You can publish Quarto projects using rsconnect-python using the rsconnect deploy quarto command. Pass the command the path to a directory containing a Quarto project:

rsconnect deploy quarto /path/to/quarto/project

You can also use rsconnect write-manifest quarto to generate a manifest file for Quarto content.

Limitations

There are two limitations to the kind of Quarto content that rsconnect deploy quarto can publish:

  • rsconnect deploy quarto can only deploy Quarto projects. If you have a single Quarto document you wish to publish, you can add an empty file named _quarto.yml to the same directory to enable publication.

  • rsconnect deploy quarto can’t publish content that uses the knitr engine (i.e. executes R code. You can deploy this content with another supported method. If this content already has a manifest, you can deploy it with rsconnect deploy manifest.

The argument to rsconnect deploy manifest may also be a directory so long as that directory contains a manifest.json file.

Specifying a Quarto Executable

By default, rsconnect-python will look for a Quarto executable in a number of well-known locations, including the system PATH. This executable is used to run quarto inspect to gather required metadata for deployment.

If needed, you can specify a specific Quarto executable by passing its full path to the --quarto option:

rsconnect deploy quarto \
    --quarto /path/to/quarto \
    /users/alice/my-project

Excluding Files

Since you must specify a directory to deploy, there may be times when some files under that directory subtree should not be included in the deployment or manifest. Use the --exclude option to specify files or directories to exclude.

rsconnect deploy quarto \
    --exclude quarto-app-venv \
    --exclude TODO.txt \
    quarto-app/

You can exclude a directory by naming it:

rsconnect deploy quarto \
    --exclude quarto-app-venv \
    --exclude _files/ \
    quarto-app/

The --exclude option may be repeated, and may include a glob pattern. You should always quote a glob pattern so that it will be passed to rsconnect as-is instead of letting the shell expand it.

rsconnect deploy quarto \
    --exclude quarto-app-venv \
    --exclude "*.txt" \
    quarto-app/

Some directories are excluded by default, to prevent bundling and uploading files that are not needed or might interfere with the deployment process:

.Rproj.user
.env
.git
.svn
.venv
__pycache__
env
packrat
renv
rsconnect-python
rsconnect
venv