<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl
# Ikiwiki skeleton plugin. Replace "skeleton" with the name of your plugin
# in the lines below, remove hooks you don't use, and flesh out the code to
# make it do something.
package IkiWiki::Plugin::skeleton;

use warnings;
use strict;
use IkiWiki;

sub import { #{{{
	IkiWiki::hook(type =&gt; "getopt", id =&gt; "skeleton", 
		call =&gt; \&amp;getopt);
	IkiWiki::hook(type =&gt; "checkconfig", id =&gt; "skeleton", 
		call =&gt; \&amp;checkconfig);
	IkiWiki::hook(type =&gt; "preprocess", id =&gt; "skeleton", 
		call =&gt; \&amp;preprocess);
	IkiWiki::hook(type =&gt; "filter", id =&gt; "skeleton", 
		call =&gt; \&amp;filter);
	IkiWiki::hook(type =&gt; "htmlize", id =&gt; "skeleton",
		call =&gt; \&amp;htmlize);
	IkiWiki::hook(type =&gt; "sanitize", id =&gt; "skeleton", 
		call =&gt; \&amp;sanitize);
	IkiWiki::hook(type =&gt; "pagetemplate", id =&gt; "skeleton", 
		call =&gt; \&amp;pagetemplate);
	IkiWiki::hook(type =&gt; "delete", id =&gt; "skeleton", 
		call =&gt; \&amp;delete);
	IkiWiki::hook(type =&gt; "change", id =&gt; "skeleton", 
		call =&gt; \&amp;change);
	IkiWiki::hook(type =&gt; "cgi", id =&gt; "skeleton", 
		call =&gt; \&amp;cgi);
	IkiWiki::hook(type =&gt; "savestate", id =&gt; "savestate", 
		call =&gt; \&amp;savestate);
} # }}}

sub getopt () { #{{{
	IkiWiki::debug("skeleton plugin getopt");
} #}}}

sub checkconfig () { #{{{
	IkiWiki::debug("skeleton plugin checkconfig");
} #}}}

sub preprocess (@) { #{{{
	my %params=@_;

	return "skeleton plugin result";
} # }}}

sub filter (@) { #{{{
	my %params=@_;
	
	IkiWiki::debug("skeleton plugin running as filter");

	return $params{content};
} # }}}

sub htmlize ($) { #{{{
	my $content=shift;

	IkiWiki::debug("skeleton plugin running as htmlize");

	return $content;
} # }}}

sub sanitize ($) { #{{{
	my $content=shift;
	
	IkiWiki::debug("skeleton plugin running as a sanitizer");

	return $content;
} # }}}

sub pagetemplate (@) { #{{{
	my %params=@_;
	my $page=$params{page};
	my $template=$params{template};
	
	IkiWiki::debug("skeleton plugin running as a pagetemplate hook");
} # }}}

sub delete (@) { #{{{
	my @files=@_;

	IkiWiki::debug("skeleton plugin told that files were deleted: @files");
} #}}}

sub change (@) { #{{{
	my @files=@_;

	IkiWiki::debug("skeleton plugin told that changed files were rendered: @files");
} #}}}

sub cgi ($) { #{{{
	my $cgi=shift;

	IkiWiki::debug("skeleton plugin running in cgi");
} #}}}

sub savestate () { #{{{
	IkiWiki::debug("skeleton plugin running in savestate");
} #}}}

1
</pre></body></html>