-
Notifications
You must be signed in to change notification settings - Fork 327
Plugin System
This is an initial draft for building a plugin system, and describes the plugin system at a high level.
The plugin system should have at least the following features:
-
Being able to retrieve content from external sources (DBs, REST services, etc)
-
Being able to manipulate content before it’s processed with relevant markup engine (Markdown/AsciiDoc/HTML)
-
Being able to manipulate content after it’s processed with relevant markup engine (Markdown/AsciiDoc/HTML)
-
Be able to process asset files, i.e. minification, LESS/SASS support
-
Be simple to use
-
Retrieve data from a database an populate (part of) the template with that.
-
Generate Maven reports like Maven site plugin (https://github.com/ingenieux/jbake-maven-plugin/issues/14)
Initial idea is to have a number of plugin interfaces each one defines the hook point in the system/pipeline. For example AssetProcessPlugin or PreRenderingPlugin and each.
Each plugin interface will define the relevant method signature for that hook point and will include a context that will provide the plugin class with access to elements such as the Content Store that are relevant at that point.
ServiceLoader could be used to locate and execute each plugin, so plugins could be added by placing them on the classpath or in the /lib or even /plugin folder.