]> sipb.mit.edu Git - ikiwiki.git/commitdiff
(no commit message)
authorhttp://puck42.myopenid.com/ <http://puck42.myopenid.com/@web>
Tue, 6 Jan 2009 02:02:43 +0000 (21:02 -0500)
committerJoey Hess <joey@kitenet.net>
Tue, 6 Jan 2009 02:02:43 +0000 (21:02 -0500)
doc/todo/allow_disabling_backlinks.mdwn [new file with mode: 0644]

diff --git a/doc/todo/allow_disabling_backlinks.mdwn b/doc/todo/allow_disabling_backlinks.mdwn
new file mode 100644 (file)
index 0000000..8f27920
--- /dev/null
@@ -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.
+
+<code>
+--- 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;
+</code>