Nikola v8.2.0 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v8.2.0. This release includes some new features as well as a bunch of bugfixes.

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 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.

Changes

Features

  • Add category_titles, category_descriptions, tag_titles, tag_descriptions to default context of tags page (Issue #3584)

  • Add Maori translation

  • Add Occitan translation

  • New auto_command_starting signal when nikola auto is starting

  • typogrify_custom filter adds a default value for typogrify_filters so that ignore_tags can be specified as the only option.

  • The default ignore_tags are appended to the user-supplied ignore_tags added via typogrify_custom.

  • Allow adding comment systems from a plugin (Issue #3544)

  • New CommentSystem plugin category (Issue #3544)

Bugfixes

  • Fix changes to INDEX_READ_MORE_LINK and FEED_READ_MORE_LINK not triggering rebuilds

  • Make CATEGORY_TITLES, CATEGORY_DESCRIPTIONS, TAG_TITLES, TAG_DESCRIPTIONS translatable settings for consistency (Issue #3584)

  • Fix bug with posts after the first one appearing shifted due to a <div> closed too early (Issue #3573, #3564)

  • Fix support for files outside of site root directory on Windows

  • Support passing --backend and --db-file to nikola auto

  • Support blank values in certain WordPress-imported structures (Issue #3535)

  • Typogrify ignores div elements with .math CSS class. (Issue #3512)

  • Adjust panorama aspect ratio to 3:1 and document behaviour.

Nikola v8.1.3 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v8.1.3. This release has some minor fixes, and a minor dependency change.

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 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.

Changes

Features

  • Provide the full GLOBAL_CONTEXT to the post list shortcode plugin (Issue #3481)

  • Add BasePlugin.register_auto_watched_folder()

  • Allow different PANDOC_OPTIONS values based on input extensions by specifying a dict of {".extension": [options]} (Issue #3492)

  • Allow boolean/integer pretty_url post meta values in YAML/TOML (Issue #3503)

Bugfixes

  • Fix an UnboundLocalError crash in nikola deploy (Issue #3479)

Other

  • For nikola github_deploy, the ghp-import PyPI package is now recommended instead of ghp-import2. Both versions should work, but you can’t have both installed at the same time. (Issue #3499)

Nikola v8.1.2 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v8.1.2. This release has a bunch of new features, fixes some bugs, and improves compatibility with some dependencies and Windows.

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 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.

Changes

Features

  • Support for multiple authors per post — comma-separated, enabled by MULTIPLE_AUTHORS_PER_POST setting (Issue #3252)

  • Add navbar_custom_bg theme option to bootstrap4 and document options for bootstrap4 better (Issue #3443)

  • Add Marathi translation

  • Restore caps typogrify filter (wraps strings of capital letters with <span class="caps"> (via Issue #3405)

  • Improve nikola auto performance with rate-limiting, support -n argument to pass to nikola build (Issue #3401)

  • Add support for the Utterances comment system

Bugfixes

  • Fix previewimages (post- and root-relative) in bootblog4/galleries featured posts for non-server-root sites (Issue #3471)

  • Windows: Also fix symlinks when installing from source with pip; if possible, enable Developer Mode and run git config --global core.symlinks true before cloning the Nikola repo

  • Fix clicking on links to image files. baguetteBox now requires a link (<a>) to have an <img> as a child in order to make the link activate the lightbox. (Issue #3472)

  • Fix LINK_CHECK_WHITELIST having issues due to mixing Unicode and bytestrings (Issue #3466)

  • Add support for nbconvert>=6.0.0 (Issue #3457)

  • Read files as utf-8-sig to allow BOM in input files

  • Don’t break slugs with slashes in doc directive (Issue #3450)

  • Avoid warnings from type annotations in auto caused by missing aiohttp (Issue #3451)

  • Ensure query strings and fragments are kept with URL_TYPE = "full_path" (Issue #3448)

  • Don’t run typogrify filters on <title> tag to avoid adding extra tags (Issue #3405)

  • Fix handling of duplicate plugins on Windows

  • Allow else clause in post-list plugin. (Issue #3436)

  • Ensure type metadata value from plugins is preserved (Issue 3445)

  • Fix path handlers with slashes on Windows

Nikola v8.1.1 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v8.1.1. This release is mainly due to an incorrect PGP key being used for the PyPI artifacts; three regressions were also fixed in this release.

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 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.

Changes

Bugfixes

  • Default to no line numbers in code blocks, honor CodeHilite requesting no line numbers. Listing pages still use line numbers (Issue #3426)

  • Remove duplicate MathJax config in bootstrap themes (Issue #3427)

  • Fix doit requirement to doit>=0.32.0 (Issue #3422)

Nikola v8.1.0 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v8.1.0. This release makes a few feature changes, improvements, and fixes a few bugs.

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 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.

Changes

Features

  • Support posts without titles (Issue #3408)

  • Support WebP image scaling (Issue #3399)

  • Use Luxon instead of Moment for fancy dates to make it more lightweight, going from 328k to 68k (Issue #3232)

  • New nikola console -s script.py option to run scripts that access your site (Issue #3385)

  • Allow preview images to be relative to posts for bootblog4 featured posts

  • Change the listings formatting to support word wrap with line numbers and improve appearance

  • Put the current language’s feed links first so that feed readers prefer it (Issue #3248)

  • Added support for default preview image for posts (Issue #3326)

  • Added support for thumbnails in gallery lists (Issue #1771)

Bugfixes

  • Support directory names in REDIRECTIONS (Issue #3421)

  • Return a non-zero error code when nikola github_deploy fails

  • Refactored scale_image causing performance increasing in image resizing.

  • Don’t force absolute links for brand/languages (Issue #3229)

  • Fix RTL mirroring in base theme (:dir() pseudo-class is Firefox only) (Issue #3353)

  • Work around Bootstrap 4 alignment bug for RTL languages (Issue #3353)

  • Handle multiple level of inherit/import nesting in Mako templates correctly (Issue #3349)

  • Output a more informative error when files are missing due to broken symlinks or incorrect TRANSLATIONS_PATTERN values

  • Avoid installing tests package to site-packages, remove it from your environment if it was inadvertently added (Issue #3348)

  • Sometimes hyphenation added hyphens at the beginning of words (Issue #3362)

  • Mark gallery images as "dirty" if EXIF configuration changes (Issue #3357)

  • Fix regression in gallery titles being "index" if there was a index.txt and no title (Issue #3360)

  • Make gallery indexes depend on destination images to avoid multithreading race condition (Issue #3361)

  • Mark gallery thumbnails as lazy loading (Issue #2918)

  • Don't consider JPEG images with EXIF thumbnails as animated (Issue #3332)

  • Use correct language for hyphenation in posts that are not translated to all languages (Issue #3377)

Internal

  • Added Post.source() method to get a Post's object unprocessed contents.

  • Added Post.save() method to modify Post contents.

  • Made is_two_file a property that uses save()

Automating Nikola rebuilds with GitHub Actions

In this guide, we’ll set up GitHub Actions to rebuild a Nikola website and host it on GitHub Pages.

Why?

By using GitHub Actions to build your site, you can easily blog from anywhere you can edit text files. Which means you can blog with only a web browser and GitHub.com. You also won’t need to install Nikola and Python to write. You won’t need a real computer either — a mobile phone could probably access GitHub.com and write something.

Caveats

  • The build might take a couple minutes to finish (1:30 for the demo site; YMMV)

  • When you commit and push to GitHub, the site will be published unconditionally. If you don’t have a copy of Nikola for local use, there is no way to preview your site.

What you need

  • A computer for the initial setup that can run Nikola. You can do it with any OS (Linux, macOS, *BSD, but also Windows).

  • A GitHub account (free)

Setting up Nikola

Start by creating a new Nikola site and customizing it to your liking. Follow the Getting Started guide. You might also want to add support for other input formats, namely Markdown, but this is not a requirement.

After you’re done, you must configure deploying to GitHub in Nikola. There are a few important things you need to take care of:

  • Make your first deployment from your local computer and make sure your site works right. Don’t forget to set up .gitignore.

  • The GITHUB_COMMIT_SOURCE and GITHUB_REMOTE_NAME settings are overridden, so you can use values appropriate for your local builds.

  • Ensure that the correct branch for GitHub Pages is set on GitHub.com.

If everything works, you can make some change to your site (so you see that rebuilding works), but don’t commit it just yet.

Setting up GitHub Actions

Next, we need to set up GitHub Actions. This is really straightforward.

On your source branch, create a file named .github/workflows/main.yml with the following contents:

github-workflow.yml (Source)

on: [push]
jobs:
  nikola_build:
    runs-on: ubuntu-latest
    name: 'Deploy Nikola to GitHub Pages'
    steps:
    - name: Check out
      uses: actions/[email protected]
    - name: Build and Deploy Nikola
      uses: getnikola/[email protected]

There might be a newer version of the action available, you can check the latest version in the getnikola/nikola-action repo on GitHub.

By default, the action will install the latest stable release of Nikola[extras]. If you want to use the bleeding-edge version from master, or want to install some extra dependencies, you can provide a requirements.txt file in the repository.

Commit everything to GitHub:

git add .
git commit -am "Automate builds with GitHub Actions"

Hopefully, GitHub will build your site and deploy. Check the Actions tab in your repository or your e-mail for build details. If there are any errors, make sure you followed this guide to the letter.

Nikola v8.0.4 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v8.0.4. This release fixes a few small bugs, including a date glitch that appeared around New Year’s Eve.

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 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.

Changes

Nikola now supports Python 3.5 or newer. If you are on 3.4, please upgrade to a newer release of Python.

Bugfixes

  • Fix hiding future posts in sitemaps for posts without pretty URLs (Issue #3339)

  • Pass the correct parameters to shortcodes in jupyter notebooks

  • Fix handling of conflicts between posts/pages and indexes generated by CATEGORY_PAGES_FOLLOW_DESTPATH

  • Fix default date format to yyyy-MM-dd to avoid bug with ISO years (Issue #3337)

  • Remove extra_header and extra_footer from base theme due to incompatibility with Mako. The blocks are still available in bootstrap4 and bootblog4. (Issue #3319 via #3291)

  • Show tracebacks when conf.py cannot be imported

  • Fix loading complex config files that import modules (Issue #3314)

  • Fix behavior of header demotion for negative values

  • If FILE_METADATA_REGEXP is set, load metadata from the filename first, then continue with the other sources (Issue #3344)

Nikola v8.0.3 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v8.0.3. This release fixes a few bugs, including a notable one with galleries not working on mobile.

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 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.

Changes

Features

  • Add Friulian translation by aoanla

  • Add extra_header and extra_footer blocks to templates (Issue #3291)

  • Add REST_FILE_INSERTION_ENABLED config option to enable or disable reST external file inclusion directives (Issue #3311)

Bugfixes

  • Support Markdown v3.x (Issue #3173)

  • Fix galleries in Firefox Mobile and when resizing window (Issue #3258)

  • Output <code> tag for double backticks in reST (Issue #3276)

  • Fully switch to HTML5 writer for reST (Issue #3276, getnikola/plugins#294)

  • Make ipynb listings work again

  • Correctly link to listings with spaces in their names

  • import_wordpress plugin doesn't require anymore a translation and can use nikola's default if none provided

  • Wordpress+qtranslate import (--qtranslate option) now works with more recent versions of plugins from the qtranslate family (namely qtranslate-X)

  • Fixed a wordpress import exception when image metadata has floats formated with ',' instead of '.'

Nikola v8.0.2 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v8.0.2. This is a quality-of-life release with a handful of bug fixes, two new translations and a few extra 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 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. (Python 3-only since v8.0.0.)

Changes

  • Make ARCHIVE_PATH, ARCHIVE_FILENAME translatable (Issue #3234)

  • Support configuring Isso via GLOBAL_CONTEXT['isso_config'] (Issue #3225)

  • Handle fragments in doc role (Issue #3212)

  • Slugify references in doc role.

  • Add Interlingua translation by Alberto Mardegan

  • Add Afrikaans translation by Friedel Wolff

  • Support for docutils.conf (Issue #3188)

Bugfixes

  • Avoid random rebuilds with sites whose locales are not fullly supported, and random rebuilds on multilingual sites using Python 3.4/3.5 (Issue #3216)

  • Apply modifications to default_metadata before copying it to other languages

  • Make Commento comments work (Issue #3198)

  • Correctly handle separators in the relative path given to "ignored_assets" key in theme meta files (Issue #3210)

  • Fix error when nikola new_post receives directory name as path (Issue #3207)

  • Add slashes to paths with query strings in nikola serve only if there isn’t one before ?

  • Read listings files as UTF-8

  • Set one-file status basing on default language only (Issue #3191)

  • Don’t warn if post status is set to published explicitly (Issue #3181)

  • Remove mention of Twitter cards requiring an opt-in. This is not true anymore - anyone can use them.

  • fancydates now workwith listdate items (eg. archives)

  • bootstrap4 and bootblog4 themes no longer load moment.js when fancydates are off. (Issue #3231)

Nikola v8.0.1 is out!

On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v8.0.1. Some bugs were fixed; more importantly, we pinned down the Markdown package version due to incompatibilities.

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 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. (Python 3-only since v8.0.0.)

Changes

  • Not compatible with Markdown 3.x yet, this release pins the requirement down to 2.x (until we get 3.x support done)

Features

  • Make URL displayed by nikola auto and nikola serve clickable (Issue #3166)

Bugfixes

  • Pandoc compiler was passing deleted argument (Issue #3171)

  • Make nikola version --check work again (Issue #3170)

  • Set logging level for reST to warning in order to limit noise

  • Fix docinfo removal for sites that use reST docinfo metadata (Issue #3167)