]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/usage.mdwn
Merge branch 'filter-full'
[git.ikiwiki.info.git] / doc / usage.mdwn
1 # NAME
3 ikiwiki - a wiki compiler
5 # SYNOPSIS
7 ikiwiki [options] source destination
9 ikiwiki --setup setupfile
11 # DESCRIPTION
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`.
17 Note that most options can be shortened to single letters, and boolean
18 flags such as --verbose can be negated with --no-verbose.
20 # MODE OPTIONS
22 These options control the mode that ikiwiki operates in.
24 * --refresh
26   Refresh the wiki, updating any changed pages. This is the default
27   behavior so you don't normally need to specify it.
29 * --rebuild
31   Force a rebuild of all pages.
33 * --setup setupfile
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.
40 * --changesetup setupfile
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.
47   Example, to enable some plugins:
49         ikiwiki --changesetup ~/ikiwiki.setup --plugin goodstuff --plugin calendar
51 * --dumpsetup setupfile
53   Causes ikiwiki to write to the specified setup file, dumping out
54   its current configuration.
56 * --wrappers
58   If used with --setup --refresh, this makes it also update any configured
59   wrappers.
61 * --clean
63   This makes ikiwiki clean up by removing any files it denerated 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.
69 * --cgi
71   Enable [[CGI]] mode. In cgi mode ikiwiki runs as a cgi script, and
72   supports editing pages, signing in, and registration.
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.
78 * --wrapper [file]
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.
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]].
87   Note that the generated wrapper will ignore all command line parameters.
89 * --aggregate
91   If the [[plugins/aggregate]] plugin is enabled, this makes ikiwiki poll
92   configured feeds and save new posts to the srcdir.
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.
98 * --render file
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:
105         ikiwiki --setup ~/ikiwiki.setup --render foo.mdwn
107 * --post-commit
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.
115 * --version
117   Print ikiwiki's version number.
119 # CONFIG OPTIONS
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.
125 * --wikiname name
127   The name of the wiki, default is "wiki".
129 * --templatedir dir
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.
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.
142 * --underlaydir dir
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.
149 * --wrappermode mode
151   Specify a mode to chmod the wrapper to after creating it.
153 * --wrappergroup group
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.
161 * --rcs=svn|git|.., --no-rcs
163   Enable or disable use of a [[revision_control_system|rcs]].
165   The `source` directory will be assumed to be a working copy, or clone, or
166   whatever the revision control system you select uses.
168   In [[CGI]] mode, with a revision control system enabled, pages edited via
169   the web will be committed.
171   No revision control is enabled by default.
173 * --svnrepo /svn/wiki
175   Specify the location of the svn repository for the wiki.
177 * --svnpath trunk
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 "".
184 * --rss, --norss
186   If rss is set, ikiwiki will default to generating RSS feeds for pages
187   that inline a [[blog]].
189 * --allowrss
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.
195 * --atom, --noatom
197   If atom is set, ikiwiki will default to generating Atom feeds for pages
198   that inline a [[blog]].
200 * --allowatom
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.
206 * --pingurl URL
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
212   This parameter can be specified multiple times to specify more than one
213   URL to ping.
215 * --url URL
217   Specifies the URL to the wiki. This is a required parameter in [[CGI]] mode.
219 * --cgiurl http://example.org/ikiwiki.cgi
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.
224 * --historyurl URL
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.
230 * --adminemail you@example.org
232   Specifies the email address that ikiwiki should use for sending email.
234 * --diffurl URL
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.
241 * --exclude regexp
243   Specifies a rexexp of source files to exclude from processing.
244   May be specified multiple times to add to exclude list.
246 * --include regexp
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.
252 * --adminuser name
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; other powers may be added later.
257   May be specified multiple times for multiple admins.
259   For an openid user specify the full URL of the login, including "http://".
261 * --plugin name
263   Enables the use of the specified [[plugin|plugins]] in the wiki. 
264   Note that plugin names are case sensitive.
266 * --disable-plugin name
268   Disables use of a plugin. For example "--disable-plugin htmlscrubber"
269   to do away with HTML sanitization.
271 * --libdir directory
273   Makes ikiwiki look in the specified directory first, before the regular
274   locations when loading library files and plugins. For example, if you set
275   libdir to "/home/you/.ikiwiki/", you can install a foo.pm plugin as
276   "/home/you/.ikiwiki/IkiWiki/Plugin/foo.pm".
278 * --discussion, --no-discussion
280   Enables or disables "Discussion" links from being added to the header of
281   every page. The links are enabled by default.
283 * --numbacklinks n
285   Controls how many backlinks should be displayed at the bottom of a page.
286   Excess backlinks will be hidden in a popup. Default is 10. Set to 0 to
287   disable this feature.
289 * --userdir subdir
291   Optionally, allows links to users of the wiki to link to pages inside a
292   subdirectory of the wiki. The default is to link to pages in the toplevel
293   directory of the wiki.
295 * --htmlext html
297   Configures the extension used for generated html files. Default is "html".
299 * --timeformat format
301   Specify how to display the time or date. The format string is passed to the
302   strftime(3) function.
304 * --verbose, --no-verbose
306   Be verbose about what is being done.
308 * --syslog, --no-syslog
310   Log to syslog(3).
312 * --usedirs, --no-usedirs
314   Toggle creating output files named page/index.html (default) instead of page.html.
316 * --prefix-directives, --no-prefix-directives
318   Toggle new '!'-prefixed syntax for preprocessor directives.  ikiwiki currently
319   defaults to --prefix-directives.
321 * --w3mmode, --no-w3mmode
323   Enable [[w3mmode]], which allows w3m to use ikiwiki as a local CGI script,
324   without a web server.
326 * --sslcookie
328   Only send cookies over an SSL connection. This should prevent them being
329   intercepted. If you enable this option then you must run at least the 
330   CGI portion of ikiwiki over SSL.
332 * --gettime, --no-gettime
334   Extract creation and modification times for each new page from the
335   the revision control's log. This is done automatically when building a
336   wiki for the first time, so you normally do not need to use this option.
338 * --set var=value
339   
340   This allows setting an arbitrary configuration variable, the same as if it
341   were set via a setup file. Since most commonly used options can be
342   configured using command-line switches, you will rarely need to use this.
344 * --set-yaml var=value
346   This is like --set, but it allows setting configuration variables that
347   use complex data structures, by passing in a YAML document.
349 # EXAMPLES
351 * ikiwiki --setup my.setup
353   Completly (re)build the wiki using the specified setup file.
355 * ikiwiki --setup my.setup --refresh
357   Refresh the wiki, using settings from my.setup, and avoid
358   rebuilding any pages that have not changed. This is faster.
360 * ikiwiki --setup my.setup --refresh --wrappers
362   Refresh the wiki, including regnerating all wrapper programs,
363   but do not rebuild all pages. Useful if you have changed something
364   in the setup file that does not need a full wiki rebuild to update
365   all pages, but that you want to immediatly take effect.
367 # ENVIRONMENT
369 * CC
371   This controls what C compiler is used to build wrappers. Default is 'cc'.
373 * CFLAGS
375   This can be used to pass options to the C compiler when building wrappers.
377 # SEE ALSO
379 * [[ikiwiki-mass-rebuild]](8)
380 * [[ikiwiki-update-wikilist]](1)
381 * [[ikiwiki-transition]](1)
383 # AUTHOR
385 Joey Hess <joey@ikiwiki.info>
387 Warning: this page is automatically made into ikiwiki's man page via [mdwn2man](http://git.ikiwiki.info/?p=ikiwiki;a=blob;f=mdwn2man;hb=HEAD).  Edit with care