]> sipb.mit.edu Git - ikiwiki.git/blob - doc/tips/upgrade_to_3.0.mdwn
Minor changes
[ikiwiki.git] / doc / tips / upgrade_to_3.0.mdwn
1 Version 3.0 of ikiwiki makes some significant changes, which
2 you will need to deal with when upgrading from ikiwiki 2.x.
3
4 [[!toc ]]
5
6 ## setup file format change
7
8 The layout of the setup file changed in a significant way in version 2.60
9 of ikiwiki. If you have not changed yours to the new format, now would be a
10 good time to do so. Some new features, like the [[plugins/websetup]]
11 interface, need the new format setup file.
12   
13 You can convert old setup files into the new format by running
14 `ikiwiki-transition setupformat your.setup`
15
16 ## moving settings from Preferences page
17
18 The admin preferences page used to have settings for allowed attachments,
19 locked pages, and banned users. These three settings have moved to the
20 setup file, and will no longer appear on the admin preferences page once
21 your wiki is upgraded to 3.0.
22
23 You can move these preferences into the setup file by running
24 `ikiwiki-transition moveprefs your.setup; ikiwiki -setup your.setup -refresh -wrappers`
25
26 (Make sure you have converted the setup file to the new format first.)
27
28 ## prefix directives
29
30 In 3.0, the syntax ikiwiki uses for [[directives|ikiwiki/directive]] has
31 changed, requiring that the directive start with a bang: 
32
33         \[[!directive ...]]
34
35 If you would like to keep the old syntax, it is still supported, add the
36 following to your setup file:
37         
38         prefix_directives => 0,
39
40 To convert to the new syntax, make sure that your setup file does *not*
41 contain the above, then run `ikiwiki-transition prefix_directives your.setup`
42
43 (And then commit the changes it makes to pages in your srcdir.)
44
45 ## GlobLists
46
47 In 3.0, the old "GlobList" syntax for [[PageSpecs|ikiwiki/PageSpec]] is no
48 longer supported. A GlobList contains multiple terms, but does not separate
49 them with "and" or "or":
50
51         sandbox !*/Discussion
52
53 To convert this to a modern PageSpec, simply add "and" or "or" as
54 appropriate between terms:
55         
56         sandbox and !*/Discussion
57
58 GlobLists have been deprecated for more than two years. If your wiki dates
59 to the ikiwiki 1.0 era, you should check it for any that might have lurked
60 unnoticed in it since back then. Ikiwiki version 2.72 will print warnings
61 about any GlobLists it sees.
62
63 ## aggregateinternal
64
65 If your wiki uses the [[aggregate|plugins/aggregate]] plugin, it will start
66 to aggregate feeds to special "internal" pages.
67
68 If you don't want this change, you can add the following to your setup
69 file:
70
71         aggregateinternal => 0,
72
73 Otherwise, follow this procedure to upgrade a wiki using the aggregate plugin:
74
75 1. Update all [[PageSpecs|ikiwiki/PageSpec]] that refer to the aggregated
76    pages -- such as those in inlines. Put "internal()" around globs
77    in those PageSpecs. For example, if the PageSpec was `foo/*`, it should
78    be changed to `internal(foo/*)`. This has to be done because internal
79    pages are not matched by regular globs.
80 2. Use [[ikiwiki-transition]] to rename all existing aggregated `.html`
81    files in the srcdir. The command to run is
82    `ikiwiki-transition aggregateinternal your.setup`,
83 3. Refresh the wiki. (`ikiwiki -setup your.setup -refresh`)
84
85 ## embed / googlecalendar
86
87 The googlecalendar plugin has been deprecated for a long time, and is
88 removed in 3.0.
89
90 The embed plugin is also now deprecated, though not yet removed.
91
92 If you use either plugin to embed content from google, youtube, etc,
93 into your wiki, you should instead configure the [[plugins/htmlscrubber]]
94 to skip sanitising some pages, via the `htmlscrubber_skip` setting.
95 See [[embedding_content]] for examples.