External
Quarto Extension
{{< external https://raw.githubusercontent.com/mcanouil/quarto-external/refs/heads/main/README.md#installation >}}
{{< external https://raw.githubusercontent.com/mcanouil/quarto-external/refs/heads/main/README.md#usage >}}
{{< external https://raw.githubusercontent.com/mcanouil/quarto-external/refs/heads/main/README.md#example >}}Installation
quarto add mcanouil/quarto-externalThis will install the extension under the _extensions subdirectory.
If you’re using version control, you will want to check in this directory.
Usage
To use the external extension, you can include external content, a specific section, or a div from a file into your Quarto document using the external shortcode.
Basic syntax
Include the entire file:
{{< external <URI> >}}Include a specific section (by header ID):
{{< external <URI>#<section-id> >}}Include a specific div (by div ID):
{{< external <URI>#<div-id> >}}<URI> specifies the location of the external file. This can be a local file path (outside the project directory) or a URL.
When using #<id>, the extension will first look for a header with that ID. If no header is found, it will then search for a div with that ID.
[!IMPORTANT] The
externalshortcode must be placed on its own line with no other content. Include blank lines both before and after the shortcode.No code cells will or can be executed from the included file.
Currently supports
.md,.markdown, and.qmdfiles only.
.mdand.markdownfiles are included as-is..qmdfiles are processed as Quarto documents, so you can use Quarto features like citations, cross-references, and math.Note: Using external content breaks the fully reproducible and self-contained nature of Quarto projects, as documents become dependent on external sources that may change or become unavailable.
Example
Here is the source code for a minimal example: example.qmd.
Output of example.qmd:
Include a Div
Source: https://github.com/mcanouil/quarto-extensions/blob/main/about.qmd
What is this?
This is a listing of {{< iconify simple-icons:quarto title='Quarto Logo' label='Quarto Logo' >}} Quarto extensions using {{< iconify octicon:mark-github-16 title='GitHub Logo' label='GitHub Logo' >}} GitHub API to retrieve information from the repositories.
Use with Quarto Wizard
Quarto Wizard is a Visual Studio Code extension/Positron/Codium that helps you manage your {{< iconify simple-icons:quarto title='Quarto Logo' label='Quarto Logo' >}} Quarto projects.
It allows you to easily install Quarto extensions directly from the Quarto Extensions listing repository.
This extension provides a user-friendly interface to browse, select, and install Quarto extensions, enhancing your Quarto development experience.

