Upgrading to v6

Version: 7.2.0

Nikola tries fairly hard to be compatible between versions. However, there were a few areas which were getting clunky, and needed fxing. So, here’s what you may need to change in your site.

If you need to change anything else, or something breaks, please write at nikola-discuss and I’ll add further tweaks here.

Themes

NOTE
There is no equivalent for the jinja-default theme yet. If you have a custom, jinja-based theme, upgrading is probably a bad idea right now.

Themes have been renamed:

  • site => bootstrap
  • orphan => base

Theme added:

  • base-jinja

Themes have been moved out of nikola and into nikola-themes:

  • default => oldfashioned at nikola-themes
  • jinja-default => not there yet, coming soon
  • monospace => monospace at nikola-themes
  • site-reveal => reveal at nikola-themes

You may have to change your THEME setting, or change the parent if you are using a custom theme. Also, some templates have been tweaked, but nothing should break for you.

Facebook comments support changed the HTML tag to:

<html
%if comment_system == 'facebook':
xmlns:fb="http://ogp.me/ns/fb#"
%endif
lang="${lang}">

If you do not want to use Facebook comments, you can leave the old <html lang="${lang}"> tag in and it will work just fine.

Comments

If you want a custom theme to support comment systems other than disqus, you will need to:

  1. Replace mentions of disqus_helper.tmpl with comments_helper.tmpl
  2. Replace mentions of html_disqus with comment_form
  3. Replace mentions of html_disqus_link with comment_link
  4. Replace mentions of html_disqus_script with comment_link_script

If you don’t, your theme should work just fine, but support only disqus comments.

Configuration

A number of options have been renamed. In most cases, the behaviour should be exactly as before.

However, post_pages was split into POSTS and PAGES. Long story short, anything that had a True as the use_in_feeds (last) value goes to POSTS and anything with False goes to PAGES. For example:

post_pages = (
    ("posts/*.txt", "", "post.tmpl", True),
    ("stories/*.txt", "p", "story.tmpl", False),
    ("stories/*.html", "s", "story.tmpl", False),
)

### becomes ###

POSTS = (
    ("posts/*.txt", "", "post.tmpl"),
)

PAGES = (
    ("stories/*.txt", "p", "story.tmpl"),
    ("stories/*.html", "s", "story.tmpl"),
)

Also, you will get warnings. That doesn’t mean things broke. They are there to inform you of what’s happening, and that you need to tweak your config.

All the deprecated options will work during the v6 cycle, and only be removed in v7, when those warnings will become errors.