diff --git a/wiki/main/help/plugin/1.markdown b/wiki/main/help/plugin/1.markdown new file mode 100644 index 0000000..c44577c --- /dev/null +++ b/wiki/main/help/plugin/1.markdown @@ -0,0 +1,29 @@ +# Plugin system RFC +MycorrhizaWiki engine does not provide all the functionality a wiki may need and not need. Instead, it relies on the system of plugins. + +## Types of plugins +- **Parser.** They add support for displaying different MIME-types. +- **Utilities.** They add hyphae to the `:spec` mycelium. These hyphae provide administrative functionality. +- **Macros.** Something like [moinmoin ones](http://moinmo.in/HelpOnMacros), I guess. + +## Default plugins +Default MycorrhizaWiki distributive is shipped with several plugins installed. + +- **parser/markdown.** Support for `text/markdown`. +- **parser/gemini.** Support for `text/gemini`. +- *what other markups to ship? I don't want to have markdown as the main one. Textile? ReST? Asciidoc is too complex, so let's not choose it.* +- **utility/rename.** Renaming of non-user hyphae. +- *what else?* +- **macro/toc.** Table of contents. +- *what else?* + +## Plugin implementation +All plugins are written in Go and are compiled together with MycorrhizaWiki. If a wiki's admin decides to add a plugin, they shall recompile the engine with the plugin. + +> Reminds of [something](http://suckless.org/), right? + +*But compiling the engine just to add a plugin is stupid!!* Not really. Also, it makes the architecture more simple and secure. + +*What if an admin doesn't know how to program?* Plugin installation is basically limited to putting some files into a folder, editing the config and running a shell command. No programming required to install a plugin. + + diff --git a/wiki/main/help/plugin/meta.json b/wiki/main/help/plugin/meta.json new file mode 100644 index 0000000..a0a954d --- /dev/null +++ b/wiki/main/help/plugin/meta.json @@ -0,0 +1,19 @@ +{ + "views": 0, + "deleted": false, + "revisions": { + "1": { + "tags": [ + "" + ], + "name": "Plugin", + "comment": "Update :Main/Help/Plugin", + "author": "", + "time": 1593806875, + "text_mime": "text/markdown", + "binary_mime": "", + "text_name": "1.markdown", + "binary_name": "" + } + } +} \ No newline at end of file diff --git a/wiki/main/help/wikilink/1.markdown b/wiki/main/help/wikilink/1.markdown new file mode 100644 index 0000000..9ab1c7b --- /dev/null +++ b/wiki/main/help/wikilink/1.markdown @@ -0,0 +1,46 @@ +# Wikilink RFC + +All parsers for MycorrhizaWiki provide hyperlink support. Usually, they follow HTML convention. + +- `http://example.org/absolute-path` +- `/rooted-path` +- `same-folder-path` +- `../parent-folder-path` + +This is not really convenient for wikis where most of links are either rooted or links to children! + +All parsers of MycorrhizaWiki are expected to support these types of links and convert them to rooted paths. + +- `http://example.org/absolute-path` +- `hypha in main mycelium` +- `::hypha in the same mycelium` +- `:mycelium/hypha in an explicit mycelium` +- `/subhypha` +- `./subhypha` +- `../sibling-hypha` + +**TODO:** create a package that implements this thing. NB: to generate a correct link, it is required to know full name of hypha where the link is used. + +## Markdown extension + +> This is an extension to markdown's syntax that is used in MycorrhizaWiki and nowhere else. + +Text wrapped in `[[` and `]]` is a link that has same text and url. *For some reason it's not possible in Markdown without duplicating url* + +``` +[[x]] == [x](x) +``` + +## Examples + +All examples assume that `:example/test` is the current hypha. + +``` +wikilink actual path +foo == /foo +::foo == /:example/foo +:bar/foo == /:bar/foo +/baz == /:example/baz +./baz == /:example/baz +../qux == /:example/qux +``` diff --git a/wiki/main/help/wikilink/meta.json b/wiki/main/help/wikilink/meta.json new file mode 100644 index 0000000..9bcca8a --- /dev/null +++ b/wiki/main/help/wikilink/meta.json @@ -0,0 +1,19 @@ +{ + "views": 0, + "deleted": false, + "revisions": { + "1": { + "tags": [ + "" + ], + "name": "Wikilink", + "comment": "Update :Main/Help/Wikilink", + "author": "", + "time": 1593807908, + "text_mime": "text/markdown", + "binary_mime": "", + "text_name": "1.markdown", + "binary_name": "" + } + } +} \ No newline at end of file