A MkDocs plugin to resolve absolute URLs relative to the site_url value in the MkDocs configuration, rather than the root url of the website.
For example:
| absolute URL | site_url | resulting URL |
|---|---|---|
/images/foo.png |
https://example.com/ |
https://example.com/images/foo.png |
/images/foo.png |
https://example.com/subpage/ |
https://example.com/subpage/images/foo.png |
| Name | Description | Default value |
| ---------------- | ----------- | -------- | ------------- |
| attributes | The HTML attributes whose absolute URLs will be resolved. | ["href", "src", "data"] |
| prefix | Prefix used to denote the absolute URLs. If the URLs starts with this prefix, it will be resolved.| / |
plugins:
- resolve-absolute-urls:
attributes:
- href
- data-url
prefix: /The ACCESS-Hive Docs website is covered by the CC-BY 4.0 license.
However, the material linked to from ACCESS-Hive Docs is covered by various licensing agreements. Our users should directly refer to the terms and conditions of any material they are using to understand their rights and responsibilities.
This project is based on work from OctoPrint/mkdocs-site-urls.
We thank the original authors for their contributions and for making their work available under an open license.