inyokaproject / theme-default

Inyoka OSS Theme
Other
7 stars 12 forks source link

Workaround for article ids in planet with jinja2.9 #216

Closed chris34 closed 7 years ago

chris34 commented 7 years ago

With jinja 2.9 a scope-bug of set was fixed. Thus, the variable article_index was not updated in line 86 anymore. As a consequence every article id of a new day started with article_index = 0 again.

As a workaround the index is now saved in a list with only one elemnt, because the scoping of do still works as expected here.

After the release of jinja 2.10 a rewrite with the new namespace-object would be the best solution. See http://jinja.pocoo.org/docs/dev/templates/#assignments