diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-01-05 21:27:50 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-01-05 21:27:50 -0500 |
commit | 0e7db6bd6f0288b3671daee4ec58b578c7581cee (patch) | |
tree | 2c2966538ae899ff275aeb5560fb1b6b29366545 | |
parent | 80f4ecdc5b329e12af088c6dde01ebafc27d8cbf (diff) | |
parent | e1d94c08f05a57318e3a84bbe37effabfb1b2614 (diff) |
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
-rw-r--r-- | doc/todo/allow_disabling_backlinks.mdwn | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/todo/allow_disabling_backlinks.mdwn b/doc/todo/allow_disabling_backlinks.mdwn new file mode 100644 index 000000000..5dd4876e8 --- /dev/null +++ b/doc/todo/allow_disabling_backlinks.mdwn @@ -0,0 +1,18 @@ +This patch allows disabling the backlinks in the config file by setting nobacklinks to 0. + +It is backwards compatible, and by default enables backlinks in the generated pages. + +<pre> +--- IkiWiki/Render.pm.orig2 2009-01-06 14:54:01.000000000 +1300 ++++ IkiWiki/Render.pm 2009-01-06 14:55:08.000000000 +1300 +@@ -107,7 +107,8 @@ + $template->param(have_actions => 1); + } + +- my @backlinks=sort { $a->{page} cmp $b->{page} } backlinks($page); ++ my @backlinks=sort { $a->{page} cmp $b->{page} } backlinks($page) ++ unless defined $config{nobacklinks} && $config{nobacklinks} == 0; + my ($backlinks, $more_backlinks); + if (@backlinks <= $config{numbacklinks} || ! $config{numbacklinks}) { + $backlinks=\@backlinks; +</pre> |