Mkdocs Site Urls

screenshot of Mkdocs Site Urls
mkdocs

A MkDocs plugin that adds support for site-relative `site:` URLs.

Overview

The MkDocs Site URLs plugin is a handy tool designed for users of MkDocs who want to incorporate more manageable site-relative URLs into their documentation. This plugin simplifies the process of managing asset paths within your project, ensuring that links to images and other resources are always correct regardless of how your site is structured. It is especially useful for developers who value a clean, coherent structure in their documentation.

This tool is provided in an "as-is" manner, as the plugin's maintainer currently doesn't utilize MkDocs herself. Nonetheless, she is open to contributions and bug reports, promoting a community-driven approach to improvements and fixes. If you're running MkDocs version 1.5 or later, this plugin could be a valuable addition to your setup.

Features

  • Site-Relative URL Support: Seamlessly integrate site-relative URLs in your Markdown files with the simple prefix of site:.

  • Customizable Attributes: By default, it replaces URLs in href, src, and data attributes, but you can customize which attributes to include.

  • Configuration Flexibility: Set your own site_url in the mkdocs.yml file to dictate how absolute URLs are treated, allowing for tailored configurations.

  • Absolute URL Handling: If needed, the plugin can also be configured to interpret absolute URLs as relative by adjusting settings in your configuration file.

  • Easy Installation: Install the plugin directly from PyPI and add it to your mkdocs.yml plugins section for quick setup.

  • Development Ease: Comes with guidelines for setting up a development environment, running tests, and building documentation, aimed at fostering community contributions.

  • MIT License: Freely available under the MIT license, allowing for wide use and modification within the community.

This plugin is perfect for anyone looking to enhance their MkDocs workflow and keep their project organized with minimal effort.

mkdocs
MkDocs

MkDocs is a fast, simple and downright gorgeous static site generator that's geared towards building project documentation. Documentation source files are written in Markdown, and configured with a single YAML configuration file.