diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-28 05:26:49 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-28 05:26:49 +0000 |
commit | 409e62021c5c05e0184a61d0692697c10a0b8283 (patch) | |
tree | b745279c2c83aee71c279692d680dd997c360f45 /doc/plugins | |
parent | 51d20d72f63b6f633747421c7afde171e189f50d (diff) |
* Add getopt hook type, this allows plugins to add new command-line options.
* Add --tagbase option to tag plugin.
Diffstat (limited to 'doc/plugins')
-rw-r--r-- | doc/plugins/tag.mdwn | 6 | ||||
-rw-r--r-- | doc/plugins/write.mdwn | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn index fc8534dcb..517bbaa37 100644 --- a/doc/plugins/tag.mdwn +++ b/doc/plugins/tag.mdwn @@ -6,6 +6,12 @@ The tags work the same as if you had put a (hidden) [[WikiLink]] on the page for each tag, so you can use a [[GlobList]] to link to all pages that are tagged with a given tag, for example. +This plugin has a configuration option. Set --tagbase=tag and all tags will +be located inside a "tag" subdirectory, so in the above example, the tags +are really set to tag/tech, tag/life, and tag/linux. This is a useful way +to avoid having to write the full path to tags, if you want to keep them +grouped together out of the way. + This plugin is included in ikiwiki, but is not enabled by default. If it is enabled, you'll see a note below that this page is tagged with the "tags" tag. diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 90ffca3f4..a31f78b4e 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -64,6 +64,18 @@ with the rest of the page. Beyond PreProcessorDirectives, Other types of hooks that can be used by plugins include: +## getopt + + IkiWiki::hook(type => "getopt", id => "foo", call => \&getopt); + +This allows for plugins to perform their own processing of command-line +options and so add options to the ikiwiki command line. It's called during +command line processing, with @ARGV full of any options that ikiwiki was +not able to process on its own. The function should process any options it +can, removing them from @ARGV. It should take care not to abort if it sees +an option it cannot process, and should just skip over those options and +leave them in @ARGV. + ## checkconfig IkiWiki::hook(type => "checkconfig", id => "foo", call => \&checkconfig); |