meddle0x53 / blogit

OTP application for generating blog posts from a Git repository containing markdown files.
MIT License
42 stars 7 forks source link

Plugin system. #4

Open NJichev opened 6 years ago

NJichev commented 6 years ago

I think we could do well with a little plugin system, you pass in some config options and some modules are ran(with some implemented behaviour).

Example: I have a PITCHME.md, which github renders as a presentation using impress.js. I want to render those in a special way, so that I can display them on my own site. Let's say we put all the PITCHME.md files under presentations/. To display them correctly, we'll have to take all presentations, split them on the #HSLIDE, render each split to html and then join the different splits using sections. After that we pass in that to the view and using impress.js - it will check the sections and create our presentation.

To accomplish that, I would need to hook into the parsing process of the structure, get the presentations(configurable) folder and change the way the are rendered.