summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/sidebar.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/sidebar.pm b/IkiWiki/Plugin/sidebar.pm
index d63cb5246..1b302dcf9 100644
--- a/IkiWiki/Plugin/sidebar.pm
+++ b/IkiWiki/Plugin/sidebar.pm
@@ -20,6 +20,13 @@ sub getsetup () {
safe => 1,
rebuild => 1,
},
+ global_sidebars => {
+ type => "boolean",
+ examples => 1,
+ description => "show sidebar page on all pages?"
+ safe => 1,
+ rebuild => 1,
+ },
}
my %pagesidebar;
@@ -55,6 +62,8 @@ sub sidebar_content ($) {
return $pagesidebar{$page} if exists $pagesidebar{$page};
+ return if defined $config{global_sidebars} && !$config{global_sidebars};
+
my $sidebar_page=bestlink($page, "sidebar") || return;
my $sidebar_file=$pagesources{$sidebar_page} || return;
my $sidebar_type=pagetype($sidebar_file);