nanoc › Articles about v3.0
  1. Articles about v3.2
  2. Articles about v3.1
  3. Articles about v3.0
  4. Articles about v2.2
  5. Articles about v2.1
  6. Articles about v2.0

Articles about v3.0

An Important Note About nanoc 2 (March 23rd, 2010)

nanoc 2 is, as of today, no longer maintained. Its successor, nanoc 3, was released more than seven months ago, and if you are still using nanoc 2 you should considering updating your sites to work with nanoc 3. The migration guide will be very useful for you when upgrading.

I’ve also taken the time to resolve some issues with gem and executable names. From now on, installing nanoc 2 is done using gem install nanoc2. Invoking nanoc 2 is done using nanoc2 now. Finally, the namespace (module) for nanoc 2 is now called Nanoc2 instead of Nanoc.

The nanoc gem is now an alias for the nanoc3 gem and the nanoc executable is can now be used instead of nanoc3. In other words, if the gem or executable name does not end with an explicit version, it is an alias for the most recent version.

How does this change affect you? If you use nanoc 3, nothing changes. If you use nanoc 2, however, you’ll need to gem install nanoc2 and use the nanoc2 executable instead of nanoc. In addition to that, any custom code that uses the Nanoc module will need to use the Nanoc2 module instead.

Here’s a summary:

nanoc 2.x nanoc 3.x latest (currently 3.x)
gem name nanoc2 nanoc3 nanoc
executable name nanoc2 nanoc3 nanoc
module name Nanoc2 Nanoc3 -

Now, go ahead and install the nanoc gem:

> gem install nanoc

… and you’ll once again be able to type just nanoc instead of nanoc3 to manage and compile your web site. Ahh, much better.

You can use the nanoc-select executable to select a different version of nanoc that will be executed when nanoc is run. This is how it works:

nanoc-select 2
Switched to nanoc version 2.

▸ nanoc --version
nanoc 2.2.3 (c) 2007-2010 Denis Defreyne.
Ruby 1.9.1 (2010-01-10) running on i386-darwin10.2.0

▸ nanoc-select 3
Switched to nanoc version 3.

▸ nanoc --version
nanoc 3.0.9 (c) 2007-2010 Denis Defreyne.
Ruby 1.9.1 (2010-01-10) running on i386-darwin10.2.0

If you have any questions about this change, of if you have problems getting it to work correctly, do let me know on the mailinglist or on the IRC channel. Enjoy!

nanoc 3.0.9 released (February 25th, 2010)

nanoc 3.0.9 is out. This tiny patch release fixes a bug in 3.0.8 that only occurs when using Ruby 1.8.x: some parentheses were lacking, and while the code parsed fine on 1.9.x, it did not on 1.8.x. See the release notes for details.

You can update nanoc3 the usual way, like this:

> sudo gem update nanoc3

If you have any issues with this nanoc release, do let me know on the mailinglist or on the IRC channel. Enjoy!

nanoc 3.0.8 released (February 24th, 2010)

nanoc 3.0.8 is out. This patch release fixes a couple of issues with the Blogging helper, and makes the autocompiler serve up-to-date pages when requesting an index file. See the release notes for details.

You can update nanoc3 the usual way, like this:

> sudo gem update nanoc3

If you have any issues with this nanoc release, do let me know on the mailinglist or on the IRC channel. Enjoy!

nanoc 3.0 released (August 14th, 2009)

nanoc 3.0 has landed. This release brings many improvements which will be revealed in just a bit, but first, here’s how to install it:

% gem install nanoc3

nanoc 3.0 is incompatible with previous versions of nanoc which means that you cannot use nanoc 3.0 with existing nanoc 2.x sites. Check out the migrating from nanoc 2.2 to nanoc 3.0 guide for details on how to upgrade our existing sites.

Fortunately, nanoc 3.0 and 2.2 can coexist; the commandline tool for nanoc 3.0 is named nanoc3 (not nanoc) and the namespace is Nanoc3, not Nanoc. You can easily use nanoc 2.2 and nanoc 3.0 side by side.

So, on to what’s new in nanoc 3.0. There are too many changes to mention them all, but here’s a tiny list of useful new features that I like most:

  • Multiple data sources so you can load data from multiple locations—for example, Twitter, Delicious and Last.fm.

  • Filter arguments so you can pass extra arguments when executing a filter. For example, you can now pass Haml options when executing filters, like this: filter :haml, :format => :html5.

  • A more compact filesystem-based data source called filesystem_combined that doesn’t require tons of directories in the content and layout directories. Cleaner and less verbose.

  • An all-new dependency tracking system that ensures that all modified items and their dependent items are recompiled when the site is compiled. This speeds up site compilation by preventing non-modified pages from being recompiled.

  • A rules file which allows processing instructions (filtering pages, laying out pages) to be specified in a much more DRY way. In addition, the rules file is much more powerful than specifying processing instructions using item/layout attributes.

For more information, check out the migration guide, as well as the updated tutorial and manual. There is also the source code documentation for 3.0.0 in case you want to take a peek at the internals.

As you can see, a lot has changed in nanoc 3.0. If you experience any problems with this nanoc 3.0, let me know on the nanoc mailinglist or on the nanoc IRC channel.

Enjoy!