You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm making a site that requires custom build steps (mostly custom markdown/HTML embeds), so a significant part of the build would be directed into plugins. The job is complex enough that I would like to force entire site build to fail if one of my plugins detects an error in the data.
Is there any standard/recommended way to do this? Currently I don't see any other opportunity than raising an exception in the plugin implementation. However, such thing is undocumented and I would rather not rely on implementation details.
The text was updated successfully, but these errors were encountered:
Raising an exception is the standard mechanism for reporting failures in Python. Since there is no other special mechanism exposed to Nikola plugins, you should assume exceptions are the way to report failures. Examples of raising exceptions inside plugins can be found in the codebase.
I don’t think that this behavior needs any special documentation.
I would like to implement a shortcode plugin, like described in https://www.getnikola.com/extending.html#shortcodes
I'm making a site that requires custom build steps (mostly custom markdown/HTML embeds), so a significant part of the build would be directed into plugins. The job is complex enough that I would like to force entire site build to fail if one of my plugins detects an error in the data.
Is there any standard/recommended way to do this? Currently I don't see any other opportunity than raising an exception in the plugin implementation. However, such thing is undocumented and I would rather not rely on implementation details.
The text was updated successfully, but these errors were encountered: