Nikola v7.7.8 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v7.7.8. It fixes some bugs and adds (minor) new features.

What is Nikola?

Nikola is a static site and blog generator, written in Python. It can use Mako and Jinja2 templates, and input in many popular markup formats, such as reStructuredText and Markdown — and can even turn Jupyter (IPython) Notebooks into blog posts! It also supports image galleries, and is multilingual. Nikola is flexible, and page builds are extremely fast, courtesy of doit (which is rebuilding only what has been changed).

Find out more at the website: https://getnikola.com/

Downloads

Install using pip install Nikola or download tarballs on GitHub and PyPI.

Changes

Features

  • Template-based shortcodes now receive positional arguments too (Issue #2319)

Bugfixes

  • Use state files in nikola github_deploy and nikola status (Issue #2317)
  • Add align options for youtube, vimeo, soundcloud reST directives (Issue #2304)
  • Update FILE_METADATA_REGEXP example in docs (Issue #2296)
  • Show “tags too similar” error instead of cryptic doit crash (Issue #2325)
  • Fix crashes when tag appears multiple times in a post (Issue #2315)
  • Use binary I/O for .svg files in galleries
  • Accept .svgz extension by default
  • Don't randomly load plugins when Nikola is called with no arguments (Issue #2297)

Nikola v7.7.7 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v7.7.7. It fixes some bugs and adds new features.

What is Nikola?

Nikola is a static site and blog generator, written in Python. It can use Mako and Jinja2 templates, and input in many popular markup formats, such as reStructuredText and Markdown — and can even turn Jupyter (IPython) Notebooks into blog posts! It also supports image galleries, and is multilingual. Nikola is flexible, and page builds are extremely fast, courtesy of doit (which is rebuilding only what has been changed).

Find out more at the website: https://getnikola.com/

Downloads

Install using pip install Nikola or download tarballs on GitHub and PyPI.

Changes

Features

  • New --one-file option to wordpress importer (Issue #2262)
  • New Pygal-based chart shortcode (Issue #2170)
  • Add post_type to post-list directive (Issue #2272)
  • Use sys.executable for launching pip in plugin (Issue #2275)

Bugfixes

  • Fix Indonesian translation (Issue #2291)
  • Fix a JSON conversion bug in the WordPress importer (Issue #2264)
  • Don’t create download directories when not downloading WordPress attachments (Issue #2260)
  • Don’t display "Good link" messages in nikola check -l by default, can be re-enabled with -v option (Issue #2268)
  • Fix a format string in nikola check (Issue #2267)
  • Don't crash wordpress importer when posts are "empty" (Issue #2263)
  • Don't put untranslated and nonexistant posts in sitemap (Issue #2289)

Nikola v7.7.6 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v7.7.6. It fixes some bugs and adds new features.

What is Nikola?

Nikola is a static site and blog generator, written in Python. It can use Mako and Jinja2 templates, and input in many popular markup formats, such as reStructuredText and Markdown — and can even turn Jupyter (IPython) Notebooks into blog posts! It also supports image galleries, and is multilingual. Nikola is flexible, and page builds are extremely fast, courtesy of doit (which is rebuilding only what has been changed).

Find out more at the website: https://getnikola.com/

This is a bugfix release, fixing a critical error in version 7.7.5's support for IPython/Jupyter notebooks. If you had upgraded Nikola to version 7.7.5 and suddenly got errors or empty pages for your notebooks, upgrade to 7.7.6 and run nikola build -a to get everything in order.

Really sorry!

Downloads

Install using pip install Nikola or download tarballs on GitHub and PyPI.

Changes

Features

  • Add FRONT_INDEX_HEADER setting to allow adding greeting notices to the main index page (Issue #2249)

Bugfixes

  • Make Jupyter posts build (Issues #2248, #2252)

Nikola v7.7.5 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v7.7.5. It fixes some bugs and adds new features.

What is Nikola?

Nikola is a static site and blog generator, written in Python. It can use Mako and Jinja2 templates, and input in many popular markup formats, such as reStructuredText and Markdown — and can even turn Jupyter (IPython) Notebooks into blog posts! It also supports image galleries, and is multilingual. Nikola is flexible, and page builds are extremely fast, courtesy of doit (which is rebuilding only what has been changed).

Find out more at the website: https://getnikola.com/

Downloads

Install using pip install Nikola or download tarballs on GitHub and PyPI.

Changes

Features

  • Add nikola theme --new command for creating new themes (Issue #2231)
  • Add nikola theme --copy-template command for copying templates to customize them (Issue #2231)
  • Add nikola theme --uninstall command for deleting themes (Issue #2231)
  • Replace nikola install_theme with more capable nikola theme command (Issue #2231)
  • Allow for customizing github_deploy commit messages with -m (Issue #2198)
  • Commit to source branch automatically in github_deploy if GITHUB_COMMIT_SOURCE is set to True (Issue #2186)
  • Hugo-like shortcodes (Issue #1707)
  • New Galician translation
  • New facilities for data persistence and data caching (Issues #2209 and #2009)
  • (internal) allow scripts/jinjify.py usage with scripts (Issue #2240)

Bugfixes

  • Fix some rebuilds with indexes and galleries
  • Make state files work on Python 3
  • Don’t attempt to create redirects for URLs with query strings in WordPress imports if the site is in a subdirectory (Issue #2224)
  • Avoid some random file rebuilds (Issue #2220)
  • Honor MATHJAX_CONFIG setting
  • Display tags and archives in a unified format, with the date on the left, instead of a misplaced dash in tags (Issue #2212)
  • Decide is_mathjax based on current language tags (Issue #2205)
  • Don't duplicate images in flowr when resizing page (Issue #2202)

Nikola v7.7.4 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v7.7.4. It fixes some bugs and adds new features.

What is Nikola?

Nikola is a static site and blog generator, written in Python. It can use Mako and Jinja2 templates, and input in many popular markup formats, such as reStructuredText and Markdown — and can even turn Jupyter (IPython) Notebooks into blog posts! It also supports image galleries, and is multilingual. Nikola is flexible, and page builds are extremely fast, courtesy of doit (which is rebuilding only what has been changed).

Find out more at the website: https://getnikola.com/

Downloads

Install using pip install Nikola or download tarballs on GitHub and PyPI.

Changes

Features

  • Added cache for Jinja templates (Issue #2166)
  • Use Jupyter instead of IPython shims (Issue #1938)
  • Automatically open gallery images colorbox based on URL fragment (Issue #2146)

Bugfixes

  • Fix enclosures from metadata (Issue #2189)
  • Restored log level to INFO (it broke many messages)
  • Check HTTP response status of minifying tools and skip them if they’re unavailable
  • Change rewrite rule for fragment-only links (Issue #2132)
  • Mention disabled plugins in nikola plugin --list-installed (Issue #2139)
  • Don't examine all gallery image dates every build (Issue #2160)

Nikola v7.7.3 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v7.7.3. It fixes some bugs and adds new features.

What is Nikola?

Nikola is a static site and blog generator, written in Python. It can use Mako and Jinja2 templates, and input in many popular markup formats, such as reStructuredText and Markdown — and can even turn Jupyter (IPython) Notebooks into blog posts! It also supports image galleries, and is multilingual. Nikola is flexible, and page builds are extremely fast, courtesy of doit (which is rebuilding only what has been changed).

Find out more at the website: https://getnikola.com/

Downloads

Install using pip install Nikola or download tarballs on GitHub and PyPI.

Changes

Features

  • Recommend ghp-import2 (better packaging) (Issue #2152)
  • New TAGS_INDEX_PATH option for overwriting the path of the tag index list page.
  • Support for ~~strikethrough~~ in Markdown (Issue #2149)
  • Hungarian translation (by Baptiste Darthenay)
  • serve and auto publishes DNS Service Discovery records to the local network announcing they’re running web servers.

Bugfixes

  • Implement translating DATE_FORMAT properly
  • Remove superfluous translatability for a boolean (Issue #2140)
  • Pass messages to post-list template (Issue #2156)
  • Changed default log level from INFO to NOTICE (nikola check is less chatty)
  • Fix support for panorama images in gallery(Issue #2143)
  • Support "maps.world.World" and similar charts in Pygal (Issue #2142)
  • Capitalize "UTF-8" properly in locale guessing (Issue #2137)

Nikola v7.7.2 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v7.7.2. It fixes some bugs and adds new features.

What is Nikola?

Nikola is a static site and blog generator, written in Python. It can use Mako and Jinja2 templates, and input in many popular markup formats, such as reStructuredText and Markdown — and can even turn Jupyter (IPython) Notebooks into blog posts! It also supports image galleries, and is multilingual. Nikola is flexible, and page builds are extremely fast, courtesy of doit (which is rebuilding only what has been changed).

Find out more at the website: https://getnikola.com/

Downloads

Install using pip install Nikola or download tarballs on GitHub and PyPI.

Changes

Features

  • Warning about Python 2.7 deprecation (Issues #2121, #2122)
  • New jsonminify filter for minifying JSON files.
  • New xmlminify filter for minifying XML files.
  • New option FEED_PREVIEWIMAGE includes the post.meta.previewimage image in Atom and RSS feeds. (Issue #2095)

Bugfixes

  • Support Pillow v3.0.0 (Issue #2130)
  • Support setting template in metadata in translated posts (Issue #2114)
  • Fix false orphan report for code.css and robots.txt (Issue #2106)
  • Fix reST post list date formatting error (Issue #2104)
  • Deprecated RSS_TEASERS, RSS_PLAIN, RSS_READ_MORE_LINK, and RSS_LINKS_APPEND_QUERY in favor of FEED_TEASERS, FEED_PLAIN, FEED_READ_MORE_LINK, and FEED_LINKS_APPEND_QUERY for both Atom and RSS feeds. (Issue #2095)
  • /robots.txt was never being built (Issue #2098)
  • SVG thumbnails (Issue #2094)

Deprecations

  • Post.section_link is now deprecated (Issue #2086). Use site.link('section_index', post.section_slug()) instead.

Environment Survey Results and the Future of Python 2.7 in Nikola

Recently, the Nikola team asked the community about the Python versions used to run Nikola. We received a total of 138 responses. The survey results are as follows:

Most users already are on Python 3

Two thirds (66%) of Nikola users are already on Python 3. Some users run both versions concurrently (for example, on different operating systems)

Python 2 and 3 users 46414.2529522647003206.9249999999999873240.91185929789873365.1589326452046319259.8359410719378157.91524364838745Python 2 and 3 usersPython 2 onlyPython 3 onlyPython 2 and 3

A diverse selection of operating systems

The most popular operating system is Ubuntu (with 54 users), followed by Debian and Mac OS X (37 users each). There were also 27 Windows users taking part in the survey. This was a multiple–choice question — there were 211 data points in total)

There are multiple operating system versions listed in the second (optional) question about operating systems, ranging from Debian 6 squeeze (oldstable) to the newest versions

Operating systems used by survey participants 00101020203030404050505468.07051282051282267.0000000000000637110.85769230769229347.8226495726496537153.6448717948718347.8226495726496527196.43205128205125395.3653846153846420239.21923076923076428.64529914529929282.0064102564102480.942307692307748324.7935897435897485.696581196581237367.5807692307692490.450854700854733410.36794871794865509.467948717948733453.1551282051281509.467948717948732495.9423076923076514.22222222222234538.729487179487504.71367521367523Operating systems used by survey participantsUbuntuDebianMac OS XWindowsArch LinuxBSDLinux MintFedoraRedHat/CentOSopenSUSEGentooOther

Switching is not a problem for the community

Out of all the participants, only 10 (7.25%) said that they would not install a Python 3 interpreter, even if Nikola were to require one. More than 76% of our users have a Python 3 interpreter installed already.

Python 3 interpreter usage 106385.9886753816475356.653969854599422207.84106735479537197.7118592978987410278.8833009245565149.9499802167815Python 3 interpreter usageHave a Python …Have a Python 3 interpreterCan install Py…Can install Python 3 if requiredRefuse to inst…Refuse to install Python 3

Comments, concerns and suggestions

After answering the four survey questions, users could leave comments. Many of them were positive and commended the decision. Some participants even claimed that they do not like Python 2.x and it might even deter them from contributing. Many participants asked us to kill 2.7 and to go forward with Python 3.

There were, however, a few participants that had concerns about our decision. A few users cited the inability to migrate due to having existing Python 2-only software. For most people, this is not a problem — Python 2 and 3 can coexist on one machine, with separate packages and binaries. Those users would be just use Nikola with Python 3.x, and their legacy software with 2.7 — and it would work without any problems. The only people who could have a problem are those using 2.7–only code in plugins.

Some users also suggested bundling an interpreter with Nikola (this is done by eg. Dropbox). We believe that this is not a good thing to do. Bundling an interpreter is a lot of work, and Dropbox does this because they want to protect their code (not applicable in an open–source project) and because they have a large non-technical user base (scared by black terminal windows used by h4x0rz). However, there is a partial solution: if you prefer, you can use a Docker image that runs Nikola under Arch Linux, created by Rob Brewer (and which has been blessed by the Nikola team).

Yet another suggestion was to make Nikola available via Homebrew or MacPorts. While there is no package for Nikola available in those repositories, our Getting Started Guide recommends using Homebrew, MacPorts or Fink with virtualenv and pip on OS X, by providing install instructions for those three repositories (using Python 3). If you want a package for one of those systems, you can always contribute your own (if this is possible in those communities) — the Nikola community will be happy to use it.

There were also concerns about the ARM architecture. We have had reports of users running Nikola on ARM–based devices (including one survey participant) — just keep in mind that it is really slow on SD cards (which is the main storage device of Raspberry Pi).

The future of Python 2.7 in Nikola

Taking the results of this survey into consideration, the Nikola developers decided that Python 2.7 support will be dropped in Nikola v8.0.0. This version will be released in early 2016. Before that date, we will migrate all our remaining infrastructure to Python 3.x. The next version of Nikola, v7.7.2, will be released on 2015-10-03 and will display a warning if the user is running Python 2.7. We might keep the compatibility hacks after v8.0.0, but we will not officially support using Python 2.7 with Nikola.

Motivation (added 2015-09-27)

Supporting two Python versions is a lot of work. We have to use various compatibility hacks to make Unicode work properly, and then there are still issues caused by the fact Python 2 was not built with Unicode in mind. The developers decided that it is time to let Python 2 go and thus make the development much easier.

Switching to Python 3.x

If you are running Nikola with Python 2.7, you should switch to Python 3.x soon. Doing so is simple and is a one–time process. You should follow the Getting Started Guide for more information, or read the instructions below:

Windows

  1. Install Python 3.5 from the official website (python.org)
  2. Install virtualenv using py -m pip install virtualenv
  3. Create a virtualenv and activate it (for more information, read virtualenv documentation)
  4. Install lxml and Pillow wheels from Christoph Gohlke’s website (using pip install c:\paths\to\the\two\files.whl)
  5. Install Nikola using pip install "Nikola[extras]"

Mac OS X

Follow the “Installing on OS X” section of the Getting Started Guide to install Nikola and Python from Homebrew, MacPorts or Fink.

Linux

To install Nikola using Python 3.x on Linux, you should first identify your installation method.

If you use a distribution package (eg. python-nikola from Arch Linux’s AUR, or Fedora’s packages), you should look for the Python 3 version of those packages. If those are not available, you should install Nikola manually and report a bug with your distribution.

If you installed Nikola manually, we recommend creating a virtualenv for it. Please follow the instructions in the Getting Started Guide (you might need to see the troubleshooting hints and adjust them for your OS/Python 3 package name)

(Note that Nikola requires Python 3.3 or newer; if you are running a really old distribution, it might not be available.)

Migrating a site

You can use your existing Nikola site with Python 3, without any special modifications to the code. However, you will likely receive this error when you run nikola build for the first time:

doit.dependency.DatabaseException: Dependencies file in '.doit.db' seems to use an old format or is corrupted.
To fix the issue you can just remove the database file(s) and a new one will be generated.

In case you do, you can just remove the mentioned .doit.db file and run nikola build again. Note that this will lead to rebuilding your site from scratch — but this is a one–time process, and the next rebuild should be an incremental one.

PS. you can also see the results on the Google Forms results summary page. If you want to do your own data analysis, we can share the raw data (.csv) — contact me (Chris Warrick) if you would like to get access. The charts in this post were generated courtesy of pygal, using the :chart: directive, which is built into Nikola.

Nikola Environment Survey: Python 2.7/3.x usage

The Nikola developers want to analyze the environment used to run Nikola.

If the results show that Python 2.7 is not popular, or that most users can easily switch to Python 3, we might deprecate Python 2.7 support in the future.

This survey closes on 2015-09-25 (Friday). A decision will be reached on the following weekend and subsequently announced on the mailing list and our blog.

The survey is available here: https://docs.google.com/forms/d/15dnvSCO0JP9IX9MvjRI3aofCQaDFcl2S0aTsApkCAbY/viewform?usp=send_form

Nikola v7.7.1 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v7.7.1. It fixes some bugs and adds new features.

What is Nikola?

Nikola is a static site and blog generator, written in Python. It can use Mako and Jinja2 templates, and input in many popular markup formats, such as reStructuredText and Markdown — and can even turn Jupyter (IPython) Notebooks into blog posts! It also supports image galleries, and is multilingual. Nikola is flexible, and page builds are extremely fast, courtesy of doit (which is rebuilding only what has been changed).

Find out more at the website: https://getnikola.com/

About This Release

This release focused in fixing bugs. We fixed so many, we have now fewer than 10 bugs open!

Also, we added a new tutorial to the website, about creating heavily customized pages check it out, the end result is pretty cool!

Downloads

Install using pip install Nikola or download tarballs on GitHub and PyPI.

Changes

Features

  • Better Template / JS / CSS demo in sample site.
  • New normalize_html filter
  • Support UTF-8 paths and encoded links when the USE_SLUGIFY option is disabled. (Issue #2037)
  • Per-document hyphenation using "hyphenate" metadata flag.
  • New option USE_KATEX to switch from MathJax to KaTeX (Experimental).
  • Support SVG in galleries (Issue #1605)
  • Made TAG_PATH translatable (Issue #1914)
  • Made CATEGORY_PATH translatable (Issue #1914)
  • Display post counts for archive links (Issue #2011)
  • Document link/path handlers (Issue #2008)
  • Made DATE_FORMAT and JS_DATE_FORMAT translatable (Issue #2032)

Bugfixes

  • Generate language-specific section links (Issue #2069)
  • Rebuild pages when user changes POST_SECTION_COLORS (Issue #2066)
  • Look for bundle assets also in output/, allowing bundling of files created by plugins (Issue #1370)
  • In listings, if lexer is not specified, use literal (Issue #2078)
  • Remove bogus ambiguity on listing links (Issue #2080)
  • Unix-slash caused conflict in Windows (Issue #2079)
  • Locale is now threadsafe, avoid races in threaded builds (Issue #2071)
  • Make typogrify filter work when applied from metadata (Issue #2064)
  • Handle metadata in post files that start with a BOM (Issue #2059)
  • Handle error downloading bootswatches (Issue #2054)
  • Monitor plugins/ in nikola auto (Issue #2044)
  • Multi-lingual and multi-level directories confused section slug detection (Issue #2023)
  • Use Unicode strings for WordPress comment headers (Issue #2019)
  • Don't add stories to author pages (Issue #2007)