X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/1933e3732c03cec44b28611d5436cddddd6f1669..9cee2962e01ef0538cc8498951867a543f91b47d:/doc/plugins/graphviz.mdwn diff --git a/doc/plugins/graphviz.mdwn b/doc/plugins/graphviz.mdwn index fb669ae21..8237ae9dc 100644 --- a/doc/plugins/graphviz.mdwn +++ b/doc/plugins/graphviz.mdwn @@ -1,13 +1,8 @@ -[[template id=plugin name=graphviz author="[[JoshTriplett]]"]] -[[tag type/chrome type/format]] +[[!template id=plugin name=graphviz author="[[JoshTriplett]]"]] +[[!tag type/chrome]] -This plugin allows embedding [graphviz](http://www.graphviz.org/) graphs in a -page. Example usage: - - \[[graph src="a -> b -> c; a -> c;"]] - -Note that graphs will only show up in previews if your browser has -[[wikipedia data: URI]] support, or if the same graph already exists on that +This plugin provides the [[ikiwiki/directive/graph]] [[ikiwiki/directive]]. +This directive allows embedding [graphviz](http://www.graphviz.org/) graphs in a page. Security implications: graphviz does not seem to have any syntax exploitable to @@ -20,22 +15,11 @@ already do these things with just the core of ikiwiki, but the graphviz plugin allows for an amplification attack, since users can send less data to use large amounts of processing time and disk usage. -The `graph` directive supports the following parameters: - -- `src` - The graphviz source to render. -- `type` - The type of graph to render: `graph` or `digraph`. Defaults to - `digraph`. -- `prog` - The graphviz program to render with: `dot`, `neato`, `fdp`, `twopi`, - or `circo`. Defaults to `dot`. -- `height`, `width` - Limit the size of the graph to a given height and width, - in inches. You must specify both to limit the size; otherwise, graphviz will - choose a size, without any limit. - -[[if test="enabled(graphviz)" then=""" +[[!if test="enabled(graphviz)" then=""" Some example graphs: -[[graph src="a -> b -> c; a -> b;"]] -[[graph src="a -- b -- c -- a;" prog="circo" type="graph"]] +[[!graph src="a -> b -> c; a -> b;"]] +[[!graph src="a -- b -- c -- a;" prog="circo" type="graph"]] """]] -This plugin uses the [[cpan Digest::SHA1]] perl module. +This plugin uses the [[!cpan Digest::SHA1]] perl module.