Multi-Format Publishing
Overview
Starting in Quarto 1.3, HTML pages (either standalone or in a website) automatically include links to other formats specified in the document front matter. The additional formats will be automatically placed within the TOC as a new section, if a TOC is enabled for the page. If no TOC is displayed, the additional formats will be displayed in the right margin at the top of the document.
For example, the following document front matter:
title: Sample Page
author: Norah Jones
date: last-modified
toc: true
format:
html: default
ipynb: default
Results in an HTML page that includes the a link to the additional notebook format in the right margin below the TOC:
Format Links
Links to additional formats are displayed by default in Quarto HTML documents, but you can control whether they are shown or even which specific formats are included.
You can provide an explicit list of formats to include in the Other Formats section by providing a list as the value for format-links
. For example, this document front matter will display only the link to the Jupyter notebook format of the document (excluding the PDF):
title: Sample Page
author: Norah Jones
date: last-modified
toc: true
format:
html: default
ipynb: default
pdf: default
format-links: [ipynb]
Hiding All Links
To prevent format links from being shown at all, specify format-links: false
in your document front matter. For example this front matter will not display the Other Formats links:
title: Sample Page
author: Norah Jones
date: last-modified
toc: true
format:
html: default
ipynb: default
format-links: false
In a Quarto Project, you can use _metadata.yml
to control this behavior for a specific folder. Just include the format
and format-links
options in a _metadata.yml
file to apply the options to all files in a folder. See Directory Metadata for additional details.
You can also specify these options for an entire project by including them in the _quarto.yml
project file.