{"id":51468449,"url":"https://github.com/filipchristiansen/mkdocs-source-links","last_synced_at":"2026-07-06T14:01:16.874Z","repository":{"id":365458437,"uuid":"1271339026","full_name":"filipchristiansen/mkdocs-source-links","owner":"filipchristiansen","description":"MkDocs plugin that rewrites `[text](../path)` inline links and `[ref]: ../path` definitions to forge view URLs during `on_page_markdown`.","archived":false,"fork":false,"pushed_at":"2026-06-25T07:13:06.000Z","size":484,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-25T09:02:26.191Z","etag":null,"topics":["azure-devops","bitbucket","codeberg","documentation","documentation-tool","forgejo","gitea","github","gitlab","links","markdown","mkdocs","mkdocs-material","mkdocs-plugin","pypi","pypi-package","python","python3","static-site-generator"],"latest_commit_sha":null,"homepage":"https://filipchristiansen.github.io/mkdocs-source-links/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/filipchristiansen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-16T15:06:31.000Z","updated_at":"2026-06-25T07:13:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/filipchristiansen/mkdocs-source-links","commit_stats":null,"previous_names":["filipchristiansen/mkdocs-source-links"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/filipchristiansen/mkdocs-source-links","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipchristiansen%2Fmkdocs-source-links","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipchristiansen%2Fmkdocs-source-links/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipchristiansen%2Fmkdocs-source-links/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipchristiansen%2Fmkdocs-source-links/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filipchristiansen","download_url":"https://codeload.github.com/filipchristiansen/mkdocs-source-links/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipchristiansen%2Fmkdocs-source-links/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35193679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-devops","bitbucket","codeberg","documentation","documentation-tool","forgejo","gitea","github","gitlab","links","markdown","mkdocs","mkdocs-material","mkdocs-plugin","pypi","pypi-package","python","python3","static-site-generator"],"created_at":"2026-07-06T14:01:15.545Z","updated_at":"2026-07-06T14:01:16.869Z","avatar_url":"https://github.com/filipchristiansen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MkDocs Source Links\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/13299/badge)](https://www.bestpractices.dev/projects/13299)\n[![OpenSSF Baseline](https://www.bestpractices.dev/projects/13299/baseline)](https://www.bestpractices.dev/projects/13299)\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/filipchristiansen/mkdocs-source-links/badge)](https://scorecard.dev/viewer/?uri=github.com/filipchristiansen/mkdocs-source-links)\n[![SLSA 3](https://slsa.dev/images/gh-badge-level3.svg)](https://github.com/filipchristiansen/mkdocs-source-links/releases/latest)\n[![PyPI](https://img.shields.io/pypi/v/mkdocs-source-links?logo=pypi\u0026logoColor=white)](https://pypi.org/project/mkdocs-source-links)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/filipchristiansen/mkdocs-source-links/blob/main/LICENSE)\n[![CI](https://github.com/filipchristiansen/mkdocs-source-links/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/filipchristiansen/mkdocs-source-links/actions/workflows/ci.yml?query=branch%3Amain)\n[![codecov](https://codecov.io/gh/filipchristiansen/mkdocs-source-links/graph/badge.svg)](https://codecov.io/gh/filipchristiansen/mkdocs-source-links)\n[![python](https://img.shields.io/badge/Python-3.10+-3776AB.svg?logo=python\u0026logoColor=white)](https://www.python.org/downloads)\n[![uv](https://img.shields.io/badge/uv-managed-DE5FE9?logo=astral)](https://docs.astral.sh/uv)\n[![ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![mypy](https://img.shields.io/badge/mypy-checked-039dfc?logo=mypy\u0026logoColor=white)](https://mypy-lang.org)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/pre-commit/pre-commit)\n\nMkDocs 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.\n\n- **Files** → `https://…/blob/\u003cref\u003e/\u003cpath\u003e` (GitHub/GitLab; forge-specific paths on Gitea, Bitbucket, Azure)\n- **Directories** → `https://…/tree/\u003cref\u003e/\u003cpath\u003e` where the forge distinguishes files from directories\n- **Pin ref:** `pin: branch` (default), `pin: commit` (HEAD SHA), or `pin: tag` (exact tag at `HEAD`; Gitea uses `/src/tag/…`, Azure uses `GT…`)\n- **Forges:** GitHub, GitLab, Bitbucket Cloud, Gitea/Forgejo, Azure DevOps (autodetected; self-hosted via `forge:`)\n\n**Documentation:** \u003chttps://filipchristiansen.github.io/mkdocs-source-links/\u003e\n\n## Install\n\n```bash\npip install mkdocs-source-links\n```\n\n## Usage\n\n```yaml\nsite_name: My project\nrepo_url: https://github.com/you/your-repo\nedit_uri: edit/main/docs/\n\nplugins:\n  - source-links\n```\n\nRequires `repo_url` in `mkdocs.yml` (shown above). Without it, links are left unchanged.\n\nOptional branch override:\n\n```yaml\nplugins:\n  - source-links:\n      branch: develop\n```\n\n## Advanced options\n\n```yaml\nplugins:\n  - source-links:\n      pin: commit             # embed HEAD SHA instead of branch name\n      # pin: tag              # exact tag at HEAD (release builds); else resolved branch\n      forge: gitlab           # override autodetection for custom domains\n      warn_on_missing: false  # silence missing-target warnings\n      log_rewrites: summary   # or verbose for per-page counts; false by default\n      enabled: !ENV [SOURCE_LINKS, true]  # disable per environment\n```\n\nLine fragments in links (`#L10`, `#L10-L20`) are translated to each forge's line-reference\nsyntax. See the [configuration docs](https://filipchristiansen.github.io/mkdocs-source-links/configuration/)\nfor all options.\n\n## Link conventions and branch resolution\n\nComplete inline `[text](../path)` links and `[ref]: ../path` definitions targeting repo files and directories are rewritten to forge blob/tree\nURLs; links between pages inside `docs/` are unchanged. Lonely `](../path)` suffixes in prose are not matched. Branch names are resolved from plugin\nconfig, `extra.git_branch`, or `edit_uri`.\n\nSee [Usage](https://filipchristiansen.github.io/mkdocs-source-links/usage/) and\n[Configuration](https://filipchristiansen.github.io/mkdocs-source-links/configuration/) in the docs\nfor the full tables and resolution order.\n\n## Contributing\n\nThis project uses [uv](https://docs.astral.sh/uv), [pre-commit](https://pre-commit.com), and a `Makefile`.\n\n```bash\nmake install   # install Python 3.10, sync all groups, set up pre-commit hooks\nmake ci        # pre-PR checks: lint, audit, test (with coverage), docs build\n```\n\nMaintainers release with `make release-prep VERSION=X.Y.Z` (bump, roll the hand-written\n`CHANGELOG.md`, open the release PR) and, once merged, `make release-tag VERSION=X.Y.Z` (signed tag\nand publish to PyPI).\n\nSee [Contributing](https://filipchristiansen.github.io/mkdocs-source-links/contributing/) for the full workflow and [Changelog](https://filipchristiansen.github.io/mkdocs-source-links/changelog/) for\nrelease notes. Further reading: [Governance](https://filipchristiansen.github.io/mkdocs-source-links/governance/), [Roadmap](https://filipchristiansen.github.io/mkdocs-source-links/roadmap/), [Support](https://filipchristiansen.github.io/mkdocs-source-links/support/), [Code of conduct](https://filipchristiansen.github.io/mkdocs-source-links/code-of-conduct/), [Maintainers](https://github.com/filipchristiansen/mkdocs-source-links/blob/main/MAINTAINERS.md), [Security policy](https://github.com/filipchristiansen/mkdocs-source-links/blob/main/SECURITY.md), and [Release verification](https://filipchristiansen.github.io/mkdocs-source-links/security/).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipchristiansen%2Fmkdocs-source-links","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilipchristiansen%2Fmkdocs-source-links","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipchristiansen%2Fmkdocs-source-links/lists"}