X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/b1c47b4065b245ccf46b99292d7de61800468237..ba19f940bd071f7065246594751dd49041cbbaba:/doc/plugins/write.mdwn diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 17c54ffc7..07bfd72ac 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -3,6 +3,20 @@ written to extend ikiwiki in many ways. Despite the length of this page, it's not really hard. This page is a complete reference to everything a plugin might want to do. There is also a quick [[tutorial]]. +[[!template type="note" text=""" +Ikiwiki is a compiler + +One thing to keep in mind when writing a plugin is that ikiwiki is a wiki +*compiler*. So plugins influence pages when they are built, not when they +are loaded. A plugin that inserts the current time into a page, for +example, will insert the build time. Also, as a compiler, ikiwiki avoids +rebuilding pages unless they have changed, so a plugin that prints some +random or changing thing on a page will generate a static page that won't +change until ikiwiki rebuilds the page for some other reason, like the page +being edited. The [[tutorial]] has some other examples of ways that ikiwiki +being a compiler may trip up the unwary. +"""]] + [[!toc levels=2]] ## Types of plugins @@ -31,18 +45,6 @@ they're the same as far as how they hook into ikiwiki. This document will explain how to write both sorts of plugins, albeit with an emphasis on perl plugins. -## Remember: Ikiwiki is a compiler - -One thing to keep in mind when writing a plugin is that ikiwiki is a wiki -*compiler*. So plugins influence pages when they are built, not when they -are loaded. A plugin that inserts the current time into a page, for -example, will insert the build time. Also, as a compiler, ikiwiki avoids -rebuilding pages unless they have changed, so a plugin that prints some -random or changing thing on a page will generate a static page that won't -change until ikiwiki rebuilds the page for some other reason, like the page -being edited. The [[tutorial]] has some other examples of ways that ikiwiki -being a compiler may trip up the unwary. - ## Plugin interface To import the ikiwiki plugin interface: