Text Formatting
CLiki pages consist of a whitelisted subset of HTML markup with a small set of special markup rules for CLiki-specific features.

Two consecutive newlines in the body of an article are treated as the start of a new paragraph, and a <p> element is inserted in their place.

The current list of allowed HTML elements and attributes can be viewed in the CLiki source code: https://github.com/vsedach/cliki2/blob/master/src/markup.lisp

Special CLiki Markup

  • Internal links: _(Foo) renders as Foo. Cliki page titles aren't case-sensitive, but Cliki will remember the way the title was written when you first created the page, and format it that way forevermore. So, please make some effort to use capitals where appropriate.

  • Topic markers: *(Foo) declares this page to be relevant to topic Foo. This means that (a) this page will be linked in the footer of any page called Foo, (b) it will be listed on pages which include a topic search for Foo. Usually there will be a page called Foo that contains such a search.

  • CLHS references: _H(FOO), where FOO is a standard CL symbol, will expand into a link to the appropriate Hyperspec page. Thanks to Eric Marsden for the code that does this. For example _H(destructuring-bind) becomes a link to destructuring-bind.

  • Topic lists: /(SLIME) renders a list of all pages with the topic marker *(SLIME) as:

    <pre> and <code> tags

    HTML <pre> and <code> tags are treated specially. All text occuring in these elements is treated literally, including any other HTML markup. So:

    <a href="foo.com">links</a> cannot be inserted in <pre> tags, for example

    <code> tags can be used to colorize code (via the colorize library) by providing the lang attribute, like so:

    <code lang="common-lisp"> ...code... </code>

    Some example code looks like:

    (defun foo (x y) (expt x (mod x y)))

    The currently supported language types are: lisp, scheme, elisp, common-lisp, basic-c, c, c++, java

    Escaping

    To escape the special CLiki markup, e.g., on this page when describing how to use the search tag, e.g.

      /(SLIME)
    

    where we don't actually want the search results to be displayed, you must insert some text between the special markup character and the open paren. HTML comments work well. For example, the following:

      /<!-- -->(SLIME)
    

    will be rendered as

    /(SLIME)

    Characters like ampersands and pointy brackets that have special meaning in HTML can be encoded using regular HTML escape codes: < is &lt; and & is &amp;. HTML pound-escaping is also supported: &#37; renders as %.