Gitlink
Git hosting references, turned into links.
Issue numbers, commit hashes, and @mentions are links on GitHub, GitLab, and every other forge, and plain text everywhere else. Writing a Quarto document about a project means either losing them or writing every URL by hand.
gitlink recognises the same forms the platforms do and turns them into links, across GitHub, GitLab, Codeberg, Gitea, and Bitbucket. It also draws a repository widget, with live star and fork counts, which is the one in the sidebar of this site.
Installation
quarto add mcanouil/quarto-gitlink@1.11.0This will install the extension under the _extensions subdirectory. If you are using version control, you will want to check in this directory.
Or install it from your editor with Quarto Wizard:
Quick start
filters:
- gitlink
extensions:
gitlink:
platform: github
repository-name: mcanouil/quarto-gitlinkThen write references as you would in an issue comment:
Fixed in #1, see also mcanouil/quarto-gitlink#1.The repository is detected from the git remote when it is not given.
The extension registers the filter at post-quarto, so Quarto resolves its own cross-references before it looks at the text.
See the Reference for every option, and the Examples for the reference forms rendered.
Where it works
Every output format for the links themselves. The widget is HTML, since it fetches counts as the page loads.
Links
- Reference for every option and platform.
- Examples for rendered references.
- Changelog for what each release changed.
- Source and issues on GitHub.