Skip to content
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

Use callback to set plugin module path for template location #3702

Merged
merged 1 commit into from
Jul 22, 2023

Commits on Jul 15, 2023

  1. Use callback to set plugin module path for template location

    This is a much cleaner (I think) approach to the problem of
    figuring out the plugin's template path (see getnikola#3701). We use
    yaspy's ability to provide a callback when loading the plugins.
    The callback is passed a `yaspy.PluginInfo` instance, which
    conveniently contains a reference to the plugin object itself,
    and its filesystem path. So we can just add a method on our
    plugin class to set the filesystem path as an attribute, and
    have the callback function call that method.
    
    Signed-off-by: Adam Williamson <[email protected]>
    AdamWill committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    394d729 View commit details
    Browse the repository at this point in the history