\r\n\r\n\r\n\r\n\r\n"},"Templates/_css":{"text":"\r\n"},"Templates/EmptyToDo":{"text":"@include(./todo)\r\n"},"Templates/EmptyPage":{"text":"\r\n\r\nPage @include(./path) is empty.
\r\n\r\nLinks to this page: \r\n@include(./links)
\r\n\r\n\r\n"},"Templates/EmptyOutline":{"text":"@include(./outline)\r\n"},"System/style":{"text":"body {\r\n\tfont-family: /*worksans,*/ opensans, sans-serif;\r\n\r\n}\r\n\r\n.title img {\r\n\tvertical-align: middle;\r\n}\r\n\r\nh1, h2, h3 {\r\n\tborder-bottom: solid 1px rgba(0, 0, 0, 0.1);\r\n\tpadding-bottom: 5px;\r\n}\r\nh2, h3 {\r\n\tborder-bottom: solid 1px rgba(0, 0, 0, 0.05);\r\n}\r\n\r\n\r\n/* tables */\r\ntable {\r\n\twidth: 100%;\r\n}\r\ntable, td, th {\r\n\tborder-bottom: solid 1px gray;\r\n\tborder-collapse: collapse;\r\n}\r\ntd, th {\r\n\ttext-align: left;\r\n\tpadding: 5px;\r\n}\r\ntr:hover {\r\n\tbackground-color: rgba(0, 0, 0, 0.05);\r\n}\r\n\r\n\r\n.raw,\r\n.text {\r\n\tdisplay: block;\r\n}\r\n\r\n.item.checked {\r\n\topacity: 0.3;\r\n}\r\n.item.checked:hover {\r\n\topacity: 0.8;\r\n}\r\n.item.checked .item-content * {\r\n\ttext-decoration: line-through;\r\n}\r\n\r\n.button {\r\n\ttext-decoration: none;\r\n}\r\n.button:last-child {\r\n\tmargin-right: 5px;\r\n}\r\n\r\n.separator~* {\r\n\tfloat: right;\r\n}\r\n\r\npre {\r\n\tdisplay: block;\r\n\tbackground-color: rgba(0, 0, 0, 0.05);\r\n\tpadding: 10px;\r\n\tpadding-bottom: 15px;\r\n\r\n\t-moz-tab-size: 4;\r\n\t-o-tab-size: 4;\r\n\ttab-size: 4;\r\n}\r\n\r\n.item:hover {\r\n\tbackground-color: rgba(0, 0, 0, 0.05);\r\n}\r\n.item .button {\r\n\tdisplay: none;\r\n}\r\n.item:hover .button {\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.sort-handle {\r\n\topacity: 0.1;\r\n\tpadding-left: 5px;\r\n\tpadding-right: 5px;\r\n\tcursor: pointer;\r\n\ttext-decoration: none;\r\n}\r\n.item:hover .sort-handle {\r\n\topacity: 0.3;\r\n}\r\n.sort-placeholder {\r\n\tdisplay: block;\r\n}\r\n\r\n/* @filter(-wikiword) */\r\n/* @filter(text) */\r\n/* vim:set ts=4 sw=4 ft=css : */\r\n"},"Doc/Templates":{"text":"XXX Document the template structure here XXX\r\n"},"Doc/Path":{"text":"#  pWiki Path\r\n\r\nA Wiki is a set of _pages_, each uniquely defined by it's _title_. Titles \r\nare traditionally formatted as WikiWords. pWiki closely follows this \r\nculture, while not restricting either page title formatting nor page \r\nnesting (nested paths), though in the general case following the Wiki \r\nstyle is recommended.\r\n\r\n\r\n\r\n## Basic terminology\r\n\r\n**Path** \r\n_One or more strings (or parts) separated by \"/\" that identifies a view._\r\n\r\nWe call the last _part_ in a path sequence a _title_.\r\n\r\nWe call the sub-path without the _title_ a _basedir_ or simply _dir_.\r\n\r\nIn pWiki, there is no distinction between a page and a _directory_, thus\r\nwe do not use the later term, instead, we may use the term _sub-page_.\r\n\r\nPaths are case sensitive.\r\n\r\n\r\n**Page** \r\n_A set of data associated with a path._\r\n\r\nA page is identified by it's path, but this does not require every\r\nsub-path of that path to exist -- the full path is the identifier.\r\n\r\nNot every path _identifies_ a page, but every path _resolves_ to a page.\r\n\r\nSome pages are _bootstrapped_, i.e. are predefined in pWiki, these pages\r\ncan be overridden but can not be removed. This is done to make it simple \r\nto revert to the default state if something goes wrong.\r\n\r\n\r\n**View** \r\n_A path that resolves to a page that may or may not be at (identified by) \r\nthat specific path._\r\n\r\nA _view's_ path may match that of a specific page or may not match any\r\npage directly, but any view will resolve to a page via the _acquisition \r\nprocess_\r\n\r\nAny page is a view, every view resolves to a page, but not every view \r\nis a page.\r\n\r\n(see: _Page acquisiton_ below)\r\n\r\n\r\n**\\WikiWord** \r\n_A WikiWork is a specially formated string that is treated as a link in\r\npage text_\r\n\r\nIn pWiki a simple WikiWord is any string starting with a capital letter,\r\nmust contain at least and one more capital letter and can consist of \r\nletters, numbers, underscores (WikiWord itself is a good example)\r\n\r\nA WikiWord path (_WikiPath_) is a set of path parts separated by '/' the\r\nfirst part must start with a capital letter and the rest can contain \r\nletters, numbers and/or underscores (example: Path/to/somepage).\r\n\r\n_Note that this is not actually a part of the path specification but it \r\nis part of the Wiki culture and a convenient way to automatically link \r\nto pages (handled by pWiki macros when rendering pages)._\r\n\r\n\r\n\r\n**Special path characters** \r\nTitles of _user pages_ must not contain the leading underscore `_` \r\ncharacter, such paths are used internally.\r\n\r\n\r\n\r\n## Page acquisition\r\n\r\npWiki path system differs from how traditional file system paths are \r\nhandled. In pWiki if a path does not reference a page directly (i.e. \r\nit's a _view_), a search is conducted to find an alternative page. This \r\nsearch is called _page acquisition_.\r\n\r\n**Acquisition process:** \r\n_A set of rules defining how a page is retrieved via a path._\r\n\r\n\r\nThis is used as a simple and uniform mechanism to:\r\n- Get default pages for specific situations \r\n Like [Templates/EmptyPage] to handle the _page not found_ condition.\r\n- Define generic templates/pages accessible by multiple pages in path \r\n A good example would be the viewer used to show this page [Templates/\\_view]\r\n and all of it's _chrome_ like the path in the header and links in the \r\n footer (seen: when viewing through pWiki)\r\n- Overload default templates/pages\r\n\r\n\r\n### The acquisition order/rules:\r\n\r\n1. if _path_ matches a specific page, target _page_ is found \r\n1. if _path_ does not match a page:\r\n 1. if _title_ matches a page in the parent _path_, _page_ is found\r\n 1. repeat until we either have a match or reach root (empty _basedir_)\r\n1. if no match is found, check if title exists in [Templates] in _basedir_\r\n1. if no match is found, check if title exists in [/System]\r\n1. if no match is found, repeat process for `EmptyPage` instead of _title_\r\n\r\n\r\n**Example:** \r\n\r\nFor path `Path/To/Page` the following paths are checked in order \r\nand the first matching page is returned:\r\n\r\n- _Check path as-is then go up:_\r\n - `Path/To/Page` \r\n - `Path/Page`\r\n - `Page`\r\n- _Check in `Templates`, in path and up:_\r\n - `Path/To/Templates/Page`\r\n - `Path/Templates/Page`\r\n - `Templates/Page`\r\n- _Check root `System`:_\r\n - `System/Page`\r\n- _Check `EmptyPage` in path, then in templates:_\r\n - `Path/To/EmptyPage`\r\n - `Path/EmptyPage`\r\n - `EmptyPage`\r\n - `Path/To/Templates/EmptyPage`\r\n - `Path/Templates/EmptyPage`\r\n - `Templates/EmptyPage` _(This is guaranteed to exist)_\r\n\r\n\r\n**Exceptions:**\r\n\r\n- `System/settings` is global and _can not be overloaded_ for use as \r\nsystem configuration. This is done for security reasons.\r\n\r\n\r\n\r\n## Default pages\r\n\r\n**EmptyPage** \r\nA page resolved when a page does not exist. Used as a template for \r\nnew/empty pages.\r\n\r\nThis page is guaranteed to exist by the system.\r\n\r\nLocated at: Templates/EmptyPage\r\n\r\n\r\n**EmptyToDo** \r\nUsed as a template for new/empty ToDo pages.\r\n\r\nLocated at: Templates/EmptyToDo\r\n\r\n\r\n**EmptyOutline** \r\nUsed as a template for new/empty outline pages.\r\n\r\nLocated at: Templates/EmptyOutline\r\n\r\n\r\n**NoMatch** \r\nReturned when pattern matches no pages.\r\n\r\n\r\n\r\n## Relative and absolute paths\r\n\r\npWiki follows the traditional path semantics with one addition, the \">>\"\r\nthat is similar to \"..\" but works in the opposite direction, consuming \r\nthe next, i.e. child, path element instead of parent.\r\n\r\nTo illustrate the relative and absolute mechanics:\r\n\r\n| Title\t\t\t\t| Source Page | Path\t\t\t\t | Resolves to\t\t\t\t|\r\n|-------------------|-------------|-----------------------|-------------------------|\r\n| \".\" - current\t\t| \\SourcePage | \\\\./Target/Page\t\t | \\SourcePage/Target/Page |\r\n| \"..\" - parent\t\t| \\SourcePage | \\\\../Target/Page\t | \\Target/Page\t\t\t|\r\n| \">>\"\t\t| \\SourcePage | >>\\/Target/Page | \\SourcePage/Page\t\t|\r\n| \"/\" - root dir\t| \\SourcePage | \\/Target/Page\t\t | \\/Target/Page\t\t\t|\r\n\r\n\r\n_Note that neither a leading \"..\" at root level, nor a trailing \">>\" \r\nin any path, will have any effect, and will simply be ignored (e.g. \r\n\"\\/../Page\" is same as \"/Page\" and \"\\Path/>>\" is the same as \"Path\")_\r\n\r\n\r\n\r\n## Path patterns\r\n\r\nPath patterns are used to match/iterate multiple pages. The syntax is \r\nsimilar to path glob patterns.\r\n\r\n- \"\\*\" - matches any page in a sub-path on one level\r\n- \"\\*\\*\" - matches any page in a sub-path recursively\r\n\r\nNote that neither will match parts of paths that do not explicitly \r\nidentify pages.\r\n\r\n\r\n**Example:**\r\n\r\nXXX revise...\r\n\r\nFor the following paths:\r\n\r\n```\r\nWikiHome\r\nSomePage\r\nPath/to/OtherPage\r\nPath/Page\r\n```\r\n\r\nPatterns and their matches:\r\n- `*` will match:\r\n\t- WikiHome\r\n\t- SomePage\r\n- `**` will match:\r\n\t- WikiHome\r\n\t- SomePage\r\n\t- Path/to/OtherPage\r\n\t- Path/Page\r\n- `\\Path/*` will match:\r\n\t- Path/Page\r\n\r\nNote that neither `\\Path` nor `\\Path/to` does not refer to any real pages,\r\nthus neither is matched by any of the patterns explicitly.\r\n\r\n\r\n\r\n## Path actions\r\n\r\nXXX path elements that perform actions on pages but do not actually \r\ncorrespond to actual pages.\r\n\r\n\r\n\r\n## Path variables\r\n\r\nPath variables are resolved when path is resolved or accessed.\r\n\r\n**`$NOW`** \r\nReplaced with the current time.\r\n\r\n_Also see the `\\@now()` macro: [Doc/Macros]._\r\n\r\n\r\n**`$PATH`** \r\nReplaced with current page path.\r\n\r\n\r\n**`$BASE`** \r\nReplaced with current page basedir.\r\n\r\n\r\n**`$TITLE`** \r\nReplaced with current page title.\r\n\r\n\r\n**`$INDEX`** \r\nReplaced with current page index in pattern matching.\r\n\r\n\r\n\r\n\r\n\r\n"},"Doc/Macros":{"text":"#  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\r\n\r\n\r\n ...text...\r\n\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 \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\r\n- html-like macros -- escaped _the HTML way_\r\n\r\n ```\r\n <include src=\"\\SomePage\"\\>\r\n ```\r\n\r\n Displayed in page as:\r\n\r\n <include src=\"\\SomePage\"\\\\>\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\r\n```\r\n\r\nShow something in HTML but hide in pWiki:\r\n
\r\n<pwiki-comment> ... </pwiki-comment>\r\n
\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\n\r\nWill produce: `1471389217848`\r\n\r\n\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\r\n\r\n\r\n\r\n\r\n- [bootstrap \\_edit](/bootstrap/Templates/_edit.html) – _see the \r\nmacro at the end of the page._\r\n\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 examples see `slot` macro exaples below._\r\n\r\n\r\n\r\n### source (src) / quote (src)\r\n\r\nInsert a page without rendering. This is similar to include but will not\r\nrender the page. \r\n\r\nThe difference between `source` and `quote` is:\r\n- _source_ includes the page as-is\r\n- _quotes_ escapes the page (i.e. _quotes_ it's source) for its code to \r\n display in the rendered HTML correctly.\r\n\r\nArguments:\r\n- `src` -- path to source page.\r\n\r\n**Example:**\r\n\r\n\r\n- [bootstrap css](/bootstrap/Templates/_css.html)\r\n\r\n\r\n\r\n\r\n\r\n### slot (name text)\r\n\r\nDefine or fill a slot.\r\n\r\nFirst occurrence of a `name` will _define_ a slot and fill it with `text`.\r\nEach new occurrence of a name will change slot content.\r\n\r\n**Example:**\r\n\r\n\r\n- [bootstrap view](/bootstrap/Templates/_view.html)\r\n- [bootstrap edit](/bootstrap/Templates/_edit.html)\r\n\r\n\r\n\r\n\r\n\r\n### macro (name src sort) / else ()\r\n\r\nApply macro to source page and include the result.\r\n\r\nThis is similar to include but does not require a separate page.\r\n\r\nBoth `name` and `src` are optional.\r\n\r\nIf `name` is given a _named macro_ is defined. This macro can be later \r\nreferenced (used) by name. A named macro can be redefined/overridden.\r\n\r\nIf `src` is given a macro is applied to a specific page or range of pages\r\n(see: WikiPath).\r\n\r\nFor a macro to be useful it must have a body (`text`), either defined as\r\na named macro or in the current macro.\r\n\r\nArguments:\r\n- `name` -- macro name (optional).\r\n- `src` -- path to source page (optional).\r\n- `sort` -- space separated list of methods to use for item sorting\r\n\r\n\r\n`else` macro is applicable inside `macro`. it is used when the `src` path\r\nof `macro` matches no pages.\r\n\r\n**Example:**\r\n\r\n\r\n- [bootstrap pages](/bootstrap/Templates/pages.html)\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"Doc/About":{"text":""},"Theme/CLI/tree":{"text":"@source(../name)\n \n"},"WikiHome":{"text":"@include(Doc/About)"}}
+
+typeof(module) != "undefined"
+ && (module.exports = Bootstrap)
\ No newline at end of file
diff --git a/v3/bootstrap/Doc.html b/v3/bootstrap/Doc.html
new file mode 100755
index 0000000..db03b84
--- /dev/null
+++ b/v3/bootstrap/Doc.html
@@ -0,0 +1 @@
+@include(./About)
diff --git a/v3/bootstrap/Doc/About.md b/v3/bootstrap/Doc/About.md
new file mode 100755
index 0000000..7d3ec9a
--- /dev/null
+++ b/v3/bootstrap/Doc/About.md
@@ -0,0 +1 @@
+Placeholder file, this will be replaced with /README.md in bootstrap data...
diff --git a/v3/bootstrap/Doc/Macros.md b/v3/bootstrap/Doc/Macros.md
new file mode 100755
index 0000000..1270d61
--- /dev/null
+++ b/v3/bootstrap/Doc/Macros.md
@@ -0,0 +1,252 @@
+#  pWiki Macros
+
+## Syntax
+
+Any macro can be used in any of the two forms, either _inline_ or _HTML-like_.
+
+Inline:
+```
+@macro-name(value)
+```
+
+HTML-style:
+```
+
+
+
+ ...text...
+
+```
+
+The two forms are almost identical, with the only difference being that the
+inline form does not support body text (note that some macros may provide
+this functionality as an argument, namely `slot`).
+
+The two forms exist to fill two distinct functions:
+- inline: compatible with attribute values and short
+- html-like: element-like, simpler when dealing with html
+
+
+
+### Escaping macros
+
+Macros can be escaped for inclusion in the page, the two types of macros
+are escaped a bit differently:
+
+- inline macros -- escaped by preceding with a "\"
+
+ ```
+ \\@include(\SomePage)
+ ```
+
+ Displayed in page as:
+
+ \@include(\SomePage)
+
+
+ _NOTE: if displayed on github, this will show an extra "\" in both
+ cases, this should be ignored as pWiki will consume the escaping "\"
+ in both the code example and the preview._
+
+
+
+- html-like macros -- escaped _the HTML way_
+
+ ```
+ <include src="\SomePage"\>
+ ```
+
+ Displayed in page as:
+
+ <include src="\SomePage"\\>
+
+
+
+### Conditional comments
+
+In addition to HTML and filter-specific comments pWiki provides two types
+of conditional comments that serve two specific functions:
+
+Show something in pWiki but hide it in HTML:
+```
+
+```
+
+Show something in HTML but hide in pWiki:
+
+<pwiki-comment> ... </pwiki-comment>
+
+
+
+This will enable writing documents (mainly in _markdown_) that are usable
+bot from within pWiki as well as outside.
+
+
+## Macros
+
+### now ()
+
+Get current date in seconds since epoch, this is equivalet Javascript's
+`Date.now()`.
+
+This is mostly used for automatically creating paths (see: todo / outline)
+
+This is different from `$NOW` in path (see: Doc/Path) in that this gets
+the date once per page load, i.e. the date changes on page load, while
+`$NOW` is set every time the path is used, i.e. on every click or script
+use.
+
+**Example:**
+```
+\@now()
+```
+
+Will produce: `1471389217848`
+
+
+
+
+
+### filter (name)
+
+Enable or disable a page filter.
+
+A filter is a way to transform the page source.
+
+Arguments:
+- `name` -- filter name. If name is preceded with a '-' then it
+will be forced off. This is useful for disabling _default_ filters, or
+filters added previously in templates.
+
+Filters:
+- wikiword (default)
+- markdown
+
+**Example:**
+
+
+
+
+
+- [bootstrap \_edit](/bootstrap/Templates/_edit.html) – _see the
+macro at the end of the page._
+
+
+
+
+### include (src isolated text)
+
+Include a page. The included page is rendered independently from current
+page and is inserted as-is in macro body.
+
+Note that this will produce a `include` tag in the code that contains
+the included page, this makes this tag not suitable for use anywhere
+but an html element body.
+
+Arguments:
+- `src` -- path to source page.
+- `isolated` -- prevent slots from included page from affecting the including page.
+- `text` -- is used when recursive include is detected and ignored otherwise.
+
+_For examples see `slot` macro exaples below._
+
+
+
+### source (src) / quote (src)
+
+Insert a page without rendering. This is similar to include but will not
+render the page.
+
+The difference between `source` and `quote` is:
+- _source_ includes the page as-is
+- _quotes_ escapes the page (i.e. _quotes_ it's source) for its code to
+ display in the rendered HTML correctly.
+
+Arguments:
+- `src` -- path to source page.
+
+**Example:**
+
+
+- [bootstrap css](/bootstrap/Templates/_css.html)
+
+
+
+
+
+### slot (name text)
+
+Define or fill a slot.
+
+First occurrence of a `name` will _define_ a slot and fill it with `text`.
+Each new occurrence of a name will change slot content.
+
+**Example:**
+
+
+- [bootstrap view](/bootstrap/Templates/_view.html)
+- [bootstrap edit](/bootstrap/Templates/_edit.html)
+
+
+
+
+
+### macro (name src sort) / else ()
+
+Apply macro to source page and include the result.
+
+This is similar to include but does not require a separate page.
+
+Both `name` and `src` are optional.
+
+If `name` is given a _named macro_ is defined. This macro can be later
+referenced (used) by name. A named macro can be redefined/overridden.
+
+If `src` is given a macro is applied to a specific page or range of pages
+(see: WikiPath).
+
+For a macro to be useful it must have a body (`text`), either defined as
+a named macro or in the current macro.
+
+Arguments:
+- `name` -- macro name (optional).
+- `src` -- path to source page (optional).
+- `sort` -- space separated list of methods to use for item sorting
+
+
+`else` macro is applicable inside `macro`. it is used when the `src` path
+of `macro` matches no pages.
+
+**Example:**
+
+
+- [bootstrap pages](/bootstrap/Templates/pages.html)
+
+
+
+
+
+
+
diff --git a/v3/bootstrap/Doc/Path.md b/v3/bootstrap/Doc/Path.md
new file mode 100755
index 0000000..071eb1b
--- /dev/null
+++ b/v3/bootstrap/Doc/Path.md
@@ -0,0 +1,267 @@
+#  pWiki Path
+
+A Wiki is a set of _pages_, each uniquely defined by it's _title_. Titles
+are traditionally formatted as WikiWords. pWiki closely follows this
+culture, while not restricting either page title formatting nor page
+nesting (nested paths), though in the general case following the Wiki
+style is recommended.
+
+
+
+## Basic terminology
+
+**Path**
+_One or more strings (or parts) separated by "/" that identifies a view._
+
+We call the last _part_ in a path sequence a _title_.
+
+We call the sub-path without the _title_ a _basedir_ or simply _dir_.
+
+In pWiki, there is no distinction between a page and a _directory_, thus
+we do not use the later term, instead, we may use the term _sub-page_.
+
+Paths are case sensitive.
+
+
+**Page**
+_A set of data associated with a path._
+
+A page is identified by it's path, but this does not require every
+sub-path of that path to exist -- the full path is the identifier.
+
+Not every path _identifies_ a page, but every path _resolves_ to a page.
+
+Some pages are _bootstrapped_, i.e. are predefined in pWiki, these pages
+can be overridden but can not be removed. This is done to make it simple
+to revert to the default state if something goes wrong.
+
+
+**View**
+_A path that resolves to a page that may or may not be at (identified by)
+that specific path._
+
+A _view's_ path may match that of a specific page or may not match any
+page directly, but any view will resolve to a page via the _acquisition
+process_
+
+Any page is a view, every view resolves to a page, but not every view
+is a page.
+
+(see: _Page acquisiton_ below)
+
+
+**\WikiWord**
+_A WikiWork is a specially formated string that is treated as a link in
+page text_
+
+In pWiki a simple WikiWord is any string starting with a capital letter,
+must contain at least and one more capital letter and can consist of
+letters, numbers, underscores (WikiWord itself is a good example)
+
+A WikiWord path (_WikiPath_) is a set of path parts separated by '/' the
+first part must start with a capital letter and the rest can contain
+letters, numbers and/or underscores (example: Path/to/somepage).
+
+_Note that this is not actually a part of the path specification but it
+is part of the Wiki culture and a convenient way to automatically link
+to pages (handled by pWiki macros when rendering pages)._
+
+
+
+**Special path characters**
+Titles of _user pages_ must not contain the leading underscore `_`
+character, such paths are used internally.
+
+
+
+## Page acquisition
+
+pWiki path system differs from how traditional file system paths are
+handled. In pWiki if a path does not reference a page directly (i.e.
+it's a _view_), a search is conducted to find an alternative page. This
+search is called _page acquisition_.
+
+**Acquisition process:**
+_A set of rules defining how a page is retrieved via a path._
+
+
+This is used as a simple and uniform mechanism to:
+- Get default pages for specific situations
+ Like [Templates/EmptyPage] to handle the _page not found_ condition.
+- Define generic templates/pages accessible by multiple pages in path
+ A good example would be the viewer used to show this page [Templates/\_view]
+ and all of it's _chrome_ like the path in the header and links in the
+ footer (seen: when viewing through pWiki)
+- Overload default templates/pages
+
+
+### The acquisition order/rules:
+
+1. if _path_ matches a specific page, target _page_ is found
+1. if _path_ does not match a page:
+ 1. if _title_ matches a page in the parent _path_, _page_ is found
+ 1. repeat until we either have a match or reach root (empty _basedir_)
+1. if no match is found, check if title exists in [Templates] in _basedir_
+1. if no match is found, check if title exists in [/System]
+1. if no match is found, repeat process for `EmptyPage` instead of _title_
+
+
+**Example:**
+
+For path `Path/To/Page` the following paths are checked in order
+and the first matching page is returned:
+
+- _Check path as-is then go up:_
+ - `Path/To/Page`
+ - `Path/Page`
+ - `Page`
+- _Check in `Templates`, in path and up:_
+ - `Path/To/Templates/Page`
+ - `Path/Templates/Page`
+ - `Templates/Page`
+- _Check root `System`:_
+ - `System/Page`
+- _Check `EmptyPage` in path, then in templates:_
+ - `Path/To/EmptyPage`
+ - `Path/EmptyPage`
+ - `EmptyPage`
+ - `Path/To/Templates/EmptyPage`
+ - `Path/Templates/EmptyPage`
+ - `Templates/EmptyPage` _(This is guaranteed to exist)_
+
+
+**Exceptions:**
+
+- `System/settings` is global and _can not be overloaded_ for use as
+system configuration. This is done for security reasons.
+
+
+
+## Default pages
+
+**EmptyPage**
+A page resolved when a page does not exist. Used as a template for
+new/empty pages.
+
+This page is guaranteed to exist by the system.
+
+Located at: Templates/EmptyPage
+
+
+**EmptyToDo**
+Used as a template for new/empty ToDo pages.
+
+Located at: Templates/EmptyToDo
+
+
+**EmptyOutline**
+Used as a template for new/empty outline pages.
+
+Located at: Templates/EmptyOutline
+
+
+**NoMatch**
+Returned when pattern matches no pages.
+
+
+
+## Relative and absolute paths
+
+pWiki follows the traditional path semantics with one addition, the ">>"
+that is similar to ".." but works in the opposite direction, consuming
+the next, i.e. child, path element instead of parent.
+
+To illustrate the relative and absolute mechanics:
+
+| Title | Source Page | Path | Resolves to |
+|-------------------|-------------|-----------------------|-------------------------|
+| "." - current | \SourcePage | \\./Target/Page | \SourcePage/Target/Page |
+| ".." - parent | \SourcePage | \\../Target/Page | \Target/Page |
+| ">>" | \SourcePage | >>\/Target/Page | \SourcePage/Page |
+| "/" - root dir | \SourcePage | \/Target/Page | \/Target/Page |
+
+
+_Note that neither a leading ".." at root level, nor a trailing ">>"
+in any path, will have any effect, and will simply be ignored (e.g.
+"\/../Page" is same as "/Page" and "\Path/>>" is the same as "Path")_
+
+
+
+## Path patterns
+
+Path patterns are used to match/iterate multiple pages. The syntax is
+similar to path glob patterns.
+
+- "\*" - matches any page in a sub-path on one level
+- "\*\*" - matches any page in a sub-path recursively
+
+Note that neither will match parts of paths that do not explicitly
+identify pages.
+
+
+**Example:**
+
+XXX revise...
+
+For the following paths:
+
+```
+WikiHome
+SomePage
+Path/to/OtherPage
+Path/Page
+```
+
+Patterns and their matches:
+- `*` will match:
+ - WikiHome
+ - SomePage
+- `**` will match:
+ - WikiHome
+ - SomePage
+ - Path/to/OtherPage
+ - Path/Page
+- `\Path/*` will match:
+ - Path/Page
+
+Note that neither `\Path` nor `\Path/to` does not refer to any real pages,
+thus neither is matched by any of the patterns explicitly.
+
+
+
+## Path actions
+
+XXX path elements that perform actions on pages but do not actually
+correspond to actual pages.
+
+
+
+## Path variables
+
+Path variables are resolved when path is resolved or accessed.
+
+**`$NOW`**
+Replaced with the current time.
+
+_Also see the `\@now()` macro: [Doc/Macros]._
+
+
+**`$PATH`**
+Replaced with current page path.
+
+
+**`$BASE`**
+Replaced with current page basedir.
+
+
+**`$TITLE`**
+Replaced with current page title.
+
+
+**`$INDEX`**
+Replaced with current page index in pattern matching.
+
+
+
+
+
diff --git a/v3/bootstrap/Doc/Templates.md b/v3/bootstrap/Doc/Templates.md
new file mode 100755
index 0000000..5f3dc8f
--- /dev/null
+++ b/v3/bootstrap/Doc/Templates.md
@@ -0,0 +1 @@
+XXX Document the template structure here XXX
diff --git a/v3/bootstrap/System/settings.json b/v3/bootstrap/System/settings.json
new file mode 100755
index 0000000..a008ade
--- /dev/null
+++ b/v3/bootstrap/System/settings.json
@@ -0,0 +1,34 @@
+/**********************************************************************
+* !EXPERIMENTAL!
+*
+* These filters are required for .code to be JSON compatible:
+* @filter(json) @filter(-wikiword)
+*
+* NOTE: currently inline editing may mess this up.
+* NOTE: all the comments will be removed before parsing.
+*
+**********************************************************************/
+
+// The actual root data to be parsed...
+{
+ // Wiki config...
+ "HomePage": "WikiHome",
+ "ShowSystemPages": false,
+ "ShowBasePages": true,
+ // NOTE: setting this to true will effectively allow pages to control
+ // your wiki. This is a potential threat if you allow untrusted
+ // content on your wiki...
+ // You are doing this at your own risk!
+ "AllowScripts": false,
+
+ // PeerJS API key...
+ "PeerJS-API-key": "XXX",
+ // PeerJS server URL (leave blank for default)...
+ "PeerJS-Server": null,
+
+ // XXX
+ "CouchDB-Server": null
+}
+
+
+/*********************************************************************/
diff --git a/v3/bootstrap/System/style.css b/v3/bootstrap/System/style.css
new file mode 100755
index 0000000..393f6e5
--- /dev/null
+++ b/v3/bootstrap/System/style.css
@@ -0,0 +1,99 @@
+body {
+ font-family: /*worksans,*/ opensans, sans-serif;
+
+}
+
+.title img {
+ vertical-align: middle;
+}
+
+h1, h2, h3 {
+ border-bottom: solid 1px rgba(0, 0, 0, 0.1);
+ padding-bottom: 5px;
+}
+h2, h3 {
+ border-bottom: solid 1px rgba(0, 0, 0, 0.05);
+}
+
+
+/* tables */
+table {
+ width: 100%;
+}
+table, td, th {
+ border-bottom: solid 1px gray;
+ border-collapse: collapse;
+}
+td, th {
+ text-align: left;
+ padding: 5px;
+}
+tr:hover {
+ background-color: rgba(0, 0, 0, 0.05);
+}
+
+
+.raw,
+.text {
+ display: block;
+}
+
+.item.checked {
+ opacity: 0.3;
+}
+.item.checked:hover {
+ opacity: 0.8;
+}
+.item.checked .item-content * {
+ text-decoration: line-through;
+}
+
+.button {
+ text-decoration: none;
+}
+.button:last-child {
+ margin-right: 5px;
+}
+
+.separator~* {
+ float: right;
+}
+
+pre {
+ display: block;
+ background-color: rgba(0, 0, 0, 0.05);
+ padding: 10px;
+ padding-bottom: 15px;
+
+ -moz-tab-size: 4;
+ -o-tab-size: 4;
+ tab-size: 4;
+}
+
+.item:hover {
+ background-color: rgba(0, 0, 0, 0.05);
+}
+.item .button {
+ display: none;
+}
+.item:hover .button {
+ display: inline-block;
+}
+
+.sort-handle {
+ opacity: 0.1;
+ padding-left: 5px;
+ padding-right: 5px;
+ cursor: pointer;
+ text-decoration: none;
+}
+.item:hover .sort-handle {
+ opacity: 0.3;
+}
+.sort-placeholder {
+ display: block;
+}
+
+/* @filter(-wikiword) */
+/* @filter(text) */
+/* vim:set ts=4 sw=4 ft=css : */
diff --git a/v3/bootstrap/Templates.html b/v3/bootstrap/Templates.html
new file mode 100755
index 0000000..69cf1c9
--- /dev/null
+++ b/v3/bootstrap/Templates.html
@@ -0,0 +1,20 @@
+