Happy new year and other such holiday things to the 3 people who read my blog!
I was in San-Francisco for new year’s eve and it was quite lovely.
Apart from the sake of posting something new, this post is also to show off how PieCrust’s admin panel can now upload page assets (in this case, that would be the picture above… check the URL, it’s hosted right here). This feature will be part of the impending 2.0 release, but you can get it by pulling the latest from BitBucket or GitHub as usual.
PieCrust 2.0rc2 was published a couple days ago, and it’s mostly a bug fix and clean-up release, as you might expect. Run your
pip install piecrust --pre -U to update, or whatever you do usually. More info after the jump.
Update: the times reported by the Bench utility are CPU times, i.e. they represent the time spent working by your various CPUs. The “real/wall” time, i.e. the time you effectively have to wait as a user, is usually a third less than that. So the “real” time for my blog went roughly from 7 seconds to 5 seconds.
In a previous blog post about PieCrust performance, I mentioned how static site generators are dependent on the performance of their formatting and templating libraries. One of the most common formatters are Markdown formatters and, by default, PieCrust uses Python Markdown. It’s the easiest one to install and use, but it’s far from the fastest one.
As far as I know, the fastest one that’s still maintained is Hoedown, for which some Python bindings exist. And if you have a recent enough version of PieCrust, there will be support for a Hoedown formatter, as long as you install Hoedown. You can do that by running
pip install hoedown.
Once installed, you can make replace Markdown with Hoedown by writing this in your
config.yml, or in a config variant:
Any extensions you have declared for the Markdown formatter generally also translate directly to Hoedown:
extensions: [fenced_code, footnotes, smartypants]
The performance increase can be pretty noticeable. For instance, on my ancient MacBook Pro (2.4GHz Core 2 Duo), this blog takes almost 9 seconds to bake:
With Hoedown, the time goes down to 7.2 seconds:
Pretty worth it if you ask me! Now most of the time spend baking happens during templating with Jinja2… time to look for a faster alternative?
PieCrust 2.0rc1 is now out! The last piece of the puzzle (or should I say the
pie?), page generators, is now in place.
You can run
pip install piecrust --pre -U to update from PyPi, or grab it from
BitBucket or GitHub.
More details after the break.
PieCrust 2.0 beta 5 is now live on PyPi, so you can go ahead and
install --pre piecrust -U to get it.
The 2 big new features in that release are the last reasons I switched to Python
for PieCrust 2 after packaging and multi-core support: better ways to launch
and manage sub-processes. This lets me do:
- Publishing support, because baking your site is only the beginning, and you
actually need to upload that stuff somewhere.
- “FoodTruck”, an optional administration panel to work on your site(s) the
same way you would with a traditional system like WordPress.
More after the break.