Updating the site generator “pelican” to 3.5.0
After updating the site generator that powers this website, I had to make some adjustments.
Solving warnings
Initially, the new version of pelican produced some warnings that some files
could not be found and that their {filename}
internal links would not be substituted.
It took me a while to figure this out, but it turned out that my version of the render_math plugin wasn’t working correctly. When I turned this plugin off, the problems disappeared. So I updated it to the newest version from the github pelican-plugins repository.
In the course of this investigation, I also converted all the |filename|
links to the new syntax {filename}
using find and sed.
> find src/ -type f -name '*.rst' -exec sed -i '' 's/|filename|/{filename}/g' {} \+
This usage of sed
is an example of in-place editing. Note that in this
case I’m disabling the generation of backup files (using -i
) because
the source of this website is kept under revision control with git.
Adding plugins
Updating the render_math
plugin made me take a look at the
pelican-plugins repository on github. After looking over all the plugins I
decided to add the neighbors and summary plugins. To use the neighbors
plugin I had to change the templates for the article and index pages.
In the future, I might add the pelican_comment_system plugin.
For comments, please send me an e-mail.
Related articles
- Switch to pelican website generator
- Python bindings for libmagic
- Modifying pelican
- Stltools
- Making my first e-book