PieCrust 1.0
PieCrust reached the big milestone of version 1.0 without much fanfare – and this post won’t be any different from the other release announcements. After a few release candidates I figured I would never be quite satisfied, so why not just keep going with the releases and not pay too much attention to the first digit.
You’ll see releases 1.1.0 and up coming soon, with the usual bunch of fixes, changes, and new features. The only difference is that the version number will now reflect better what’s going on, since I’ll be loosely following the semantic versioning specification. In a nuthsell, the digit being incremented reflects whether a release is a bug fix, a non-breaking change, or a major and/or breaking change.
The one big new thing that comes with version 1.0 is an installer script, along with a .phar
binary, to make it easier for people to use PieCrust if they don’t want or need the source code. Head over to the PieCrust documentation for more information.
For the rest of the changes, keep reading.
Auto-formats
One popular request has always been to make it possible for users to write pages and posts using other extensions than .html
– most specifically .md
or .markdown
. This is now possible with the auto-format feature, which maps extensions for formats. As of 1.0, no auto-format is declared by default, so you have to specify the ones you want in your config.yml
:
site:
auto_formats:
md: markdown
markdown: markdown
textile: textile
The example above maps extensions .md
and .markdown
to the Markdown format (same as if you specified format: markdown
in the page’s config header), and extension .textile
to the Textile format.
As of version 1.1, .md
and .textile
will be defined by default.
Template data changes
Some page template variables have been changed:
asset
is nowassets
.link
is nowsiblings
, and returns the page’s sibling pages (i.e. in the same folder).- There’s a new
family
variable that returns a recursive version ofsiblings
(i.e. sibling pages and all the children pages in sub-directories).
The old names are still available, but will trigger warnings when you bake.
Feed preparation
The chef prepare
command can now create more than pages and posts for you: you can run chef prepare feed
and it will create a boilerplate RSS feed page for you.
You can specify --atom
to create a boilerplate Atom feed instead.
Plugin update
If your website has some plugins, you can update them easily with the new chef plugins update
command. Right now it will just stupidly re-download the plugins from their source, so it may re-install the same version, but that’s enough for now 🙂 It’s especially handy if you have some custom plugin that’s used by several websites.
Sass, Compass and YUICompressor
Speaking of plugins, the previously plugin-implemented Sass, Compass and YUICompressor processors are now part of the core PieCrust code.
They have also been improved in the process. Most importantly, Compass support is a lot better.
Miscellaneous changes
- The monthly blog archives (
blog.months
) was incorrectly ordered chronologically, instead of reverse-chronogically. This is now fixed. - Anywhere that returns a list of pages or posts should now have consistent behaviour and features, e.g. filtering template functions.
- You can get access to Twig’s debug functions by setting the
twig/debug
site configuration variable totrue
. - If you want PieCrust to use the Javascript
lessc
compiler to process LessCSS stylesheets, set theless/use_lessc
site configuration variable totrue
. - Pretty colors for
chef
commands on Mac/Linux! (this is important)
For the complete list of changes, see the CHANGELOG.