1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-05-09 09:54:05 +00:00
2020-07-04 22:17:08 +05:00

1.9 KiB

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, I guess.

Default plugins

Default MycorrhizaWiki distributive is shipped with several plugins installed.

  • parser/markdown. Support for text/markdown. This parser is powered by russross/blackfriday; this parser is ok, I guess.
  • parser/creole. Support for text/creole. Note: there is no standard Creole MIME type. This parser is powered by m4tty/cajun; this library is somewhat outdated. Perhaps we'll reimplement it.
  • parser/gemini. Support for text/gemini. Not implemented yet.
  • what about shipping BBcode? lol
  • utility/rename. Renaming of non-user hyphae. Not implemented yet.
  • what else?
  • macro/toc. Table of contents. Not implemented yet.
  • 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, 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.

See plugin directory at the root of the repo to get inspired by the present parsers.