jbake
jbake copied to clipboard
Plugin System implmentation
I need to include/generate meta-data automatically. For example from relative locations of the markup file:
- blog/2021/03/my-post.md may produce date (year and month) for this file.
- blog/java/graalvm/a-post-about-graalvm.md may add (java and graalvm) as tags or categories..
- I may choose to replace javascript frameworks, like syntax highlights with static processor before going through template processor (not sure if the current implementation, is actually using javascript).
These functionality is great candidate for plugins. I was looking at this document "Plugin System", and thought it might be what I was looking for or at least close. The idea is to have pre-processor and post-processor.
Pre-processor chain can be added between Cralwer.java and ContentStore.java. I may find time and try to extend ContentStore.java as a prototype to see how that works. Post-processor chain, I have no idea as I didn't look into the source code closely yet, but I know I will need a way to avoid processing the content through the markup to allow post-processor to handle them.
If anyone has a better idea, please share.