This page lists all backwards incompatible changes between versions and is intended to ease the process of upgrading. If you are looking for a more comprehensive list of changes check out the changelog.

v0.3.x to v0.4.x

Python 3 support

With v0.4 comes Python 3 support and with it Python 2 support has been dropped. Python 3.5 is now the minimum supported version, though older versions may work.

Configuration filename change

The preferred configuration filename is now mynt.yml. While config.yml is still supported as of v0.4, renaming the configuration file is recommended.

1
$ mv config.yml mynt.yml

Configuring the domain

A protocol is now expected to be specified in the domain configuration setting. If a protocol is not specified, https is assumed.

v0.2.x to v0.3.x

A change to URL formats

The <title> variable in URL formats has been renamed to <slug>. Also note, you can no longer manually set an item's URL via the url frontmatter attribute.

Parser selection has changed

In v0.2.x the parser was determined based on the markup and parser configuration settings. These two configuration settings have been removed in v0.3.x and now the parser is largely determined by the file extension. It is possible to override this behavior by setting the parser frontmatter attribute to the desired parser.

Files outside of ignored directories will now be parsed if possible

In v0.2.x the only files that were rendered outside of ignored directories were those that had an HTML or XML extension. In v0.3.x if a parser is available for the given file it will now be parsed and rendered.

This is being mentioned here as it is common to have a README.md at the root of a site and in v0.3.x this will cause an error. To upgrade you will need to do one of the following:

Several globals and locals have moved

In v0.3.x the archives and tags globals are now properties of the posts global and the post local has been renamed item. This was done to maintain consistency between the posts global and the new content containers.

1
2
3
4
{# v0.2.x #}
{{ get_url(archives[year].url) }}
{{ get_url(tags[tag].url) }}
{{ post.content }}
1
2
3
4
{# v0.3.x #}
{{ get_url(posts.archives[year].url) }}
{{ get_url(posts.tags[tag].url) }}
{{ item.content }}

Global and local dictionary behavior has changed

In v0.2.x iterating over the archives and tags globals as well as the archive.months local would yield a tuple instead of behaving like ordinary Python dictionaries. This is no longer the case in v0.3.x. All dictionaries in mynt now behave just as they would in Python. To upgrade, use the new items filter.

1
2
{# v0.2.x #}
{% for year, archive in archives %} ... {% endfor %}
1
2
{# v0.3.x #}
{% for year, archive in posts.archives|items %} ... {% endfor %}

A Markdown syntax change

In Markdown, the bracket fenced code block syntax is no longer supported. To upgrade, remove the brackets and any trailing whitespace.

1
2
3
4
<!-- v0.2.x -->
~~~ { python }
import this
~~~
1
2
3
4
<!-- v0.3.x -->
~~~ python
import this
~~~
Fork me on Github