Dork About Plugins

Wiki pages delegate to plugins to render markup and otherwise interact with users and other plugins.

We'll review plugins you have seen, show you lists of more, and then make new plugins you can use privately or share with others.

Server operators decide what plugins they will install to render content on their pages. There are dozens of useful plugins bundled with the npm wiki package.

# Familiar

Plugins include documentation as extra pages that appear within all sites hosted by a given server. Here are about pages for those you have already seen. When editing you can call up the appropriate about page with cmd/alt-i.

About Paragraph Plugin that we use for most of our writing of plain text and links.

About Factory Plugin that like a form field will become something else when written in or dropped on.

About Method Plugin that will do and share unit-based calculations with other plugins.

About Activity Plugin that shows what we and others in our neighborhood have been writing.

About Markdown Plugin that adds formatting for italic, bold, bullets, headings and tasks.

About Code Plugin that adds color-coded block format paragraphs for source code and examples.

# Available

We can't say how many plugins are available worldwide since we refuse to have any mandatory central authority.

We can see what plugins are available on a given server by probing the /system/plugins endpoint. json

We can see what plugins are managed along with server and client code in the github.com/fedwiki site. github

We grant to plugins control over our sites. Server operators should be cautious installing plugins to be sure they come from trustworthy people and have been reviewed in the open source community.

# Programming

We've devoted a site to the philosophy, mechanisms and tool chains for writing plugins. See About Plugins

We will create a new plugin, the Plugins Plugin, that renders the list of installed plugins as a list of links to their about pages. You should be familiar with the developer components of Federated Wiki Technology.

The make plugin script will create files for a new plugin to handle items of a new type. The files include an about page with an example of the new item type ready to be rendered by the new plugin. gist

Fetch the list of plugins with a jquery ajax call.

$.getJSON "http:/system/plugins.json", (plugins) ->

For each plugin create the link markup for the about page.

Convert the links to html using wiki conventions.

wiki.resolveLinks markup

Then add this to the dom wrapped in what ever extra formatting you consider appropriate.

Good practice will have logic functions separated from dom manipulation. Include these in the module.exports and write mocha tests for them.

Use wiki to edit the documentation for the plugin. Explain any new markup, include a typical instance and cite the plugin's source repository.

wiki -d . -p 3050

Publish your plugin in git and npm. Server operators can install from your npm, or install from git and use npm for dependences and grunt to build.

Authors can find your plugin in the Factory menu or shift-drag your example from your about documentation.

Readers who encounter pages that expect the plugin may get a warning that the plugin is not installed. They can view the intended content and read the about pages by visiting the author's site.