mkdocs-plugin-inline-select-svg
A MkDocs plugin that inlines SVG images matching a pattern into the output without inlining Materials theme icons.
This operates post HTML generation looking for img elements like
<img src="foo.svg" ...>
When the src is a path-local URL with a path component that ends
with .svg and it matches the configured pattern then the file is
read from the local file system and inlined in place.
Alt text is ignored in favour of any SVG <title> element.
If the SVG contains any elements marked with class="do-not-inline",
they will not be included in the inlined content.
This is useful when your SVG images contain <style> elements that
you do not want to bleed into the containing scope, and your Mkdocs
configuration includes extra CSS stylesheets that suffice.
Usage
To download and install this module, run:
pip install mkdocs-inline-select-svg-plugin
Enable the plugin in your mkdocs.yml by adding inline-select-svg as a list item under the plugins section. Since that section will almost certainly include search you might end up with something like this:
plugins:
- search
- inline-select-svg
If you want to filter which SVGs to inline, by path, you can specify a regular expression using the pattern config option thus:
plugins:
- search
- inline-select-svg:
pattern: "[.]inline[.]svg$"
With that configuration, <img src="../foo.inline.svg"> would be
inlined but <img src="../foo.svg"> would not.
Metadata
Release files for mkdocs-inline-select-svg-plugin 0.1.0
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_inline_select_svg_plugin-0.1.0.tar.gz | 8.5 kB | Without provenance | Details for mkdocs_inline_select_svg_plugin-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mkdocs_inline_select_svg_plugin-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mkdocs_inline_select_svg_plugin-0.1.0-py3-none-any.whl |
Total release size: 16.8 kB
Release files / mkdocs_inline_select_svg_plugin-0.1.0.tar.gz
| Download URL | mkdocs_inline_select_svg_plugin-0.1.0.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2cfa3c79f6809fd86c778adfb7b8da9c6c101c98acf50b3de7169fcbc8d3daf
|
|
BLAKE2b-256 checksum How to use checksums |
d9d4ba1f0fba644e541701fa40e24124a983126e6b205afb7b2ab6e53f246f83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / mkdocs_inline_select_svg_plugin-0.1.0-py3-none-any.whl
| Download URL | mkdocs_inline_select_svg_plugin-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e35e242a0d51c844576b75258e15a29f05b8aaeaf871b209368df2e880fcaf5b
|
|
BLAKE2b-256 checksum How to use checksums |
83cca3cb392357c65563a5208b3b430a6569bd400aff7a1683451ab96eed3249
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for mkdocs-inline-select-svg-plugin 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.