From acb068b4a5af0654d21c2830655b7c6156a2b845 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 31 May 2015 23:10:53 +0200 Subject: Configure ikiwiki (website + wiki). --- .../files/var/lib/ikiwiki/IkiWiki/Plugin/isWebsite.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 roles/wiki/files/var/lib/ikiwiki/IkiWiki/Plugin/isWebsite.pm (limited to 'roles/wiki/files/var/lib/ikiwiki/IkiWiki') 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 -- cgit v1.2.3