{"id":15023089,"url":"https://github.com/temperlang/svg-inline-mkdocs-plugin","last_synced_at":"2025-10-25T16:30:55.962Z","repository":{"id":206291327,"uuid":"715694553","full_name":"temperlang/svg-inline-mkdocs-plugin","owner":"temperlang","description":"A plugin for mkdocs that inlines select SVG markdown images (`![](foo.svg)`) so that links in the SVG work without breaking SVG icons","archived":false,"fork":false,"pushed_at":"2023-11-09T00:26:26.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-31T08:05:35.533Z","etag":null,"topics":["mkdocs","plugin","svg"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/mkdocs-plugin-inline-ext-svg/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/temperlang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-07T16:40:29.000Z","updated_at":"2024-04-24T13:39:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"1c20034c-efb3-4b56-b14e-2e35661bfbe0","html_url":"https://github.com/temperlang/svg-inline-mkdocs-plugin","commit_stats":null,"previous_names":["temperlang/svg-inline-mkdocs-plugin"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temperlang%2Fsvg-inline-mkdocs-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temperlang%2Fsvg-inline-mkdocs-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temperlang%2Fsvg-inline-mkdocs-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/temperlang%2Fsvg-inline-mkdocs-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/temperlang","download_url":"https://codeload.github.com/temperlang/svg-inline-mkdocs-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238174137,"owners_count":19428631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["mkdocs","plugin","svg"],"created_at":"2024-09-24T19:58:43.472Z","updated_at":"2025-10-25T16:30:50.691Z","avatar_url":"https://github.com/temperlang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mkdocs Plugin to inline SVGs\n\nA [MkDocs plugin] that inlines SVG images matching a pattern into the output without inlining Materials theme icons.\n\nThis differs from previously developed plugins in several ways:\n\n- it does not use a regex to find images in Markdown.  It parses the\n  generated HTML, and\n- it can be configured to only inline SVGs with paths matching a\n  pattern, and\n- it parses the SVG and removes SVG elements that are marked\n  `.do-not-inline`.\n\n----\n\nThis plugin operates post HTML generation looking for `img` elements like\n\n```html\n\u003cimg src=\"foo.svg\" ...\u003e\n```\n\nWhen the *src* is a path-local URL with a path component that ends\nwith `.svg` and it matches the configured pattern then the file is\nread from the local file system and inlined in place.\n\nAlt text is ignored in favour of any SVG `\u003ctitle\u003e` element.\n\nIf the SVG contains any elements marked with `class=\"do-not-inline\"`,\nthey will not be included in the inlined content.\nThis is useful when your SVG images contain `\u003cstyle\u003e` elements that\nyou do not want to bleed into the containing scope, and your Mkdocs\nconfiguration includes extra CSS stylesheets that suffice.\n\n## Usage\n\nTo download and install this module, run:\n\n```sh\npip install mkdocs-inline-select-svg-plugin\n```\n\nEnable 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:\n\n```yaml\nplugins:\n    - search\n    - inline-select-svg\n```\n\nIf you want to filter which SVGs to inline, by path, you can specify a regular expression using the *pattern* config option thus:\n\n```yaml\nplugins:\n    - search\n    - inline-select-svg:\n        pattern: \"[.]inline[.]svg$\"\n```\n\nWith that configuration, `\u003cimg src=\"../foo.inline.svg\"\u003e` would be\ninlined but `\u003cimg src=\"../foo.svg\"\u003e` would not.\n\n[MkDocs plugin]: https://www.mkdocs.org/dev-guide/plugins/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemperlang%2Fsvg-inline-mkdocs-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftemperlang%2Fsvg-inline-mkdocs-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftemperlang%2Fsvg-inline-mkdocs-plugin/lists"}