drupan RAWR - the next steps
December 09, 2015
I am not sure if Drupan is getting more and more users or the existing users want more features and report more bugs. But one thing is pretty clear to me: While my little drunken panda is still my favorite pet project, I slowly have to consider what the user base wants to see. Some of the most recent changes were primarily introduced to support Sakebowl, but they also allow me to implement new features way easier and without increasing the number of dependencies of the default installation.
Drupan supported plugins from the first version. But since we are living in a Python world, making them part of the main distribution meant that you would have had to install markdown, textile and whatever markup language would have been included libraries while installing drupan. The other option would have been not making the required libraries part of the default installation and throwing weird errors while using drupan. In my opinion both scenarios are user hostile and not something I wanted to implement.
Plugins, plugins, plugins!
With the next minor release I will introduce a new way to load plugins which will allow you to pip install new plugins. So if you want to write your posts using textile the only two things you will have to do is running
pip install drupan-textile and adding textile to your plugin list.
There are a few things I still have to think about. Does it make sense to support requiring other plugins or should plugins be forced to be self contained? Should a plugin be able to list other plugins that make no sense when used together - markdown and textile, for example? Should I add a possibility to put plugins in a random location like your site directory - basically what jekyll does?
There are several plugins that I will ship near the release of drupan 2.3:
- textile support
- restructure text support
- syntax highlighting using pygments
It is possible that I will start with pip installable plugins and only introduce site specific plugins later.
Templates, templates, templates!
Starting a new site is kind of okay right now. At least if you ask me. If you ask some of the designers I talked to I messed up big time. "Git clone what?! I just want a blog skeleton!"
Templates will likely go the same route as plugins. You will be able to
pip install them. In the first iteration it will work like this:
pip install drupan drupan-theme-OMG-IT-IS-SO-BEAUTIFUL
drupan --new siteName
That is it. No third step. I will get into the details in a moment. This does not mean you will not be able to modify the template anymore. You will be able to run
drupan --clone-template ~/mySite/template which will copy all template files so you can edit those stupid stock photos and replace them with pictures of your kitty.
To make sure we got some nice templates my fiancee will be porting some stock templates over to drupan, so there will be a nice blog template, some marketing site, a landing page and maybe a photo portfolio.
CLI, cli, cli!
It is time to introduce a command line interface to make drupan easier to use. This will not replace the the existing functionality but add to it. Configuration files will be stored in
~/.drupan/ for example, they will be automatically generated by
drupan --new and you can generate a site with
drupan siteName. Another nice side effect is that the only thing you will need to see in your file system is your content directory and maybe the template directory if you insist on changing those awesome, state of the art, nearly artistic, stock templates.
The functionality for now will be related to creating new sites and generating and deploying existing ones. I am not sure if there should be more functionality like managing posts. Every time I hear people talking about Octopress it sounds like they really love features like draft, publish and so on. So maybe it is not the worst idea to bring some of those features to drupan.
I started working on the new plugin system and will focus on the template system next. Somewhen next weekend you will see a new 2.3 branch on GitHub. If you want to use those features before they are officially released feel free to do so. My plan is to keep the 2.3 branch stable and do the feature development in other branches. Since the features are pretty big I want to get them in the hands of people as soon as possible. If you are planning to write a plugin take a look at one of the existing plugins, markdown is pretty small and should give you a good idea how plugins work.
I am considering making a drupan organization on GitHub to keep all plugins, templates and drupan itself together in one spot. I feel like having dozens of repositories in my private account does not increase the discoverability. On the other hand this could be an overkill. If you got any experience or input on this step please let me know!