<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>syntax (third party plugin)</title> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" href="../../style.css" type="text/css" /> <link rel="stylesheet" href="../../local.css" type="text/css" /> </head> <body> <div class="page"> <div class="pageheader"> <div class="header"> <span> <span class="parentlinks"> <a href="../../index.html">ikiwiki</a>/ <a href="../../plugins.html">plugins</a>/ <a href="../contrib.html">contrib</a>/ </span> <span class="title"> syntax (third party plugin) </span> </span> </div> </div> <div id="pagebody"> <div id="content" role="main"> <p><span class="infobox"> Plugin: syntax<br /> Author: <span class="createlink">VictorMoral</span><br /> Included in ikiwiki: no<br /> Enabled by default: no<br /> Included in <a href="../goodstuff.html">goodstuff</a>: no<br /> Currently enabled: no<br /> </span></p> <p>The <code>syntax</code> plugin adds support to ikiwiki for syntax highlighting through the <em>vim</em> editor and its perl interface <a href="http://search.cpan.org/search?mode=dist&query=Text%3A%3AVimColor">Text::VimColor</a>. It depends on a functional vim installation.</p> <p>The plugin inserts a fragment of HTML with special marks from a file or a string text. It accepts the following parameters:</p> <ul> <li><strong>type</strong> (optional): this is the file type for vim syntax highlighthing. It can be omitted if the param <em>file</em> exists.</li> <li><strong>file</strong>: Path to the source file. It must exist on every rebuild of the wiki.</li> <li><strong>text</strong>: Text string with the source.</li> <li><strong>description</strong> (optional): little description about the content.</li> <li><strong>linenumbers</strong> (optional): enable the line numering of the source page. A value greater than zero is the first line number.</li> </ul> <p>The params <em>file</em> and <em>text</em> are mutually exclusive.</p> <p>In the case of file parameter, <code>syntax</code> will build a html link for direct download.</p> <p>Example:</p> <pre><code> [[!syntax type="perl" text=""" #!/usr/bin/perl my $a = "World"; print "Hello, ${a}\n"; """]] </code></pre> <p>or </p> <pre><code> [[!syntax file="/examples/hello.pl" description="My first perl program"]] </code></pre> <p>This plugin create the following CSS styles:</p> <ul> <li>syntax</li> <li>synComment</li> <li>synConstant</li> <li>syncIdentifier</li> <li>synPreProc</li> <li>synType</li> <li>synSpecial</li> <li>synUnderlined</li> <li>synError</li> <li>synTodo</li> <li>synTitle</li> </ul> <p>It can be downloaded from <a href="http://taquiones.net/files/misc/">here</a> or through my personal debian repository at <a href="http://taquiones.net/files/debian/">http://taquiones.net/files/debian/</a>. There is a page with examples: <a href="http://taquiones.net/software/syntax-examples.html">http://taquiones.net/software/syntax-examples.html</a></p> <p><em><strong>NOTE:</strong> all the above links are broken</em></p> <p>Any help, comments or critics are welcome at <a href="mailto:victor@taquiones.net">victor@taquiones.net</a>.</p> <h2>version 0.9</h2> <ul> <li>Add a force_subpage parameter for link build</li> <li>Fix a bug in syntax page link</li> <li>Documented a bug with markdown indented text</li> <li>Documented the syntax directive</li> </ul> <h2>version 0.7</h2> <ul> <li>Version change to GPL</li> <li>Add <em>linenumbers</em> parameter</li> <li>The <em>file</em> parameter should be point to a ikiwiki source page. </li> <li>The <em>description</em> parameter will be converted on a URL if the <em>file</em> parameter exist.</li> </ul> <p>I need help for debugging this module. Thanks in advance.</p> </div> </div> <div id="footer" class="pagefooter" role="contentinfo"> <div id="pageinfo"> <div class="tags"> Tags: <a href="../type/chrome.html" rel="tag">type/chrome</a> <a href="../type/slow.html" rel="tag">type/slow</a> </div> <div class="pagedate"> Last edited <span class="date">Tue Feb 26 23:01:54 2019</span> <!-- Created <span class="date">Tue Feb 26 23:01:54 2019</span> --> </div> </div> <!-- from ikiwiki --> </div> </div> </body> </html>