MkDocs Source Links
MkDocs plugin that rewrites [text](../path) inline links and [ref]: ../path reference definitions to your git forge during on_page_markdown (before HTML is built). Source markdown on disk is unchanged; forge URLs appear in the built site.
- Files →
https://…/blob/<ref>/<path>(GitHub/GitLab; forge-specific paths on Gitea, Bitbucket, Azure) - Directories →
https://…/tree/<ref>/<path>where the forge distinguishes files from directories - Pin ref:
pin: branch(default),pin: commit(HEAD SHA), orpin: tag(exact tag atHEAD; Gitea uses/src/tag/…, Azure usesGT…) - Forges: GitHub, GitLab, Bitbucket Cloud, Gitea/Forgejo, Azure DevOps (autodetected; self-hosted via
forge:)
Documentation: https://filipchristiansen.github.io/mkdocs-source-links/
Install
pip install mkdocs-source-links
Usage
site_name: My project
repo_url: https://github.com/you/your-repo
edit_uri: edit/main/docs/
plugins:
- source-links
Requires repo_url in mkdocs.yml (shown above). Without it, links are left unchanged.
Optional branch override:
plugins:
- source-links:
branch: develop
Advanced options
plugins:
- source-links:
pin: commit # embed HEAD SHA instead of branch name
# pin: tag # exact tag at HEAD (release builds); else resolved branch
forge: gitlab # override autodetection for custom domains
warn_on_missing: false # silence missing-target warnings
log_rewrites: summary # or verbose for per-page counts; false by default
enabled: !ENV [SOURCE_LINKS, true] # disable per environment
Line fragments in links (#L10, #L10-L20) are translated to each forge's line-reference
syntax. See the configuration docs
for all options.
Link conventions and branch resolution
Complete inline [text](../path) links and [ref]: ../path definitions targeting repo files and directories are rewritten to forge blob/tree
URLs; links between pages inside docs/ are unchanged. Lonely ](../path) suffixes in prose are not matched. Branch names are resolved from plugin
config, extra.git_branch, or edit_uri.
See Usage and Configuration in the docs for the full tables and resolution order.
Contributing
This project uses uv, pre-commit, and a Makefile.
make install # install Python 3.10, sync all groups, set up pre-commit hooks
make ci # pre-PR checks: lint, audit, test (with coverage), docs build
Maintainers release with make release-prep VERSION=X.Y.Z (bump, roll the hand-written
CHANGELOG.md, open the release PR) and, once merged, make release-tag VERSION=X.Y.Z (signed tag
and publish to PyPI).
See Contributing for the full workflow and Changelog for release notes. Further reading: Governance, Roadmap, Support, Code of conduct, Maintainers, Security policy, and Release verification.
License
MIT
Metadata
Release files for mkdocs-source-links 0.7.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mkdocs_source_links-0.7.2.tar.gz | 39.5 kB | With provenance | Details for mkdocs_source_links-0.7.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mkdocs_source_links-0.7.2-py3-none-any.whl | Python 3 | none | any | Details for mkdocs_source_links-0.7.2-py3-none-any.whl |
Total release size: 63.0 kB
Release files / mkdocs_source_links-0.7.2.tar.gz
| Download URL | mkdocs_source_links-0.7.2.tar.gz |
|---|---|
| Size | 39.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f783ffbfee753a88b60d3305ff13ba3dbb9614cd19b1eeba00b448ff4e683f3
|
|
BLAKE2b-256 checksum How to use checksums |
d9d7ed58fec12581076fac1d9e0188c98c4ce1477c1d489efd532bbef89a487d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency logRelease files / mkdocs_source_links-0.7.2-py3-none-any.whl
| Download URL | mkdocs_source_links-0.7.2-py3-none-any.whl |
|---|---|
| Size | 23.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a0bce0ea7821b215b42cb213e7aaf03eae36276eecf8d2f0a9639727a79ed6f5
|
|
BLAKE2b-256 checksum How to use checksums |
2dee8d96543035e3ddaa6d71165719d35b41be2a1137b6d3b550b7a2e9493716
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency logSecurity for mkdocs-source-links 0.7.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for mkdocs_source_links-0.7.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.