Since 2014, we are using a static file generator to build our website. We used Jekyll to start with. It served us very well for a while, but after a year Jekyll proved to be painful to customize and maintain. Adding macro was requiring to write them in ruby. The visual appearance is not completely decoupled from the content of the page. Localization and alternatives are not well supported. Lack of user interface makes it difficult to edit pages for non-technical users.
Our desire to migrate our website away from Jekyll and use another technology was building up. We wanned to continue using a static file generator and not something like Wordpress. After a lot of research and evaluation, we found Lektor to be a nice replacement for Jekyll that better suit our needs. We did a proof-of-concept and we were pleased with the results.
Migrating a website from one technology to another is a tremendous effort. For that reason we wished to reduce the time required for the migration by creating a new plugin for Lektor. A plugin that would allow us to keep our markdown content almost identical.
Lektor is using mistune engine to render markdown content. While Jekyll is using kramdown. If we were to keep the default mistune engine, a lot of our pages would require to be modified in order to be displayed properly, because mistune is not featured rich compared to kramdown. This is when we decided to write our own plugin for Lektor to use a more powerful markdown engine. Python-markdown was the closest we found to kramdown. Here born the plugin lektor-phythonmarkdown !
To use it in Lektor, you must install it in your project and then use "pythonmarkdown" field type. This new field type can be used wherever "markdown" field type was used.
lektor plugins add pythonmarkdown
[fields.body] label = Page content type = pythonmarkdown
You may learn more about this plugin, like how to enable or disable advance features by reading the README file.