-
Notifications
You must be signed in to change notification settings - Fork 441
/
upgrading-to-v6.txt
111 lines (77 loc) · 2.92 KB
/
upgrading-to-v6.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
.. title: Upgrading to v6
.. slug: upgrading-to-v6
.. date: 2013-08-23 23:00:00 UTC-03:00
.. tags:
.. link:
.. description:
Upgrading to v6
===============
:Version: 7.0.0
.. class:: lead
Nikola tries fairly hard to be compatible between versions. However, there were
a few areas which were getting clunky, and needed fxing. So, here's what you may
need to change in your site.
If you need to change anything else, or something breaks, please write at nikola-discuss
and I'll add further tweaks here.
Themes
------
**NOTE**
There is no equivalent for the jinja-default theme yet. If you have a custom,
jinja-based theme, upgrading is probably a bad idea right now.
Themes have been renamed:
* site => bootstrap
* orphan => base
Theme added:
* base-jinja
Themes have been moved out of nikola and into nikola-themes:
* default => oldfashioned at nikola-themes
* jinja-default => not there yet, coming soon
* monospace => monospace at nikola-themes
* site-reveal => reveal at nikola-themes
You may have to change your ``THEME`` setting, or change the ``parent`` if you are
using a custom theme. Also, some templates have been tweaked, but nothing should
break for you.
Facebook comments support changed the HTML tag to:
.. code-block:: mako
<html
%if comment_system == 'facebook':
xmlns:fb="http://ogp.me/ns/fb#"
%endif
lang="${lang}">
If you do not want to use Facebook comments, you can leave the old ``<html
lang="${lang}">`` tag in and it will work just fine.
Comments
~~~~~~~~
If you want a custom theme to support comment systems other than disqus, you will need to:
1) Replace mentions of disqus_helper.tmpl with comments_helper.tmpl
2) Replace mentions of html_disqus with comment_form
3) Replace mentions of html_disqus_link with comment_link
4) Replace mentions of html_disqus_script with comment_link_script
If you don't, your theme should work just fine, but support only disqus comments.
Configuration
-------------
A number of options have been renamed. In most cases, the behaviour
should be **exactly** as before.
However, ``post_pages`` was split into ``POSTS`` and ``PAGES``. Long
story short, anything that had a ``True`` as the ``use_in_feeds``
(last) value goes to ``POSTS`` and anything with ``False`` goes to
``PAGES``. For example:
.. code-block:: python
post_pages = (
("posts/*.txt", "", "post.tmpl", True),
("stories/*.txt", "p", "story.tmpl", False),
("stories/*.html", "s", "story.tmpl", False),
)
### becomes ###
POSTS = (
("posts/*.txt", "", "post.tmpl"),
)
PAGES = (
("stories/*.txt", "p", "story.tmpl"),
("stories/*.html", "s", "story.tmpl"),
)
Also, you will get warnings. That doesn't mean things broke. They are
there to inform you of what's happening, and that you need to tweak your
config.
All the deprecated options will work during the v6 cycle, and only be
removed in v7, when those warnings will become errors.