pWiki/bootstrap.js

3 lines
20 KiB
JavaScript
Raw Normal View History

// This file is generated automatically, all changes made here will be lost.
var Bootstrap = {"Doc":{"text":"@include(./About)\r\n"},"Templates":{"text":"<p>\r\nXXX Genereal template description...\r\n</p>\r\n\r\n<macro src=\"./*\">\r\n\t<hr>\r\n\t<h2>\r\n\t\t<a href=\"#@source(./path)/_edit\">@source(./path)</a>\r\n\t</h2>\r\n\t<p>\r\n\t\t<pre><code>@quote(./raw)</code></pre>\r\n\t</p>\r\n</macro>\r\n\r\n<!-- @filter(-wikiword) -->\r\n<!-- vim:set ts=4 sw=4 : -->\r\n"},"Doc/Macros":{"text":"# ![pWiki](img/pWiki-i.jpg) pWiki Macros\r\n\r\n## Syntax\r\n\r\nAny macro can be used in any of the two forms, either _inline_ or _HTML-like_.\r\n\r\nInline:\r\n```\r\n@macro-name(value)\r\n```\r\n\r\nHTML-style:\r\n```\r\n<macro-name arg=\"value\"/>\r\n\r\n<macro-name arg=\"value\">\r\n ...text...\r\n</macro-name>\r\n```\r\n\r\nThe two forms are almost identical, with the only difference being that the \r\ninline form does not support body text (note that some macros may provide\r\nthis functionality as an argument, namely `slot`).\r\n\r\nThe two forms exist to fill two distinct functions:\r\n- inline: compatible with attribute values and short\r\n- html-like: element-like, simpler when dealing with html\r\n\r\n\r\n\r\n### Escaping macros\r\n\r\nMacros can be escaped for inclusion in the page, the two types of macros \r\nare escaped a bit differently:\r\n\r\n- inline macros -- escaped by preceding with a `\\`\r\n\r\n ```\r\n \\\\@include(SomePage)\r\n ```\r\n\r\n Displayed in page as:\r\n\r\n \\@include(SomePage)\r\n\r\n _NOTE: if displayed on github, this will show an extra \"\\\" in both \r\n cases, this should be ignored as pWiki will consume the escaping \"\\\" \r\n in both the code example and the preview._\r\n\r\n\r\n- html-like macros -- escaped _the HTML way_\r\n\r\n ```\r\n &lt;include src=\"SomePage\"\\&gt;\r\n ```\r\n\r\n Displayed in page as:\r\n\r\n &lt;include src=\"SomePage\"\\\\&gt;\r\n\r\n\r\n\r\n### Conditional comments\r\n\r\nIn addition to HTML and filter-specific comments pWiki provides two types\r\nof conditional comments that serve two specific functions:\r\n\r\nShow something in pWiki but hide it in HTML:\r\n```\r\n<!--\\[pWiki[ ... ]]-->\r\n```\r\n\r\nShow something in HTML but hide in pWiki:\r\n<pre>\r\n&lt;pwiki-comment&gt; ... &lt;/pwiki-comment&gt;\r\n\r\nor\r\n\r\n\\@pwiki-comment( ... )\r\n</pre>\r\n\r\n\r\nThis will enable writing documents (mainly in _markdown_) that are usable \r\nbot from within pWiki as well as outside.\r\n\r\n\r\n## Macros\r\n\r\n### now ()\r\n\r\nGet current date in seconds since epoch, this is equivalet Javascript's\r\n`Date.now()`.\r\n\r\nThis is mostly used for automatically creating paths (see: todo / outline)\r\n\r\nThis is different from `$NOW` in path (see: Doc/Path) in that this gets \r\nthe date once per page load, i.e. the date changes on page load, while \r\n`$NOW` is set every time the path is used, i.e. on every click or script\r\nuse.\r\n\r\n**Example:**\r\n```\r\n\\@now()\r\n```\r\nWill produce: `@now()` \r\n\r\n_NOTE: when viewing from outside of pWiki, this should look like: `1471389217848`_\r\n\r\n\r\n\r\n### filter (name)\r\n\r\nEnable or disable a page filter.\r\n\r\nA filter is a way to transform the page source.\r\n\r\nArguments:\r\n- `name` -- filter name. If name is preceded with a '-' then it \r\nwill be forced off. This is useful for disabling _default_ filters, or \r\nfilters added previously in templates.\r\n\r\nFilters:\r\n- wikiword (default)\r\n- markdown\r\n\r\n**Example:**\r\n- `[./_edit]` -- _see the macro at the end of the page._\r\n\r\n\r\n\r\n### include (src isolated text)\r\n\r\nInclude a page. The included page is rendered independently from current\r\npage and is inserted as-is in macro body.\r\n\r\nNote that this will produce a `include` tag in the code that contains \r\nthe included page, this makes this tag not suitable for use anywhere \r\nbut an html element body.\r\n\r\nArguments:\r\n- `src` -- path to source page.\r\n- `isolated` -- prevent slots from included page from affecting the including page. \r\n- `text` -- is used when recursive include is detected and ignored otherwise.\r\n\r\n_For