Add your own features with the new plug-in system!

As it has been a long-standing planned feature and the development of blogcpp is still going steady, I added support for plug-ins in a series of commits lately, meaning that you can add or remove your own features on-the-fly. In order to achieve this goal, blogcpp integrates the superb Duktape ECMAScript engine. Yes, all blogcpp plug-ins are mere JavaScript files.

As of today, three different kinds of plug-ins are supported by the next version "6":

  • Content plug-ins: You can process all (raw) Markdown input files before they are written into your HTML files.
  • Header plug-ins: Those return a static string which can be attached into a template field named headscripts (best to be placed in your template's HEAD area).
  • Footer plug-ins: You get the deal.

blogcpp has also got the new parameters --list-plugins, --enable-plugin and --disable-plugin to make life with plug-ins easier. Please refer to the README file for more details and an example. 🙂

Categories: blogcpp announcements
comments powered by Disqus