diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2010-04-15 17:31:50 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2010-04-15 17:31:50 -0400 |
commit | 1f7175e891f87c350decc1ec821bebb5adc22c2a (patch) | |
tree | 2b71de1e97f945e073c495fa3814fee0d400d6bd /IkiWiki/Plugin | |
parent | 37a0c2d40beaba9ae050a4eddc925b910d739736 (diff) |
sidebar: Add global_sidebars setting.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/sidebar.pm | 9 |
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); |