Autolinked references and URLs
Quarto Extension
References to GitHub issues, pull requests, and commits are automatically shortened and converted into links.
github is an extension for Quarto to automatically shortens and converts GitHub references into links.
This extension has been superseded by the Git Link extension. Please update your project to use the new extension.
To install the new extension, see the installation instructions.
Installation
quarto add mcanouil/quarto-githubThis will install the extension under the _extensions subdirectory.
If you’re using version control, you will want to check in this directory.
Usage
You can reference GitHub issues, pull requests, and commits in your content using GitHub short references. This Quarto extension automatically shortens and converts GitHub references into links.
To activate the filter, add the following to your YAML front matter:
Old (<1.8.21):
filters: - quarto - githubNew (>=1.8.21):
filters: - path: github at: post-quarto
The extension must be run after Quarto’s processing (i.e., at: post-quarto) to ensure that references (e.g., @fig-my-beautiful-figure) are processed first by Quarto, then by the GitHub filter to avoid conflicts.
Some references require to define the default repository via the extension configuration or have an origin remote set in your Git configuration.
extensions:
github:
base-url: https://github.com # optional, defaults to https://github.com
repository-name: mcanouil/quarto-githubThe old top-level repository-name syntax is deprecated but still supported:
repository-name: mcanouil/quarto-githubMentioning users
| User/Organisation | Raw reference | Short link |
|---|---|---|
| User mention | |
@mcanouil |
| Organisation mention | |
@quarto-dev |
Issues and pull requests
| Reference type | Raw reference | Short link |
|---|---|---|
Issue, discussion, or pull request URL repository-name is optional! |
|
#3 |
# and issue, discussion, or pull request numberrepository-name is required! |
|
#3 |
GH- and issue, discussion, or pull request numberrepository-name is required! |
|
#3 |
Username/Repository# and issue, discussion, or pull request number |
|
mcanouil/quarto-github#3 |
Organization_name/Repository# and issue, discussion, or pull request number |
|
github-linguist/linguist#4039 |
Commit SHAs
| Reference type | Raw reference | Short link |
|---|---|---|
| Commit URL | |
0b2eb55 |
SHArepository-name is required! |
|
0b2eb55 |
User@SHANot supported! |
|
Not supported! |
Username/Repository@SHA |
|
mcanouil/quarto-github@0b2eb55 |