Replies: 1 comment 3 replies
-
Hello @landmaj,
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wrote a plugin which registers a Treeprocessor to find image tags linking to D2 diagrams. You can write something like this:
And have it rendered as an SVG. The plugin relies on
RelativeDirPlaceholder
passed inon_config
event. This worked fine until one of the users tried it with Material for MkDocs blog plugin. The blog plugin creates temporary files for archive, excerpts, etc and in those filesRelativeDirPlaceholder
no longer points to the original file, so relative links to D2 files are broken.I tried rewriting relative links to absolute links and changing
file.abs_src_path
to a temporary file with the modified links. It fixes the issue but breaksgit-revision-date-localized
plugin, as theabs_src_path
of the original file no longer points to a git directory. God knows how many other plugins it would break.I tried modifying files created by the blog plugin but they are created with some placeholder content and I can't find the place where the proper content is injected.
I am out of ideas on how to solve the issue and I would be glad for some help.
Beta Was this translation helpful? Give feedback.
All reactions