]> sipb.mit.edu Git - ikiwiki.git/blob - doc/usage.mdwn
Added a comment: Am i the only one using MacPorts and Ikiwiki together?
[ikiwiki.git] / doc / usage.mdwn
1 # NAME
2
3 ikiwiki - a wiki compiler
4
5 # SYNOPSIS
6
7 ikiwiki [options] source destination
8
9 ikiwiki --setup setupfile
10
11 # DESCRIPTION
12
13 `ikiwiki` is a wiki compiler. It builds static HTML pages for a wiki, from
14 `source` in the [[ikiwiki/Markdown]] language (or others), and writes it out to
15 `destination`.
16
17 Note that most options can be shortened to single letters, and boolean
18 flags such as --verbose can be negated with --no-verbose.
19
20 # MODE OPTIONS
21
22 These options control the mode that ikiwiki operates in.
23
24 * --refresh
25
26   Refresh the wiki, updating any changed pages. This is the default
27   behavior so you don't normally need to specify it.
28
29 * --rebuild
30
31   Force a rebuild of all pages.
32
33 * --setup setupfile
34
35   The default action when --setup is specified is to automatically generate
36   wrappers for a wiki based on data in a setup file, and rebuild the wiki.
37   If you only want to build any changed pages, you can use --refresh with
38   --setup.
39
40 * --changesetup setupfile
41
42   Reads the setup file, adds any configuration changes specified by other
43   options, and writes the new configuration back to the setup file. Also
44   updates any configured wrappers. In this mode, the wiki is not fully
45   rebuilt, unless you also add --rebuild.
46
47   Example, to enable some plugins:
48
49         ikiwiki --changesetup ~/ikiwiki.setup --plugin goodstuff --plugin calendar
50
51 * --dumpsetup setupfile
52
53   Causes ikiwiki to write to the specified setup file, dumping out
54   its current configuration.
55
56 * --wrappers
57
58   If used with --setup --refresh, this makes it also update any configured
59   wrappers.
60
61 * --clean
62
63   This makes ikiwiki clean up by removing any files it generated in the
64   `destination` directory, as well as any configured wrappers, and the
65   `.ikiwiki` state directory. This is mostly useful if you're running
66   ikiwiki in a Makefile to build documentation and want a corresponding
67   `clean` target.
68
69 * --cgi
70
71   Enable [[CGI]] mode. In cgi mode ikiwiki runs as a cgi script, and
72   supports editing pages, signing in, and registration.
73
74   To use ikiwiki as a [[CGI]] program you need to use --wrapper or --setup
75   to generate a wrapper. The wrapper will generally need to run suid 6755 to
76   the user who owns the `source` and `destination` directories.
77
78 * --wrapper [file]
79
80   Generate a wrapper binary that is hardcoded to do action specified by
81   the other options, using the specified input files and `destination`
82   directory. The filename to use for the wrapper is optional.
83
84   The wrapper is designed to be safely made suid and be run by untrusted
85   users, as a [[post-commit]] hook, or as a [[CGI]].
86
87   Note that the generated wrapper will ignore all command line parameters.
88
89 * --aggregate
90
91   If the [[plugins/aggregate]] plugin is enabled, this makes ikiwiki poll
92   configured feeds and save new posts to the srcdir.
93
94   Note that to rebuild previously aggregated posts, use the --rebuild option
95   along with this one. --rebuild will also force feeds to be polled even if
96   they were polled recently.
97
98 * --render file
99
100   Renders a single file, outputting the resulting html. Does not save state,
101   so this cannot be used for building whole wikis, but it is useful for
102   previewing an edited file at the command line. Generally used in conjunction
103   with --setup to load in a wiki's setup:
104
105         ikiwiki --setup ~/ikiwiki.setup --render foo.mdwn
106
107 * --post-commit
108
109   Run in post-commit mode, the same as if called by a [[post-commit]] hook.
110   This is probably only useful when using ikiwiki with a web server on one host
111   and a repository on another, to allow the repository's real post-commit
112   hook to ssh to the web server host and manually run ikiwiki to update
113   the web site.
114
115 * --version
116
117   Print ikiwiki's version number.
118
119 # CONFIG OPTIONS
120
121 These options configure the wiki. Note that [[plugins]] can add additional
122 configuration options of their own. All of these options and more besides can
123 also be configured using a setup file.
124
125 * --wikiname name
126
127   The name of the wiki, default is "wiki".
128
129 * --templatedir dir
130
131   Specify the directory that [[templates|templates]] are stored in.
132   Default is `/usr/share/ikiwiki/templates`, or another location as configured at
133   build time. If the templatedir is changed, missing templates will still
134   be searched for in the default location as a fallback. Templates can also be
135   placed in the "templates/" subdirectory of the srcdir.
136
137   Note that if you choose to copy and modify ikiwiki's templates, you will need
138   to be careful to keep them up to date when upgrading to new versions of
139   ikiwiki. Old versions of templates do not always work with new ikiwiki
140   versions.
141
142 * --underlaydir dir
143
144   Specify the directory that is used to underlay the source directory.
145   Source files will be taken from here unless overridden by a file in the
146   source directory. Default is `/usr/share/ikiwiki/basewiki` or another
147   location as configured at build time.
148
149 * --wrappermode mode
150
151   Specify a mode to chmod the wrapper to after creating it.
152
153 * --wrappergroup group
154
155   Specify what unix group the wrapper should be owned by. This can be
156   useful if the wrapper needs to be owned by a group other than the default.
157   For example, if a project has a repository with multiple committers with
158   access controlled by a group, it makes sense for the ikiwiki wrappers
159   to run setgid to that group.
160
161 * --rcs=svn|git|.., --no-rcs
162
163   Enable or disable use of a [[revision_control_system|rcs]].
164
165   The `source` directory will be assumed to be a working copy, or clone, or
166   whatever the revision control system you select uses.
167
168   In [[CGI]] mode, with a revision control system enabled, pages edited via
169   the web will be committed.
170
171   No revision control is enabled by default.
172
173 * --svnrepo /svn/wiki
174
175   Specify the location of the svn repository for the wiki.
176
177 * --svnpath trunk
178
179   Specify the path inside your svn repository where the wiki is located.
180   This defaults to `trunk`; change it if your wiki is at some other path
181   inside the repository. If your wiki is rooted at the top of the repository,
182   set svnpath to "".
183
184 * --rss, --norss
185
186   If rss is set, ikiwiki will default to generating RSS feeds for pages
187   that inline a [[blog]].
188
189 * --allowrss
190
191   If allowrss is set, and rss is not set, ikiwiki will not default to
192   generating RSS feeds, but setting `rss=yes` in the inline directive can
193   override this default and generate a feed.
194
195 * --atom, --noatom
196
197   If atom is set, ikiwiki will default to generating Atom feeds for pages
198   that inline a [[blog]].
199
200 * --allowatom
201
202   If allowatom is set, and rss is not set, ikiwiki will not default to
203   generating Atom feeds, but setting `atom=yes` in the inline directive can
204   override this default and generate a feed.
205
206 * --pingurl URL
207
208   Set this to the URL of an XML-RPC service to ping when an RSS feed is
209   updated. For example, to ping Technorati, use the URL
210   http://rpc.technorati.com/rpc/ping
211
212   This parameter can be specified multiple times to specify more than one
213   URL to ping.
214
215 * --url URL
216
217   Specifies the URL to the wiki. This is a required parameter in [[CGI]] mode.
218
219 * --cgiurl http://example.org/ikiwiki.cgi
220
221   Specifies the URL to the ikiwiki [[CGI]] script wrapper. Required when
222   building the wiki for links to the cgi script to be generated.
223
224 * --historyurl URL
225
226   Specifies the URL to link to for page history browsing. In the URL,
227   "\[[file]]" is replaced with the file to browse. It's common to use
228   [[ViewVC]] for this.
229
230 * --adminemail you@example.org
231
232   Specifies the email address that ikiwiki should use for sending email.
233
234 * --diffurl URL
235
236   Specifies the URL to link to for a diff of changes to a page. In the URL,
237   "\[[file]]" is replaced with the file to browse, "\[[r1]]" is the old
238   revision of the page, and "\[[r2]]" is the new revision. It's common to use
239   [[ViewVC]] for this.
240
241 * --exclude regexp
242
243   Specifies a rexexp of source files to exclude from processing.
244   May be specified multiple times to add to exclude list.
245
246 * --include regexp
247
248   Specifies a rexexp of source files, that would normally be excluded,
249   but that you wish to include in processing.
250   May be specified multiple times to add to include list.
251
252 * --adminuser name
253
254   Specifies a username of a user (or, if openid is enabled, an openid) 
255   who has the powers of a wiki admin. Currently allows locking of any page,
256   and [[banning|banned_users]] users, as well as powers granted by
257   enabled plugins (such as [[moderating comments|plugins/moderatedcomments]] 
258   and [[plugins/websetup]]. May be specified multiple times for multiple
259   admins.
260
261   For an openid user specify the full URL of the login, including "http://".
262
263 * --plugin name
264
265   Enables the use of the specified [[plugin|plugins]] in the wiki. 
266   Note that plugin names are case sensitive.
267
268 * --disable-plugin name
269
270   Disables use of a plugin. For example "--disable-plugin htmlscrubber"
271   to do away with HTML sanitization.
272
273 * --libdir directory
274
275   Makes ikiwiki look in the specified directory first, before the regular
276   locations when loading library files and plugins. For example, if you set
277   libdir to "/home/you/.ikiwiki/", you can install a foo.pm plugin as
278   "/home/you/.ikiwiki/IkiWiki/Plugin/foo.pm".
279
280 * --discussion, --no-discussion
281
282   Enables or disables "Discussion" links from being added to the header of
283   every page. The links are enabled by default.
284
285 * --numbacklinks n
286
287   Controls how many backlinks should be displayed at the bottom of a page.
288   Excess backlinks will be hidden in a popup. Default is 10. Set to 0 to
289   disable this feature.
290
291 * --userdir subdir
292
293   Optionally, allows links to users of the wiki to link to pages inside a
294   subdirectory of the wiki. The default is to link to pages in the toplevel
295   directory of the wiki.
296
297 * --htmlext html
298
299   Configures the extension used for generated html files. Default is "html".
300
301 * --timeformat format
302
303   Specify how to display the time or date. The format string is passed to the
304   strftime(3) function.
305
306 * --verbose, --no-verbose
307
308   Be verbose about what is being done.
309
310 * --syslog, --no-syslog
311
312   Log to syslog(3).
313
314 * --usedirs, --no-usedirs
315
316   Toggle creating output files named page/index.html (default) instead of page.html.
317
318 * --prefix-directives, --no-prefix-directives
319
320   Toggle new '!'-prefixed syntax for preprocessor directives.  ikiwiki currently
321   defaults to --prefix-directives.
322
323 * --w3mmode, --no-w3mmode
324
325   Enable [[w3mmode]], which allows w3m to use ikiwiki as a local CGI script,
326   without a web server.
327
328 * --sslcookie
329
330   Only send cookies over an SSL connection. This should prevent them being
331   intercepted. If you enable this option then you must run at least the 
332   CGI portion of ikiwiki over SSL.
333
334 * --gettime, --no-gettime
335
336   Extract creation and modification times for each new page from the
337   the revision control's log. This is done automatically when building a
338   wiki for the first time, so you normally do not need to use this option.
339
340 * --set var=value
341   
342   This allows setting an arbitrary configuration variable, the same as if it
343   were set via a setup file. Since most commonly used options can be
344   configured using command-line switches, you will rarely need to use this.
345
346 * --set-yaml var=value
347
348   This is like --set, but it allows setting configuration variables that
349   use complex data structures, by passing in a YAML document.
350
351 # EXAMPLES
352
353 * ikiwiki --setup my.setup
354
355   Completely (re)build the wiki using the specified setup file.
356
357 * ikiwiki --setup my.setup --refresh
358
359   Refresh the wiki, using settings from my.setup, and avoid
360   rebuilding any pages that have not changed. This is faster.
361
362 * ikiwiki --setup my.setup --refresh --wrappers
363
364   Refresh the wiki, including regnerating all wrapper programs,
365   but do not rebuild all pages. Useful if you have changed something
366   in the setup file that does not need a full wiki rebuild to update
367   all pages, but that you want to immediatly take effect.
368
369 # ENVIRONMENT
370
371 * CC
372
373   This controls what C compiler is used to build wrappers. Default is 'cc'.
374
375 * CFLAGS
376
377   This can be used to pass options to the C compiler when building wrappers.
378
379 # SEE ALSO
380
381 * [[ikiwiki-mass-rebuild]](8)
382 * [[ikiwiki-update-wikilist]](1)
383 * [[ikiwiki-transition]](1)
384
385 # AUTHOR
386
387 Joey Hess <joey@ikiwiki.info>
388
389 Warning: Automatically converted into a man page by mdwn2man. Edit with care