- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Social plugin: runtime error with generated files #7520
Comments
This zip contains the |
Thanks for reporting. Here's a hook to reproduce it without a plugin: from mkdocs.structure.files import File, Files, InclusionLevel
from mkdocs.plugins import event_priority
@event_priority(100)
def on_files(files: Files, **kwargs):
return files.append(File.generated(
config=kwargs.get("config"),
src_uri="foo.md",
content="",
inclusion=InclusionLevel.NOT_IN_NAV,
)) |
Judging from a comment in the
Well, so this is essentially a change in behavior that I would definitely consider to be a breaking change. Yet, it's not MkDocs 2.0 but 1.6. This might impact a lot of plugins, since up to now |
Fixed in |
Released as part of 9.5.34+insiders-4.53.13. |
Context
No response
Bug description
When using the Insiders version of the
Social
plugin in combination with another plugin that creates generated files, it raises anAttributeError
exception.Generated files were added with mkdocs 1.6 and don't have an
abs_scr_path
attribute.Related links
Reproduction
9.5.34+insiders.4.53.12-social-virtual-files-error.zip
The
foo
plugin used in the reproduction is defined as follows:Steps to reproduce
Run
mkdocs build
in the reproduction.The build will fail with the following exception:
Browser
No response
Before submitting
The text was updated successfully, but these errors were encountered: