]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/graphviz.mdwn
web commit by http://id.loopysoft.com/matt/: Slight typo fix
[ikiwiki.git] / doc / plugins / graphviz.mdwn
1 [[template id=plugin name=graphviz author="[[JoshTriplett]]"]]
2 [[tag type/chrome type/format]]
3
4 This plugin allows embedding [graphviz](http://www.graphviz.org/) graphs in a
5 page.  Example usage:
6
7         \[[graph src="a -> b -> c; a -> c;"]]
8
9 Note that graphs will only show up in previews if your browser has
10 [[wikipedia data: URI]] support, or if the same graph already exists on that
11 page.
12
13 Security implications: graphviz does not seem to have any syntax exploitable to
14 perform file access or shell commands on the server.  However, the graphviz
15 plugin does make denial of service attacks somewhat easier: any user with edit
16 privileges can use this plugin to create large files without the need to send
17 large amounts of data, allowing them to more quickly fill the disk, run the
18 server out of memory, or use up large amounts of bandwidth.  Any user can
19 already do these things with just the core of ikiwiki, but the graphviz plugin
20 allows for an amplification attack, since users can send less data to use large
21 amounts of processing time and disk usage.
22
23 The `graph` directive supports the following parameters:
24
25 - `src` - The graphviz source to render.
26 - `type` - The type of graph to render: `graph` or `digraph`.  Defaults to
27   `digraph`.
28 - `prog` - The graphviz program to render with: `dot`, `neato`, `fdp`, `twopi`,
29   or `circo`.  Defaults to `dot`.
30 - `height`, `width` - Limit the size of the graph to a given height and width,
31   in inches. You must specify both to limit the size; otherwise, graphviz will
32   choose a size, without any limit.
33
34 [[if test="enabled(graphviz)" then="""
35 Some example graphs:
36
37 [[graph src="a -> b -> c; a -> b;"]]
38 [[graph src="a -- b -- c -- a;" prog="circo" type="graph"]]
39 """]]