summaryrefslogtreecommitdiffstats
path: root/roles/wiki/files/var/lib/ikiwiki/IkiWiki
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-05-31 23:10:53 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:54:00 +0200
commitacb068b4a5af0654d21c2830655b7c6156a2b845 (patch)
treee39d16f7bfa6c631271a9a5bf5720fdc0ea9f5ca /roles/wiki/files/var/lib/ikiwiki/IkiWiki
parente63885bcc0d46bfe58a32fcfc1d02daae8735929 (diff)
Configure ikiwiki (website + wiki).
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