# MkDocs Backlinks Section Plugin
[![PyPI version](https://img.shields.io/pypi/v/mkdocs-backlinks-section-plugin)](https://pypi.org/project/mkdocs-backlinks-section-plugin/)
![License](https://img.shields.io/pypi/l/mkdocs-backlinks-section-plugin)
![Python versions](https://img.shields.io/pypi/pyversions/mkdocs-backlinks-section-plugin)
Adds a backlinks section that lists every page linking to the current page.
## Installation
You can install it with `pip`:
```bash
pip install mkdocs-backlinks-section-plugin
```
## Usage
Add the plugin to your `mkdocs.yml`:
```yaml
plugins:
- search
- backlinks_section
```
## Configuration
### Text
You can customize the text inserted by the plugin with the configuration values below:
Option | Type | Default value
--- | --- | ---
`title` | string | `Backlinks`
`description` | string | `The following pages link to this page:`
`description_no_links` | string | `No other pages link to this page.`
So for example if you would want the text to be in German, you could do this in your `mkdocs.yml`:
```yaml
plugins:
- search
- backlinks_section:
title: Rückverweise
description: "Die folgenden Seiten referenzieren die aktuelle Seite:"
description_no_links: Es gibt keine Verweise auf diese Seite.
```
### Ignore pages
You can ignore source and destination pages for the backlink section.
The values are interpreted as [glob-like](https://docs.python.org/3/library/pathlib.html#pathlib-pattern-language) patterns, wich are matched against the paths of the Markdown source files.
Option | Type | Default value
--- | --- | ---
`ignore_links_from` | list of strings | `[]`
`ignore_links_to` | list of strings | `[]`
For example you may have a page listing all [tags](https://squidfunk.github.io/mkdocs-material/setup/setting-up-tags/) (and thus linking to almost all pages) and want to prevent every page having a backlink to it:
```yaml
plugins:
- search
- backlinks_section:
ignore_links_from:
- path/with/globs/**/to/tags.md
```
If you do not want a backlinks section on some pages, you can disable it with the `ignore_links_to` option:
```yaml
plugins:
- search
- backlinks_section:
ignore_links_to:
- path/with/globs/**/to/files-without-backlink-section-*.md
- index.md
```
## Notable changes
### Version 0.0.3
- Fixed crash with Python <= 3.12
### Version 0.0.2
- Added `ignore_links_from` and `ignore_links_to` configuration options
### Version 0.0.1
- Initial version
Raw data
{
"_id": null,
"home_page": "https://github.com/six-two/mkdocs-backlinks-section-plugin",
"name": "mkdocs-backlinks-section-plugin",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "six-two",
"author_email": "pip@six-two.dev",
"download_url": "https://files.pythonhosted.org/packages/07/01/601bd4ec3da896e3619627a5e8020284e092d828277a81b5718bf962eb31/mkdocs_backlinks_section_plugin-0.0.3.tar.gz",
"platform": null,
"description": "# MkDocs Backlinks Section Plugin\n\n[![PyPI version](https://img.shields.io/pypi/v/mkdocs-backlinks-section-plugin)](https://pypi.org/project/mkdocs-backlinks-section-plugin/)\n![License](https://img.shields.io/pypi/l/mkdocs-backlinks-section-plugin)\n![Python versions](https://img.shields.io/pypi/pyversions/mkdocs-backlinks-section-plugin)\n\nAdds a backlinks section that lists every page linking to the current page.\n\n## Installation\n\nYou can install it with `pip`:\n```bash\npip install mkdocs-backlinks-section-plugin\n```\n\n## Usage\n\nAdd the plugin to your `mkdocs.yml`:\n```yaml\nplugins:\n- search\n- backlinks_section\n```\n\n## Configuration\n\n### Text\n\nYou can customize the text inserted by the plugin with the configuration values below:\n\nOption | Type | Default value\n--- | --- | ---\n`title` | string | `Backlinks`\n`description` | string | `The following pages link to this page:`\n`description_no_links` | string | `No other pages link to this page.`\n\n\nSo for example if you would want the text to be in German, you could do this in your `mkdocs.yml`:\n```yaml\nplugins:\n- search\n- backlinks_section:\n title: R\u00fcckverweise\n description: \"Die folgenden Seiten referenzieren die aktuelle Seite:\"\n description_no_links: Es gibt keine Verweise auf diese Seite.\n```\n\n### Ignore pages\n\nYou can ignore source and destination pages for the backlink section.\nThe values are interpreted as [glob-like](https://docs.python.org/3/library/pathlib.html#pathlib-pattern-language) patterns, wich are matched against the paths of the Markdown source files.\n\nOption | Type | Default value\n--- | --- | ---\n`ignore_links_from` | list of strings | `[]`\n`ignore_links_to` | list of strings | `[]`\n\nFor example you may have a page listing all [tags](https://squidfunk.github.io/mkdocs-material/setup/setting-up-tags/) (and thus linking to almost all pages) and want to prevent every page having a backlink to it:\n\n```yaml\nplugins:\n- search\n- backlinks_section:\n ignore_links_from:\n - path/with/globs/**/to/tags.md\n```\n\nIf you do not want a backlinks section on some pages, you can disable it with the `ignore_links_to` option:\n```yaml\nplugins:\n- search\n- backlinks_section:\n ignore_links_to:\n - path/with/globs/**/to/files-without-backlink-section-*.md\n - index.md\n```\n\n## Notable changes\n\n### Version 0.0.3\n\n- Fixed crash with Python <= 3.12\n\n### Version 0.0.2\n\n- Added `ignore_links_from` and `ignore_links_to` configuration options\n\n### Version 0.0.1\n\n- Initial version\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Adds a backlinks section that lists every page linking to the current page.",
"version": "0.0.3",
"project_urls": {
"Homepage": "https://github.com/six-two/mkdocs-backlinks-section-plugin"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0aa248bf156f1514f7589da295bdf603c3d46a78b51ba8f13728bfbb729fe806",
"md5": "fa1f6e2a7aa542c84b6817323f948d16",
"sha256": "8caad18bd43d867b446b79d1dfb97d83b6ad7e63bdb8ca52414aa7268173bfc9"
},
"downloads": -1,
"filename": "mkdocs_backlinks_section_plugin-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fa1f6e2a7aa542c84b6817323f948d16",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 6519,
"upload_time": "2024-12-07T16:39:30",
"upload_time_iso_8601": "2024-12-07T16:39:30.823751Z",
"url": "https://files.pythonhosted.org/packages/0a/a2/48bf156f1514f7589da295bdf603c3d46a78b51ba8f13728bfbb729fe806/mkdocs_backlinks_section_plugin-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0701601bd4ec3da896e3619627a5e8020284e092d828277a81b5718bf962eb31",
"md5": "b3aa35471dce910afd5a9b881ef42ce3",
"sha256": "8c4b7d83f02d36a17ef4fedab158d0d738386b0adbd277cfe813c0ec4d4537cf"
},
"downloads": -1,
"filename": "mkdocs_backlinks_section_plugin-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "b3aa35471dce910afd5a9b881ef42ce3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 5893,
"upload_time": "2024-12-07T16:39:32",
"upload_time_iso_8601": "2024-12-07T16:39:32.536875Z",
"url": "https://files.pythonhosted.org/packages/07/01/601bd4ec3da896e3619627a5e8020284e092d828277a81b5718bf962eb31/mkdocs_backlinks_section_plugin-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-07 16:39:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "six-two",
"github_project": "mkdocs-backlinks-section-plugin",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mkdocs-backlinks-section-plugin"
}