Skip to content

Commit

Permalink
Nikola v8.0.0b2
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 13, 2018
1 parent db3147d commit b5ca891
Show file tree
Hide file tree
Showing 13 changed files with 319 additions and 31 deletions.
30 changes: 29 additions & 1 deletion listings/conf.py
Expand Up @@ -124,7 +124,7 @@
#
# WARNING: Support for submenus is theme-dependent.
# Only one level of submenus is supported.
# WARNING: Some themes, including the default Bootstrap 3 theme,
# WARNING: Some themes, including the default Bootstrap 4 theme,
# may present issues if the menu is too large.
# (in Bootstrap, the navbar can grow too large and cover contents.)
# WARNING: If you link to directories, make sure to follow
Expand All @@ -140,13 +140,40 @@
),
}

# Alternative navigation links. Works the same way NAVIGATION_LINKS does,
# although themes may not always support them. (translatable)
# (Bootstrap 4: right-side of navbar, Bootblog 4: right side of title)
NAVIGATION_ALT_LINKS = {
DEFAULT_LANG: {}
}

# Name of the theme to use.
THEME = "bootblog4"

# Primary color of your theme. This will be used to customize your theme.
# Must be a HEX value.
THEME_COLOR = '#5670d4'

# Theme configuration. Fully theme-dependent. (translatable)
# Examples below are for bootblog4.
THEME_CONFIG = {
DEFAULT_LANG: {
# Show the latest featured post in a large box, with the previewimage as its background.
'featured_large': False,
# Show the first (remaining) two featured posts in small boxes.
'featured_small': False,
# Show featured posts on mobile.
'featured_on_mobile': True,
# Show image in `featured_large` on mobile.
# `featured_small` displays them only on desktop.
'featured_large_image_on_mobile': True,
# Strip HTML from featured post text.
'featured_strip_html': False,
# Contents of the sidebar, If empty, the sidebar is not displayed.
'sidebar': ''
}
}

# POSTS and PAGES contains (wildcard, destination, template) tuples.
# (translatable)
#
Expand Down Expand Up @@ -465,6 +492,7 @@
# CATEGORY_DESTPATH_NAMES = {
# DEFAULT_LANG: {
# 'webdev': 'Web Development',
# 'webdev/django': 'Web Development/Django',
# 'random': 'Odds and Ends',
# },
# }
Expand Down
70 changes: 70 additions & 0 deletions posts/nikola-v800b2-is-out.txt
@@ -0,0 +1,70 @@
.. title: Nikola v8.0.0b2 is out!
.. slug: nikola-v800b2-is-out
.. date: 2018-05-13 18:46:16 UTC
.. tags: nikola, planet, python, programming, release
.. category:
.. link:
.. description:
.. type: text
.. author: Chris Warrick

On behalf of the Nikola team, I am pleased to announce the immediate
availability of Nikola v8.0.0b2. This release fixes some bugs found in
v8.0.0b1, and adds a few new appearance features (featured posts,
alternate navigation links)

The final version of Nikola v8 should be out in early June.
We welcome everyone to test it with their site and report any issues
to make it the best release ever.

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==8.0.0.b2``.

Changes
=======

Important compatibility changes not mentioned previously
--------------------------------------------------------

* You need ``<a class="reference">`` (instead of ``image-reference``)
to activate the lightbox now

Features
--------

* Add ``NAVIGATION_ALT_LINKS`` option, displayed on the right side in
bootstrap4/bootblog4 (Issue #3030)
* Added documentation of Post objects to list of template variables
(Issue #3003)
* Support featured posts in bootblog4 (Issue #2964)
* Add ``THEME_CONFIG`` setting that themes can use in any way
* Use youtube-nocookie.com for better privacy in ``youtube`` reST
directive and improve the appearance of the player

Featured post details: https://getnikola.com/handbook.html#featured-posts

Bugfixes
--------

* Improve appearance of ``bootblog4`` on mobile (Issue #3069)
* Make ``smartjoin`` more flexible (Issue #3080)
* Make post-list and post_list synonymous (Issue #3083)
* Support ``CATEGORY_DESTPATH_NAMES`` with pages following destpath
* Make ``CATEGORY_PAGES_FOLLOW_DESTPATH`` more resilient (Issue #3081)
* Guard against null items in gallery meta files (Issues #3076, #3077)
* Respect ``USE_FILENAME_AS_TITLE`` in galleries with a meta file
* Fix gallery metadata for multilingual sites (Issue #3078)
52 changes: 41 additions & 11 deletions posts/upgrading-to-nikola-v8.txt
Expand Up @@ -2,11 +2,12 @@
.. slug: upgrading-to-nikola-v8
.. date: 2018-05-05 18:55:43 UTC
.. tags: nikola, documentation
.. category:
.. link:
.. description:
.. category:
.. link:
.. description: How to upgrade to Nikola v8? This is a list of all things you need to take care of first.
.. type: text
.. author: Chris Warrick
.. updated: 2018-05-13 17:00:00

.. class:: lead

Expand All @@ -17,12 +18,23 @@ a few manual changes are required to upgrade.

.. contents::

Revisions to this document
==========================

**2018-05-13:** Beta 2: bootblog4 has featured posts, zen modernized; one new backwards
incompatible change found and described (``reference`` replaces
``image-reference`` in thumbnails)

**2018-05-09:** fixes to style and missing sentences

**2018-05-05:** initial version

How to upgrade
==============

1. Upgrade to the latest v7 version: ``pip install Nikola==7.8.15`` and make sure
there are no outstanding warnings.
2. Upgrade to v8: ``pip install -U --upgrade-strategy=eager Nikola==8.0.0b1``
2. Upgrade to v8: ``pip install -U --upgrade-strategy=eager Nikola==8.0.0b2``
3. Read the upgrade notes below and `the full changelog`__
4. Upgrade all third-party plugins and themes. (``nikola plugin --upgrade``,
``nikola theme --upgrade``)
Expand Down Expand Up @@ -50,14 +62,15 @@ Changes to themes and templates
===============================

The default theme for Nikola was changed to ``bootblog4``, which has a modern,
clean look. There’s also ``bootstrap4`` with the classic look. The
``bootstrap3`` theme is not included by default, but can still be installed
(``nikola theme -i bootstrap3``)
clean look, and can optionally display `featured posts`__.
There’s also ``bootstrap4`` with the classic look. The ``bootstrap3`` theme is
not included by default, but can still be installed (``nikola theme -i
bootstrap3``)

.. TODO: bootblog4 featured posts
__ https://getnikola.com/handbook.html#featured-posts

Moreover, there are a few changes to templates that you must reflect in your
templates:
Moreover, there are a few changes to templates that you must take care of if
you’ve customized any:

* Rename ``crumbs.tmpl`` to ``ui_helper.tmpl`` and the breadcrumbs
``bar`` function to ``breadcrumbs`` (your templates may need
Expand All @@ -67,10 +80,25 @@ templates:
changed to use ``math_helper.tmpl``.
* For galeries and images, colorbox was replaced by baguetteBox.

zen modernized and uses new Font Awesome
----------------------------------------

The Zen theme was thoroughly modernized. The modernization means that:

* Font Awesome v5 is used by default, you can switch to Fork Awesome v1 by
installing ``zen-forkawesome``
* Your ``conf.py`` needs changing to reflect new icon names and classes
(Font Awesome v5 examples: ``'fa fa-tags'`` and ``'fab fa-twitter'``)
* the ``zen-ipython`` theme is not needed anymore, ``zen`` and ``zen-jinja``
handle Jupyter posts correctly (as do the built-in themes)
* the theme internals were rewritten to more closely match built-in themes
(notably, galleries Just Work™)

Backwards incompatible changes
==============================

The following changes may cause issues with blog appearance and links. Please
The following changes may cause issues with blog appearance and links.
Please make sure you’ve taken care of them before deploying.

* Sections are replaced by categories (Issue #2833) — *see below*
* Reading reST docinfo metadata, including first heading as title,
Expand All @@ -80,6 +108,8 @@ The following changes may cause issues with blog appearance and links. Please
``RSS_FILENAME_BASE``)
* Atom feeds for archives and Atom pagination are no longer supported
(Issue #3016)
* **(added 2018-05-10)** You need ``<a class="reference">`` (instead of
``image-reference``) to activate the lightbox now

Removed and renamed settings
============================
Expand Down
2 changes: 1 addition & 1 deletion state_data.json
@@ -1,3 +1,3 @@
{
"last_deploy": "2018-05-13T12:17:00.810718"
"last_deploy": "2018-05-13T18:54:26.666718"
}
35 changes: 35 additions & 0 deletions stories/CHANGES.txt
@@ -1,3 +1,38 @@
New in v8.0.0b2 (changes since Beta 1)
======================================

.. to be merged into one "new in v8.0.0" entry later
Important compatibility changes not mentioned previously
--------------------------------------------------------

* You need ``<a class="reference">`` (instead of ``image-reference``)
to activate the lightbox now

Features
--------

* Add ``NAVIGATION_ALT_LINKS`` option, displayed on the right side in
bootstrap4/bootblog4 (Issue #3030)
* Added documentation of Post objects to list of template variables
(Issue #3003)
* Support featured posts in bootblog4 (Issue #2964)
* Add ``THEME_CONFIG`` setting that themes can use in any way
* Use youtube-nocookie.com for better privacy in ``youtube`` reST
directive and improve the appearance of the player

Bugfixes
--------

* Improve appearance of ``bootblog4`` on mobile (Issue #3069)
* Make ``smartjoin`` more flexible (Issue #3080)
* Make post-list and post_list synonymous (Issue #3083)
* Support ``CATEGORY_DESTPATH_NAMES`` with pages following destpath
* Make ``CATEGORY_PAGES_FOLLOW_DESTPATH`` more resilient (Issue #3081)
* Guard against null items in gallery meta files (Issues #3076, #3077)
* Respect ``USE_FILENAME_AS_TITLE`` in galleries with a meta file
* Fix gallery metadata for multilingual sites (Issue #3078)

New in v8.0.0b1
===============

Expand Down
4 changes: 2 additions & 2 deletions stories/conf.rst
@@ -1,11 +1,11 @@
.. title: Nikola v8.0.0b1 configuration file
.. title: Nikola v8.0.0b2 configuration file
.. slug: conf
.. date: 2014-11-08 18:51:30 UTC
.. description: The Nikola configuration file.
.. type: text
.. author: The Nikola Team
The default config file for Nikola v8.0.0b1 is reproduced below.
The default config file for Nikola v8.0.0b2 is reproduced below.

.. raw:: html

Expand Down
6 changes: 5 additions & 1 deletion stories/creating-a-theme.rst
Expand Up @@ -355,7 +355,7 @@ all the interesting stuff:
That link which says "Skip to main content" is very important for accessibility, so we will leave it in
place. But below, you can see how it creates the "container" div we see in the Nikola page, and the content is
created by ``html_header()`` which is defined in ``base_header.tmpl`` The actual ``nav`` element is done
by the ``html_navigation_links`` function out of the ``NAVIGATION_LINKS`` option.
by the ``html_navigation_links`` function out of the ``NAVIGATION_LINKS`` and ``NAVIGATION_ALT_LINKS`` options. (Let's put the alt links after regular ones; Bootstrap puts it on the right side, for example.)

So, first, lets change that base template to be more lanyon-like:

Expand Down Expand Up @@ -433,6 +433,10 @@ Another problem is that the contents of the nav element are wrong. They are not
<a class="sidebar-nav-item" href="${url}">${text}</a>
%endfor
${template_hooks['menu']()}
%for url, text in navigation_alt_links[lang]:
<a class="sidebar-nav-item" href="${url}">${text}</a>
%endfor
${template_hooks['menu_alt']()}
</nav>
</%def>
Expand Down
2 changes: 1 addition & 1 deletion stories/extending.rst
Expand Up @@ -9,7 +9,7 @@
Extending Nikola
================

:Version: 8.0.0b1
:Version: 8.0.0b2
:Author: Roberto Alsina <ralsina@netmanagers.com.ar>

.. class:: alert alert-primary float-md-right
Expand Down

0 comments on commit b5ca891

Please sign in to comment.