* Support for looking in multiple directories for underlay files.
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 28 Aug 2007 01:59:01 +0000 (01:59 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 28 Aug 2007 01:59:01 +0000 (01:59 +0000)
* Plugins can add new directories to the search path with the add_underlay
  function.
* Split out smiley underlay files into a separate underlay, so if the plugin
  isn't used, the wiki isn't bloated with all those files.

57 files changed:
IkiWiki.pm
IkiWiki/CGI.pm
IkiWiki/Plugin/smiley.pm
IkiWiki/Render.pm
Makefile.PL
basewiki/blog.mdwn [deleted symlink]
basewiki/favicon.ico [deleted symlink]
basewiki/helponformatting.mdwn [deleted symlink]
basewiki/index.mdwn [deleted symlink]
basewiki/local.css [deleted symlink]
basewiki/markdown.mdwn [deleted symlink]
basewiki/openid.mdwn [deleted symlink]
basewiki/pagespec.mdwn [deleted symlink]
basewiki/preprocessordirective.mdwn [deleted symlink]
basewiki/sandbox.mdwn [deleted symlink]
basewiki/shortcuts.mdwn [deleted symlink]
basewiki/smileys [deleted symlink]
basewiki/smileys.mdwn [deleted symlink]
basewiki/style.css [deleted symlink]
basewiki/subpage [deleted symlink]
basewiki/subpage.mdwn [deleted symlink]
basewiki/templates.mdwn [deleted symlink]
basewiki/templates/note.mdwn [deleted symlink]
basewiki/templates/popup.mdwn [deleted symlink]
basewiki/wikiicons [deleted symlink]
basewiki/wikilink.mdwn [deleted symlink]
debian/changelog
doc/basewiki.mdwn
doc/blog.mdwn
doc/bugs/brokenlinks_false_positives.mdwn [new file with mode: 0644]
doc/plugins/write.mdwn
doc/smileys.mdwn
doc/todo/conditional_underlay_files.mdwn
doc/todo/wikiwyg/discussion.mdwn
po/ikiwiki.pot
t/basewiki_brokenlinks.t
underlays/basewiki/blog.mdwn [new symlink]
underlays/basewiki/favicon.ico [new symlink]
underlays/basewiki/helponformatting.mdwn [new symlink]
underlays/basewiki/index.mdwn [new symlink]
underlays/basewiki/local.css [new symlink]
underlays/basewiki/markdown.mdwn [new symlink]
underlays/basewiki/openid.mdwn [new symlink]
underlays/basewiki/pagespec.mdwn [new symlink]
underlays/basewiki/preprocessordirective.mdwn [new symlink]
underlays/basewiki/sandbox.mdwn [new symlink]
underlays/basewiki/shortcuts.mdwn [new symlink]
underlays/basewiki/style.css [new symlink]
underlays/basewiki/subpage [new symlink]
underlays/basewiki/subpage.mdwn [new symlink]
underlays/basewiki/templates.mdwn [new symlink]
underlays/basewiki/templates/note.mdwn [new symlink]
underlays/basewiki/templates/popup.mdwn [new symlink]
underlays/basewiki/wikiicons [new symlink]
underlays/basewiki/wikilink.mdwn [new symlink]
underlays/smiley/smileys [new symlink]
underlays/smiley/smileys.mdwn [new symlink]

index 18a518f3f57ba06c7fdb4942e90cd13af4a1d882..0485da75c74e83cfc9a8245568e6cfb8079f0f66 100644 (file)
@@ -17,6 +17,7 @@ use Exporter q{import};
 our @EXPORT = qw(hook debug error template htmlpage add_depends pagespec_match
                  bestlink htmllink readfile writefile pagetype srcfile pagename
                  displaytime will_render gettext urlto targetpage
+                add_underlay
                  %config %links %renderedfiles %pagesources %destsources);
 our $VERSION = 2.00; # plugin interface version, next is ikiwiki version
 our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE
@@ -83,6 +84,7 @@ sub defaultconfig () { #{{{
        pingurl => [],
        templatedir => "$installdir/share/ikiwiki/templates",
        underlaydir => "$installdir/share/ikiwiki/basewiki",
+       underlaydirs => [],
        setup => undef,
        adminuser => undef,
        adminemail => undef,
@@ -285,11 +287,26 @@ sub srcfile ($) { #{{{
        my $file=shift;
 
        return "$config{srcdir}/$file" if -e "$config{srcdir}/$file";
-       return "$config{underlaydir}/$file" if -e "$config{underlaydir}/$file";
-       error("internal error: $file cannot be found in $config{srcdir} or $config{underlaydir}");
+       foreach my $dir (@{$config{underlaydirs}}, $config{underlaydir}) {
+               return "$dir/$file" if -e "$dir/$file";
+       }
+       error("internal error: $file cannot be found in $config{srcdir} or underlay");
        return;
 } #}}}
 
+sub add_underlay ($) { #{{{
+       my $dir=shift;
+
+       if ($dir=~/^\//) {
+               unshift @{$config{underlaydirs}}, $dir;
+       }
+       else {
+               unshift @{$config{underlaydirs}}, "$config{underlaydir}/../$dir";
+       }
+
+       return 1;
+} #}}}
+
 sub readfile ($;$$) { #{{{
        my $file=shift;
        my $binary=shift;
index 82b619592e1d9b916b0d9a1037df919edfe8502d..c785e31dec166f2d8ef18caaad14e5bdd37a0734 100644 (file)
@@ -335,7 +335,8 @@ sub cgi_editpage ($$) { #{{{
        # characters.
        my ($page)=$form->field('page');
        $page=titlepage(possibly_foolish_untaint($page));
-       if (! defined $page || ! length $page || file_pruned($page, $config{srcdir}) || $page=~/^\//) {
+       if (! defined $page || ! length $page ||
+           file_pruned($page, $config{srcdir}) || $page=~/^\//) {
                error("bad page name");
        }
        
@@ -512,8 +513,8 @@ sub cgi_editpage ($$) { #{{{
 
                my $exists=-e "$config{srcdir}/$file";
 
-               if ($form->field("do") ne "create" &&
-                   ! $exists && ! -e "$config{underlaydir}/$file") {
+               if ($form->field("do") ne "create" && ! $exists &&
+                   ! eval { srcfile($file) }) {
                        $form->tmpl_param("page_gone", 1);
                        $form->field(name => "do", value => "create", force => 1);
                        $form->tmpl_param("page_select", 0);
index 96e714d3d2acfa88e0b05fb34fe0f92f22243b10..932c2c4fe928f88e8a140482144290b36c2016bb 100644 (file)
@@ -9,6 +9,7 @@ my %smileys;
 my $smiley_regexp;
 
 sub import { #{{{
+       add_underlay("smiley");
        hook(type => "filter", id => "smiley", call => \&filter);
 } # }}}
 
index 5fd0dea0dc080e6bf2fc301f3b306f997eb2e07b..35d663a7a6dfce42e492f3fb05ba54e2dd490cde 100644 (file)
@@ -270,34 +270,37 @@ sub refresh () { #{{{
                        }
                },
        }, $config{srcdir});
-       find({
-               no_chdir => 1,
-               wanted => sub {
-                       $_=decode_utf8($_);
-                       if (file_pruned($_, $config{underlaydir})) {
-                               $File::Find::prune=1;
-                       }
-                       elsif (! -d $_ && ! -l $_) {
-                               my ($f)=/$config{wiki_file_regexp}/; # untaint
-                               if (! defined $f) {
-                                       warn(sprintf(gettext("skipping bad filename %s"), $_)."\n");
+       foreach my $dir (@{$config{underlaydirs}}, $config{underlaydir}) {
+               find({
+                       no_chdir => 1,
+                       wanted => sub {
+                               $_=decode_utf8($_);
+                               if (file_pruned($_, $dir)) {
+                                       $File::Find::prune=1;
                                }
-                               else {
-                                       # Don't add pages that are in the
-                                       # srcdir.
-                                       $f=~s/^\Q$config{underlaydir}\E\/?//;
-                                       if (! -e "$config{srcdir}/$f" && 
-                                           ! -l "$config{srcdir}/$f") {
-                                               my $page=pagename($f);
-                                               if (! $exists{$page}) {
-                                                       push @files, $f;
-                                                       $exists{$page}=1;
+                               elsif (! -d $_ && ! -l $_) {
+                                       my ($f)=/$config{wiki_file_regexp}/; # untaint
+                                       if (! defined $f) {
+                                               warn(sprintf(gettext("skipping bad filename %s"), $_)."\n");
+                                       }
+                                       else {
+                                               $f=~s/^\Q$dir\E\/?//;
+                                               # avoid underlaydir
+                                               # override attacks; see
+                                               # security.mdwn
+                                               if (! -e "$config{srcdir}/$f" && 
+                                                   ! -l "$config{srcdir}/$f") {
+                                                       my $page=pagename($f);
+                                                       if (! $exists{$page}) {
+                                                               push @files, $f;
+                                                               $exists{$page}=1;
+                                                       }
                                                }
                                        }
                                }
-                       }
-               },
-       }, $config{underlaydir});
+                       },
+               }, $dir);
+       };
 
        my %rendered;
 
index aba4239d8536313d4274e63a66a89b3798e4ee1c..1add3cf1c17fe538109c480e1ef1491179e8f87b 100755 (executable)
@@ -32,7 +32,7 @@ ikiwiki.out: ikiwiki.in
 
 extra_build: ikiwiki.out
        LANG= perl -I. $(extramodules) $(tflag) ikiwiki.out doc html --templatedir=templates \
-               --underlaydir=basewiki --nousedirs\
+               --underlaydir=underlays/basewiki --nousedirs\
                --wikiname="ikiwiki" --verbose \
                --exclude=/discussion --no-discussion --userdir=users \
                --plugin=goodstuff \
@@ -49,7 +49,13 @@ extra_clean:
 
 extra_install:
        install -d $(DESTDIR)$(PREFIX)/share/ikiwiki
-       for dir in `find basewiki templates -follow -type d ! -regex '.*\.svn.*'`; do \
+       for dir in `cd underlays && find . -follow -type d ! -regex '.*\.svn.*'`; do \
+               install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
+               for file in `find underlays/$$dir -follow -maxdepth 1 -type f`; do \
+                       install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
+               done; \
+       done
+       for dir in `find templates -follow -type d ! -regex '.*\.svn.*'`; do \
                install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
                for file in `find $$dir -follow -maxdepth 1 -type f`; do \
                        install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$dir; \
diff --git a/basewiki/blog.mdwn b/basewiki/blog.mdwn
deleted file mode 120000 (symlink)
index 1b35deb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/blog.mdwn
\ No newline at end of file
diff --git a/basewiki/favicon.ico b/basewiki/favicon.ico
deleted file mode 120000 (symlink)
index 0572371..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/favicon.ico
\ No newline at end of file
diff --git a/basewiki/helponformatting.mdwn b/basewiki/helponformatting.mdwn
deleted file mode 120000 (symlink)
index 56c810f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/helponformatting.mdwn
\ No newline at end of file
diff --git a/basewiki/index.mdwn b/basewiki/index.mdwn
deleted file mode 120000 (symlink)
index d9f08ac..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/basewiki/index.mdwn
\ No newline at end of file
diff --git a/basewiki/local.css b/basewiki/local.css
deleted file mode 120000 (symlink)
index f081a6a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/local.css
\ No newline at end of file
diff --git a/basewiki/markdown.mdwn b/basewiki/markdown.mdwn
deleted file mode 120000 (symlink)
index 1724cae..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/markdown.mdwn
\ No newline at end of file
diff --git a/basewiki/openid.mdwn b/basewiki/openid.mdwn
deleted file mode 120000 (symlink)
index 3a37eab..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/openid.mdwn
\ No newline at end of file
diff --git a/basewiki/pagespec.mdwn b/basewiki/pagespec.mdwn
deleted file mode 120000 (symlink)
index 71ea44d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/pagespec.mdwn
\ No newline at end of file
diff --git a/basewiki/preprocessordirective.mdwn b/basewiki/preprocessordirective.mdwn
deleted file mode 120000 (symlink)
index f786ed3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/preprocessordirective.mdwn
\ No newline at end of file
diff --git a/basewiki/sandbox.mdwn b/basewiki/sandbox.mdwn
deleted file mode 120000 (symlink)
index e92d4a3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/basewiki/sandbox.mdwn
\ No newline at end of file
diff --git a/basewiki/shortcuts.mdwn b/basewiki/shortcuts.mdwn
deleted file mode 120000 (symlink)
index 33892d7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/shortcuts.mdwn
\ No newline at end of file
diff --git a/basewiki/smileys b/basewiki/smileys
deleted file mode 120000 (symlink)
index 56eec03..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/smileys
\ No newline at end of file
diff --git a/basewiki/smileys.mdwn b/basewiki/smileys.mdwn
deleted file mode 120000 (symlink)
index 057df5a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/smileys.mdwn
\ No newline at end of file
diff --git a/basewiki/style.css b/basewiki/style.css
deleted file mode 120000 (symlink)
index f320096..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/style.css
\ No newline at end of file
diff --git a/basewiki/subpage b/basewiki/subpage
deleted file mode 120000 (symlink)
index 3b66a55..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/subpage
\ No newline at end of file
diff --git a/basewiki/subpage.mdwn b/basewiki/subpage.mdwn
deleted file mode 120000 (symlink)
index 04ec383..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/subpage.mdwn
\ No newline at end of file
diff --git a/basewiki/templates.mdwn b/basewiki/templates.mdwn
deleted file mode 120000 (symlink)
index 414cb42..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/templates.mdwn
\ No newline at end of file
diff --git a/basewiki/templates/note.mdwn b/basewiki/templates/note.mdwn
deleted file mode 120000 (symlink)
index 40337b9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../doc/templates/note.mdwn
\ No newline at end of file
diff --git a/basewiki/templates/popup.mdwn b/basewiki/templates/popup.mdwn
deleted file mode 120000 (symlink)
index 9391631..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../../doc/templates/popup.mdwn
\ No newline at end of file
diff --git a/basewiki/wikiicons b/basewiki/wikiicons
deleted file mode 120000 (symlink)
index 0d4968c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/wikiicons
\ No newline at end of file
diff --git a/basewiki/wikilink.mdwn b/basewiki/wikilink.mdwn
deleted file mode 120000 (symlink)
index f63c38e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../doc/wikilink.mdwn
\ No newline at end of file
index 8552edfd147c6890182a0174722c91b5a78d2e2f..7b8e956e0f71b6bfa1767da2084bc64e19132d01 100644 (file)
@@ -1,8 +1,13 @@
-ikiwiki (2.6.2) UNRELEASED; urgency=low
+ikiwiki (2.7) UNRELEASED; urgency=low
 
   * Add an editcontent hook.
+  * Support for looking in multiple directories for underlay files.
+  * Plugins can add new directories to the search path with the add_underlay
+    function.
+  * Split out smiley underlay files into a separate underlay, so if the plugin
+    isn't used, the wiki isn't bloated with all those files.
 
- -- Joey Hess <joeyh@debian.org>  Sun, 26 Aug 2007 16:50:24 -0400
+ -- Joey Hess <joeyh@debian.org>  Mon, 27 Aug 2007 20:48:51 -0400
 
 ikiwiki (2.6.1) unstable; urgency=low
 
index acc1b3a6098a6a46a34cf35ed74bb0c46785c578..fca8902eb57b73b1a2152435c714a324cb80f894 100644 (file)
@@ -13,7 +13,6 @@ It currently includes these pages:
 * [[pagespec]]
 * [[PreprocessorDirective]]
 * [[shortcuts]]
-* [[smileys]]
 * [[subpage]]
 * [[wikilink]]
 
index be4ed41e249e4088a05224314b241701595029e3..1593278d1aa3aa77af322b58c703a41aaa9c5221 100644 (file)
@@ -67,7 +67,7 @@ directive:
 * `quick` - Build archives in quick mode, without reading page contents for
   metadata. By default, this also turns off generation of any feeds.
 * `template` - Specifies the template to fill out to display each inlined
-  page. By default the `inlinepage` [[template|wikitemplates]] is used, while
+  page. By default the `inlinepage` template is used, while
   the `archivepage` template is used for archives. Set this parameter to
   use some other, custom template, such as the `titlepage` template that
   only shows post titles. Note that you should still set `archive=yes` if
diff --git a/doc/bugs/brokenlinks_false_positives.mdwn b/doc/bugs/brokenlinks_false_positives.mdwn
new file mode 100644 (file)
index 0000000..64287dd
--- /dev/null
@@ -0,0 +1,6 @@
+The [[plugin/brokenlinks]] plugin falsely complains that
+[[helponformatting]] has a broken link to [[smileys]], if the smiley plgin
+is disabled. While the helponformatting page links to it inside a
+conditional, and so doesn't show the link in this case, ikiwiki scans for
+links w/o looking at conditionals and so still thinks the page contains the
+link.
index 0c192eb6412dd1c5005deb562e7c01d9c01f2220..4ec9e8c7bf7cc313d2d83a4384354c54c5708c5a 100644 (file)
@@ -461,8 +461,16 @@ that corresponds to that file.
 #### `srcfile($)`
 
 Given the name of a source file in the wiki, searches for the file in
-the source directory and the underlay directory, and returns the full
-path to the first file found.
+the source directory and the underlay directories (most recently added
+underlays first), and returns the full path to the first file found.
+
+#### `add_underlay($)`
+
+Adds a directory to the set of underlay directories that ikiwiki will
+search for files.
+
+If the directory name is not absolute, ikiwiki will assume it is in
+the parent directory of the configured underlaydir.
 
 #### `displaytime($)`
 
index dfe30430bb99e7ca9be11d0825dea3009da67443..9915ec587a9d5a431c67a38671917589e4394763 100644 (file)
@@ -1,7 +1,3 @@
-[[if test="enabled(smiley)"
-     then="This wiki has smileys **enabled**."
-     else="This wiki has smileys **disabled**."]]
-
 This page is used to control what smileys are supported by the wiki.
 Just write the text of a smiley to display it.
 
index 87f70696bd9b4e7e184d7da9805911ced1426b46..14ab4dac3906d7e3d6ee23f4d46611c110163ffd 100644 (file)
@@ -21,4 +21,9 @@ hackish.
 > plugins were enabled.
 > 
 > Using the conditionals in a page to control what other pages get built
-> feels complex to me, --[[Joey]]
+> feels complex to me.
+> 
+> Instead, this has been implmented as the `add_underlay()` function.
+> [[done]]
+> --[[Joey]]
+
index 642576b7c141d9a3d7e0dd3444e07d2b33ac9049..79bb83a873112f535252c7a442e8057e740aa4c9 100644 (file)
@@ -70,6 +70,9 @@ changes.diff:
     you have something pretty specific in mind. I can talk to you about that more
     on IRC later(assuming my internet is working right).
     * Basically the idea is to change `$config{underlaydir}` to an array..
+      Ok, take a look at the new `add_underlay()` function. You can now just
+      `add_underlay("wikiwyg")` and it'll look in
+      /usr/share/ikiwiki/wikiwyg/ for the files.
 * When is the WIKIWYG variable in misc.tmpl used?
   * The WIKIWYG variable in misc.tmpl is used for the edit page. I believe that is what
     you wanted me to do (Check [Revision 3840][]).
index 6ebf2848dd116fa6110e166ba932dfde58c149b4..e262569f2da5fae2af4e32db1b63487af3746607 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-08-26 13:39-0400\n"
+"POT-Creation-Date: 2007-08-27 21:24-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -36,34 +36,34 @@ msgstr ""
 msgid "Preferences saved."
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:353
+#: ../IkiWiki/CGI.pm:354
 #, perl-format
 msgid "%s is not an editable page"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:432 ../IkiWiki/Plugin/brokenlinks.pm:24
+#: ../IkiWiki/CGI.pm:441 ../IkiWiki/Plugin/brokenlinks.pm:24
 #: ../IkiWiki/Plugin/inline.pm:209 ../IkiWiki/Plugin/opendiscussion.pm:17
 #: ../IkiWiki/Plugin/orphans.pm:28 ../IkiWiki/Render.pm:99
 #: ../IkiWiki/Render.pm:179
 msgid "discussion"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:478
+#: ../IkiWiki/CGI.pm:487
 #, perl-format
 msgid "creating %s"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:496 ../IkiWiki/CGI.pm:514 ../IkiWiki/CGI.pm:524
-#: ../IkiWiki/CGI.pm:550 ../IkiWiki/CGI.pm:594
+#: ../IkiWiki/CGI.pm:505 ../IkiWiki/CGI.pm:523 ../IkiWiki/CGI.pm:533
+#: ../IkiWiki/CGI.pm:566 ../IkiWiki/CGI.pm:610
 #, perl-format
 msgid "editing %s"
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:688
+#: ../IkiWiki/CGI.pm:704
 msgid "You are banned."
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:708
+#: ../IkiWiki/CGI.pm:724
 msgid "login failed, perhaps you need to turn on cookies?"
 msgstr ""
 
@@ -374,7 +374,7 @@ msgstr ""
 msgid "shortcut %s points to <i>%s</i>"
 msgstr ""
 
-#: ../IkiWiki/Plugin/smiley.pm:22
+#: ../IkiWiki/Plugin/smiley.pm:23
 msgid "failed to parse any smileys"
 msgstr ""
 
@@ -476,47 +476,47 @@ msgid ""
 "notifications"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:263 ../IkiWiki/Render.pm:283
+#: ../IkiWiki/Render.pm:263 ../IkiWiki/Render.pm:284
 #, perl-format
 msgid "skipping bad filename %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:323
+#: ../IkiWiki/Render.pm:326
 #, perl-format
 msgid "removing old page %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:356
+#: ../IkiWiki/Render.pm:359
 #, perl-format
 msgid "scanning %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:361
+#: ../IkiWiki/Render.pm:364
 #, perl-format
 msgid "rendering %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:373
+#: ../IkiWiki/Render.pm:376
 #, perl-format
 msgid "rendering %s, which links to %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:390
+#: ../IkiWiki/Render.pm:393
 #, perl-format
 msgid "rendering %s, which depends on %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:428
+#: ../IkiWiki/Render.pm:431
 #, perl-format
 msgid "rendering %s, to update its backlinks"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:440
+#: ../IkiWiki/Render.pm:443
 #, perl-format
 msgid "removing %s, no longer rendered by %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:466
+#: ../IkiWiki/Render.pm:469
 #, perl-format
 msgid "ikiwiki: cannot render %s"
 msgstr ""
@@ -593,11 +593,11 @@ msgstr ""
 msgid "usage: --set var=value"
 msgstr ""
 
-#: ../IkiWiki.pm:126
+#: ../IkiWiki.pm:128
 msgid "Must specify url to wiki with --url when using --cgi"
 msgstr ""
 
-#: ../IkiWiki.pm:191 ../IkiWiki.pm:192
+#: ../IkiWiki.pm:193 ../IkiWiki.pm:194
 msgid "Error"
 msgstr ""
 
@@ -605,7 +605,7 @@ msgstr ""
 #. translators: preprocessor directive name,
 #. translators: the second a page name, the
 #. translators: third a number.
-#: ../IkiWiki.pm:688
+#: ../IkiWiki.pm:705
 #, perl-format
 msgid "%s preprocessing loop detected on %s at depth %i"
 msgstr ""
index fbcc105540c63fcc468ea4b019ea8b3da6e21bb2..00811a5e33e4b6e47ea48dd0135a1deeb21bf05b 100755 (executable)
@@ -1,9 +1,12 @@
 #!/usr/bin/perl
 use warnings;
 use strict;
-use Test::More tests => 3;
+use Test::More 'no_plan';
 
-ok(! system("make ikiwiki.out"));
-ok(! system("LANG=C perl -T -I. ./ikiwiki.out -plugin brokenlinks -rebuild -underlaydir=basewiki -templatedir=templates t/basewiki_brokenlinks t/basewiki_brokenlinks/out"));
-ok(`grep 'no broken links' t/basewiki_brokenlinks/out/index.html`);
-system("rm -rf t/basewiki_brokenlinks/out t/basewiki_brokenlinks/.ikiwiki");
+ok(! system("mkdir t/tmp"));
+ok(! system("make -q ikiwiki.out"));
+ok(! system("make extra_install DESTDIR=t/tmp/install PREFIX=/usr >/dev/null"));
+ok(! system("LANG= perl -T -I. ./ikiwiki.out -plugin smiley -plugin brokenlinks -rebuild -underlaydir=t/tmp/install/usr/share/ikiwiki/basewiki -templatedir=templates t/basewiki_brokenlinks t/tmp/out"));
+ok(`grep 'no broken links' t/tmp/out/index.html`);
+ok(-e "t/tmp/out/style.css");
+ok(! system("rm -rf t/tmp t/basewiki_brokenlinks/.ikiwiki"));
diff --git a/underlays/basewiki/blog.mdwn b/underlays/basewiki/blog.mdwn
new file mode 120000 (symlink)
index 0000000..9ab4310
--- /dev/null
@@ -0,0 +1 @@
+../../doc/blog.mdwn
\ No newline at end of file
diff --git a/underlays/basewiki/favicon.ico b/underlays/basewiki/favicon.ico
new file mode 120000 (symlink)
index 0000000..399fec7
--- /dev/null
@@ -0,0 +1 @@
+../../doc/favicon.ico
\ No newline at end of file
diff --git a/underlays/basewiki/helponformatting.mdwn b/underlays/basewiki/helponformatting.mdwn
new file mode 120000 (symlink)
index 0000000..6d0d82f
--- /dev/null
@@ -0,0 +1 @@
+../../doc/helponformatting.mdwn
\ No newline at end of file
diff --git a/underlays/basewiki/index.mdwn b/underlays/basewiki/index.mdwn
new file mode 120000 (symlink)
index 0000000..37c1145
--- /dev/null
@@ -0,0 +1 @@
+../../doc/basewiki/index.mdwn
\ No newline at end of file
diff --git a/underlays/basewiki/local.css b/underlays/basewiki/local.css
new file mode 120000 (symlink)
index 0000000..01a7b04
--- /dev/null
@@ -0,0 +1 @@
+../../doc/local.css
\ No newline at end of file
diff --git a/underlays/basewiki/markdown.mdwn b/underlays/basewiki/markdown.mdwn
new file mode 120000 (symlink)
index 0000000..7b555fd
--- /dev/null
@@ -0,0 +1 @@
+../../doc/markdown.mdwn
\ No newline at end of file
diff --git a/underlays/basewiki/openid.mdwn b/underlays/basewiki/openid.mdwn
new file mode 120000 (symlink)
index 0000000..f2d584b
--- /dev/null
@@ -0,0 +1 @@
+../../doc/openid.mdwn
\ No newline at end of file
diff --git a/underlays/basewiki/pagespec.mdwn b/underlays/basewiki/pagespec.mdwn
new file mode 120000 (symlink)
index 0000000..b5eb02e
--- /dev/null
@@ -0,0 +1 @@
+../../doc/pagespec.mdwn
\ No newline at end of file
diff --git a/underlays/basewiki/preprocessordirective.mdwn b/underlays/basewiki/preprocessordirective.mdwn
new file mode 120000 (symlink)
index 0000000..4b45d49
--- /dev/null
@@ -0,0 +1 @@
+../../doc/preprocessordirective.mdwn
\ No newline at end of file
diff --git a/underlays/basewiki/sandbox.mdwn b/underlays/basewiki/sandbox.mdwn
new file mode 120000 (symlink)
index 0000000..0761adf
--- /dev/null
@@ -0,0 +1 @@
+../../doc/basewiki/sandbox.mdwn
\ No newline at end of file
diff --git a/underlays/basewiki/shortcuts.mdwn b/underlays/basewiki/shortcuts.mdwn
new file mode 120000 (symlink)
index 0000000..2e6bfcd
--- /dev/null
@@ -0,0 +1 @@
+../../doc/shortcuts.mdwn
\ No newline at end of file
diff --git a/underlays/basewiki/style.css b/underlays/basewiki/style.css
new file mode 120000 (symlink)
index 0000000..9383b4a
--- /dev/null
@@ -0,0 +1 @@
+../../doc/style.css
\ No newline at end of file
diff --git a/underlays/basewiki/subpage b/underlays/basewiki/subpage
new file mode 120000 (symlink)
index 0000000..a22701f
--- /dev/null
@@ -0,0 +1 @@
+../../doc/subpage
\ No newline at end of file
diff --git a/underlays/basewiki/subpage.mdwn b/underlays/basewiki/subpage.mdwn
new file mode 120000 (symlink)
index 0000000..6c225fc
--- /dev/null
@@ -0,0 +1 @@
+../../doc/subpage.mdwn
\ No newline at end of file
diff --git a/underlays/basewiki/templates.mdwn b/underlays/basewiki/templates.mdwn
new file mode 120000 (symlink)
index 0000000..a7bb48f
--- /dev/null
@@ -0,0 +1 @@
+../../doc/templates.mdwn
\ No newline at end of file
diff --git a/underlays/basewiki/templates/note.mdwn b/underlays/basewiki/templates/note.mdwn
new file mode 120000 (symlink)
index 0000000..f44d40c
--- /dev/null
@@ -0,0 +1 @@
+../../../doc/templates/note.mdwn
\ No newline at end of file
diff --git a/underlays/basewiki/templates/popup.mdwn b/underlays/basewiki/templates/popup.mdwn
new file mode 120000 (symlink)
index 0000000..4761d7f
--- /dev/null
@@ -0,0 +1 @@
+../../../doc/templates/popup.mdwn
\ No newline at end of file
diff --git a/underlays/basewiki/wikiicons b/underlays/basewiki/wikiicons
new file mode 120000 (symlink)
index 0000000..b333d71
--- /dev/null
@@ -0,0 +1 @@
+../../doc/wikiicons
\ No newline at end of file
diff --git a/underlays/basewiki/wikilink.mdwn b/underlays/basewiki/wikilink.mdwn
new file mode 120000 (symlink)
index 0000000..146ac42
--- /dev/null
@@ -0,0 +1 @@
+../../doc/wikilink.mdwn
\ No newline at end of file
diff --git a/underlays/smiley/smileys b/underlays/smiley/smileys
new file mode 120000 (symlink)
index 0000000..5ccf882
--- /dev/null
@@ -0,0 +1 @@
+../../doc/smileys
\ No newline at end of file
diff --git a/underlays/smiley/smileys.mdwn b/underlays/smiley/smileys.mdwn
new file mode 120000 (symlink)
index 0000000..fdfdbf6
--- /dev/null
@@ -0,0 +1 @@
+../../doc/smileys.mdwn
\ No newline at end of file