summaryrefslogtreecommitdiffstats
path: root/roles/wiki/files/var/lib/ikiwiki/IkiWiki
diff options
context:
space:
mode:
Diffstat (limited to 'roles/wiki/files/var/lib/ikiwiki/IkiWiki')
-rw-r--r--roles/wiki/files/var/lib/ikiwiki/IkiWiki/Plugin/isWebsite.pm18
1 files changed, 18 insertions, 0 deletions
diff --git a/roles/wiki/files/var/lib/ikiwiki/IkiWiki/Plugin/isWebsite.pm b/roles/wiki/files/var/lib/ikiwiki/IkiWiki/Plugin/isWebsite.pm
new file mode 100644
index 0000000..c602fd9
--- /dev/null
+++ b/roles/wiki/files/var/lib/ikiwiki/IkiWiki/Plugin/isWebsite.pm
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+
+package IkiWiki::Plugin::isWebsite;
+
+use warnings;
+use strict;
+use IkiWiki 3.00;
+
+sub import {
+ hook(type => "pagetemplate", id => "isWebsite", call => \&pagetemplate);
+}
+
+sub pagetemplate (@) {
+ my %params = @_;
+ $params{template}->param(ISWEBSITE => 1) if $params{page} =~ /^website(?:\/.*)?$/;
+}
+
+1