]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Merge commit '58a07f9e5436ec815c0cb5736a9680096c977eed' into sipb
authorAnders Kaseorg <andersk@mit.edu>
Fri, 31 Jan 2014 05:34:45 +0000 (00:34 -0500)
committerAnders Kaseorg <andersk@mit.edu>
Fri, 31 Jan 2014 05:34:45 +0000 (00:34 -0500)
Conflicts:
templates/page.tmpl

40 files changed:
IkiWiki.pm
IkiWiki/Plugin/comments.pm
IkiWiki/Plugin/graphviz.pm
IkiWiki/Plugin/inline.pm
IkiWiki/Plugin/skeleton.pm.example
IkiWiki/Plugin/websetup.pm
IkiWiki/Render.pm
IkiWiki/Wrapper.pm
debian/changelog
doc/bugs/Problems_with_graphviz.pm_plug-in.mdwn
doc/bugs/Problems_with_graphviz.pm_plug-in_previews.mdwn [new file with mode: 0644]
doc/bugs/deletion_warnings.mdwn [new file with mode: 0644]
doc/bugs/html5_support.mdwn
doc/bugs/pagespec_error_on_refresh_but_not_rebuild.mdwn [new file with mode: 0644]
doc/features.mdwn
doc/forum/Can_OpenID_users_be_adminusers__63__.mdwn
doc/forum/PERL5LIB__44___wrappers_and_homedir_install.mdwn [new file with mode: 0644]
doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn [new file with mode: 0644]
doc/forum/suppressing_output_of_pages_included_only_for_their_side_effects.mdwn [new file with mode: 0644]
doc/news/version_3.20100312.mdwn [deleted file]
doc/news/version_3.20100403.mdwn [deleted file]
doc/news/version_3.20100501/discussion.mdwn [new file with mode: 0644]
doc/news/version_3.20100504.mdwn [new file with mode: 0644]
doc/plugins/websetup.mdwn
doc/plugins/write.mdwn
doc/roadmap.mdwn
doc/setup.mdwn
doc/style.css
doc/templates.mdwn
doc/tips/html5.mdwn [new file with mode: 0644]
doc/todo/two-way_convert_of_wikis.mdwn [new file with mode: 0644]
doc/users/blipvert.mdwn [new file with mode: 0644]
ikiwiki.in
ikiwiki.spec
po/ikiwiki.pot
t/find_src_files.t [new file with mode: 0755]
templates/comment.tmpl
templates/inlinepage.tmpl
templates/misc.tmpl [deleted file]
templates/page.tmpl

index c428de77f7e055390e66fcdf53301f61ac2d9382..d20a3709c9a9a4c911e0a0dfce6025e7de0e8f97 100644 (file)
@@ -1742,21 +1742,29 @@ sub template ($;@) {
 
 sub misctemplate ($$;@) {
        my $title=shift;
-       my $pagebody=shift;
+       my $content=shift;
        
-       my $template=template("misc.tmpl");
+       my $template=template("misc.tmpl") || template("page.tmpl");
+
+       run_hooks(pagetemplate => sub {
+               shift->(page => "", destpage => "", template => $template);
+       });
+
        $template->param(
                title => $title,
-               indexlink => indexlink(),
                wikiname => $config{wikiname},
-               pagebody => $pagebody,
+               content => $content,
                baseurl => baseurl(),
                html5 => $config{html5},
+               have_actions => 0, # force off
+               searchform => 0,   # ditto
+               parentlinks => [{  # override
+                       url => $config{url},
+                       page => $config{wikiname},
+               }],
                @_,
        );
-       run_hooks(pagetemplate => sub {
-               shift->(page => "", destpage => "", template => $template);
-       });
+
        return $template->output;
 }
 
index 02f1d93011f0f3afda8ede7b4c67ddd047b5f438..89560c88b11e803787df08bff66d50836756275c 100644 (file)
@@ -673,6 +673,7 @@ sub previewcomment ($$$) {
        my $template = template("comment.tmpl");
        $template->param(content => $preview);
        $template->param(ctime => displaytime($time, undef, 1));
+       $template->param(html5 => $config{html5});
 
        IkiWiki::run_hooks(pagetemplate => sub {
                shift->(page => $location,
index bec12207696ed5639b71dfd773bf261b8b1658b7..c91c92fec72af9bbe4d4cf1c8a0f07f01e6933ec 100644 (file)
@@ -79,12 +79,7 @@ sub render_graph (\%) {
                }
        }
 
-       if ($params{preview}) {
-               return "<img src=\"".urlto($dest, "")."\" />\n";
-       }
-       else {
-               return "<img src=\"".urlto($dest, $params{destpage})."\" />\n";
-       }
+       return "<img src=\"".urlto($dest, $params{destpage})."\" />\n";
 }
 
 sub graph (@) {
index 2df59f414b026eab4ea4fdcf508b6dd3f58a6ae0..933e30646d51bc22fb377df5d288245008c94b38 100644 (file)
@@ -362,6 +362,7 @@ sub preprocess_inline (@) {
                                $template->param(mtime => displaytime($pagemtime{$page}, $params{timeformat}));
                                $template->param(first => 1) if $page eq $list[0];
                                $template->param(last => 1) if $page eq $list[$#list];
+                               $template->param(html5 => $config{html5});
        
                                if ($actions) {
                                        my $file = $pagesources{$page};
index ddf2996d64ace9c2dce9a6f9e6222f041de85e98..a404e24af074ad3be5b75f7b9b2c0cf5e4bf7393 100644 (file)
@@ -24,6 +24,7 @@ sub import {
        hook(type => "format", id => "skeleton", call => \&format);
        hook(type => "pagetemplate", id => "skeleton", call => \&pagetemplate);
        hook(type => "templatefile", id => "skeleton", call => \&templatefile);
+       hook(type => "pageactions", id => "skeleton", call => \&pageactions);
        hook(type => "delete", id => "skeleton", call => \&delete);
        hook(type => "change", id => "skeleton", call => \&change);
        hook(type => "cgi", id => "skeleton", call => \&cgi);
@@ -146,6 +147,14 @@ sub templatefile (@) {
        debug("skeleton plugin running as a templatefile hook");
 }
 
+sub pageactions (@) {
+       my %params=@_;
+       my $page=$params{page};
+
+       debug("skeleton plugin running as a pageactions hook");
+       return ();
+}
+
 sub delete (@) {
        my @files=@_;
 
index d444c0a3d2b67e228737d592d66a04b082876960..4d2e611ebe17af3bbbaaed3b54002df89aaf811d 100644 (file)
@@ -102,7 +102,7 @@ sub showfields ($$$@) {
        }
 
        my $section=defined $plugin
-               ? sprintf(gettext("%s plugin:"), $plugininfo{section}).$plugin
+               ? sprintf(gettext("%s plugin:"), $plugininfo{section})." ".$plugin
                : "main";
        my %enabledfields;
        my $shownfields=0;
@@ -265,6 +265,8 @@ sub showform ($$) {
        my $cgi=shift;
        my $session=shift;
 
+       IkiWiki::needsignin($cgi, $session);
+
        if (! defined $session->param("name") || 
            ! IkiWiki::is_admin($session->param("name"))) {
                error(gettext("you are not logged in as an admin"));
@@ -501,9 +503,10 @@ sub formbuilder_setup (@) {
        my %params=@_;
 
        my $form=$params{form};
-       if ($form->title eq "preferences") {
-               push @{$params{buttons}}, "Wiki Setup";
-               if ($form->submitted && $form->submitted eq "Wiki Setup") {
+       if ($form->title eq "preferences" &&
+           IkiWiki::is_admin($params{session}->param("name"))) {
+               push @{$params{buttons}}, "Setup";
+               if ($form->submitted && $form->submitted eq "Setup") {
                        showform($params{cgi}, $params{session});
                        exit;
                }
index cf6943e7d705c8d4fb3b9fd40f74af5d909c6897..fc5d3953d0df8697fcd122bce9a0e6445714cb2f 100644 (file)
@@ -112,7 +112,14 @@ sub genpage ($$) {
                }
        }
 
-       if ($actions) {
+       my @actions;
+       run_hooks(pageactions => sub {
+               push @actions, map { { action => $_ } } 
+                       grep { defined } shift->(page => $page);
+       });
+       $template->param(actions => \@actions);
+
+       if ($actions || @actions) {
                $template->param(have_actions => 1);
        }
 
@@ -131,6 +138,7 @@ sub genpage ($$) {
                title => $page eq 'index' 
                        ? $config{wikiname} 
                        : pagetitle(basename($page)),
+               ispage => 1,
                wikiname => $config{wikiname},
                content => $content,
                backlinks => $backlinks,
@@ -138,6 +146,7 @@ sub genpage ($$) {
                mtime => displaytime($pagemtime{$page}),
                ctime => displaytime($pagectime{$page}, undef, 1),
                baseurl => baseurl($page),
+               have_footer => 1,
                html5 => $config{html5},
        );
 
@@ -314,6 +323,7 @@ sub find_src_files () {
                my ($f) = $file =~ /$config{wiki_file_regexp}/; # untaint
                if (! defined $f) {
                        warn(sprintf(gettext("skipping bad filename %s"), $file)."\n");
+                       return;
                }
        
                if ($underlay) {
index 2f0c95465f31643049944830b29ef83678b59a05..4d3553e25d659f5d4d145a2aee3c0d34b99be166 100644 (file)
@@ -123,6 +123,7 @@ $envsave
        newenviron[i++]="WRAPPED_OPTIONS=$configstring";
 
 #ifdef __TINYC__
+       /* old tcc versions do not support modifying environ directly */
        if (clearenv() != 0) {
                perror("clearenv");
                exit(1);
index 789fda1cea207ac3df60fae704303e9008fcb7c6..0c3a99f0e83a82faf1c3ddebad8cfea2b41d6b6d 100644 (file)
@@ -1,4 +1,13 @@
-ikiwiki (3.20100502) UNRELEASED; urgency=low
+ikiwiki (3.20100505) UNRELEASED; urgency=low
+
+  * Removed misc.tmpl. Now to theme ikiwiki, you only need to customise
+    a single template, page.tmpl.
+  * misc.tmpl will, however, still be read if a locally modified version
+    exists. This is to avoid forcing users to update page.tmpl right now.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 05 May 2010 18:07:29 -0400
+
+ikiwiki (3.20100504) unstable; urgency=low
 
   * Add parameter to displaytime to specify that it is a pubdate,
     and in html5 mode, use time tag.
@@ -6,8 +15,16 @@ ikiwiki (3.20100502) UNRELEASED; urgency=low
   * In html5 mode, use all the nice new semantic tags. Care was taken
     to not change the id/class named used in the CSS, so only CSS
     that refers to tag types needed to be changed.
-
- -- Joey Hess <joeyh@debian.org>  Sun, 02 May 2010 13:22:50 -0400
+  * Add ACTIONS variable to page.tmpl, which allows plugins to add arbitrary
+    links to the action bar without modifying the template further.
+    (COMMENTSLINK and DISCUSSIONLINK could be folded into this, but
+    are kept separate for now to avoid breaking modified templates.)
+  * websetup: Only display Setup button on admins' preferences page. 
+  * graphviz: Fix display of preexisting images in preview mode.
+  * Fixes a bug in skipping of illegal source files introduced in 
+    3.20100427.
+
+ -- Joey Hess <joeyh@debian.org>  Tue, 04 May 2010 20:26:20 -0400
 
 ikiwiki (3.20100501) unstable; urgency=low
 
index c9f6981589fae57958abdb774034175adb83b385..bc80125adfce797334d845e269d53172dcd27d73 100644 (file)
@@ -9,31 +9,12 @@ The graphviz.pm plug-in currently attempts to read PNG data in UTF-8 mode, which
 
 It also generates image URLs relative to the page being rendered, which means the URLs wont work when previewing a graph from the CGI script.
 
+(preview bug split to [[Problems_with_graphviz.pm_plug-in_previews]])
+
 >> Here is an updated patch againt ikiwiki-2.5:
 
 >>> [[Applied|done]], thanks. --[[Joey]]
 
-    --- IkiWiki/Plugin/graphviz.pm.orig        2007-07-27 11:35:05.000000000 +0200
-    +++ IkiWiki/Plugin/graphviz.pm     2007-07-27 11:36:02.000000000 +0200
-    @@ -69,7 +69,12 @@ sub render_graph (\%) {
-               }
-       }
-     
-    -  return "<img src=\"".urlto($dest, $params{page})."\" />\n";
-    +  if ($params{preview}) {
-    +          return "<img src=\"".urlto($dest, "")."\" />\n";
-    +  }
-    +  else {
-    +          return "<img src=\"".urlto($dest, $params{page})."\" />\n";
-    +  }
-     }
-     
-     sub graph (@) {
-
-
->> --[[HenrikBrixAndersen]]
-
-
 The patch below fixes these two issues.
 
     --- graphviz.pm.orig       Thu Jun  7 15:45:16 2007
diff --git a/doc/bugs/Problems_with_graphviz.pm_plug-in_previews.mdwn b/doc/bugs/Problems_with_graphviz.pm_plug-in_previews.mdwn
new file mode 100644 (file)
index 0000000..c77bbee
--- /dev/null
@@ -0,0 +1,54 @@
+(split from [[Problems_with_graphviz.pm_plug-in]])
+
+[graphviz] generates image URLs relative to the page being rendered, which means the URLs wont work when previewing a graph from the CGI script.
+
+>> Here is an updated patch againt ikiwiki-2.5:
+
+>>> Applied, thanks. --[[Joey]]
+
+    --- IkiWiki/Plugin/graphviz.pm.orig        2007-07-27 11:35:05.000000000 +0200
+    +++ IkiWiki/Plugin/graphviz.pm     2007-07-27 11:36:02.000000000 +0200
+    @@ -69,7 +69,12 @@ sub render_graph (\%) {
+               }
+       }
+     
+    -  return "<img src=\"".urlto($dest, $params{page})."\" />\n";
+    +  if ($params{preview}) {
+    +          return "<img src=\"".urlto($dest, "")."\" />\n";
+    +  }
+    +  else {
+    +          return "<img src=\"".urlto($dest, $params{page})."\" />\n";
+    +  }
+     }
+     
+     sub graph (@) {
+
+
+>> --[[HenrikBrixAndersen]]
+
+>>> Despite this patch I am still experiencing the problem. Normal page source for a graph contains:
+
+    <div id="content">
+    <p><img src="./graph-c9fd2a197322feb417bdedbca5e99f5aa65b3f06.png" /></p>
+    
+    </div>
+
+>>> preview contains
+
+    <div id="preview">
+    <p><img src="./demo/diagrams/graph-c9fd2a197322feb417bdedbca5e99f5aa65b3f06.png" /></p>
+    
+    </div>
+
+>>> I don't quite understand why, this makes sense from the CGI path (in my
+>>> case from the root of the site). The browsers appear to be trying to fetch
+>>> `/demo/diagrams/demo/diagrams/graph-c9fd2a197322feb417bdedbca5e99f5aa65b3f06.png`
+>>> (i.e., prepending the required relpath twice). -- [[Jon]]
+
+>>>> Yeah, that patch may have been right once, but it's wrong now;
+>>>> preview mode uses `<base>` to make urls work the same as they would
+>>>> when viewing the html page. 
+>>>>
+>>>> Perhaps this was not noticed for a while while because it only
+>>>> shows up if previewing an *unchanged* graph on a page that has already
+>>>> been built before. Fixed now. [[done]] --[[Joey]] 
diff --git a/doc/bugs/deletion_warnings.mdwn b/doc/bugs/deletion_warnings.mdwn
new file mode 100644 (file)
index 0000000..c887937
--- /dev/null
@@ -0,0 +1,86 @@
+Seen while deleting a blog's calendar pages:
+
+--[[Joey]] 
+
+<pre>
+   427250f..ff6c054  master     -> origin/master
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+Use of uninitialized value $file in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 688.
+Use of uninitialized value $file in substitution (s///) at /usr/share/perl5/IkiWiki.pm line 668.
+Use of uninitialized value $base in exists at /usr/share/perl5/IkiWiki.pm line 692.
+</pre>
+
index ef0ec1e703cc8d2d6351a28ab70b3219dd412c46..ba67d532b86cb957d86e20cbd73d7b9c8cdc64f9 100644 (file)
@@ -29,16 +29,16 @@ HTML5](http://www.w3.org/TR/html5-diff/).
 > It would probably not be too dreadful to put them in ifdefs. I've made a
 > small start at doing that.
 > 
-> Some of your changes are obvious, like using the new `time` and
-> and `article` elements. Looks like I can't merge it as-is though
-> due to other changes.
->
+> I've made ikiwiki use the time element and all the new semantic elements
+> in html5 mode.
+> 
 > Other ideas:
 >  
-> * Use aside for the sidebar? Or for the [[templates/note]] template?
-> * Use nav for the actionbar
 > * Use details tag instead of the javascript in the toggle plugin. 
 >   (Need to wait on browser support probably.)
+> * Use figure and figcaption for captions in img. However, I have not 
+>   managed to style it to look as good as the current table+caption
+>   approach.
 > 
 > --[[Joey]] 
 
@@ -89,6 +89,8 @@ This element is poorly supported by browsers. As a workaround, `style.css` needs
 
 Internet Explorer will display it as a block, though you can't seem to be able to further control the style.
 
+> done  (needed for header too) --[[Joey]] 
+
 ## Time element
 
 The [time element](http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element) ideally needs the datatime= attribute set by a template variable with what [HTML5 defines as a valid datetime string](http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#valid-global-date-and-time-string).
@@ -107,3 +109,9 @@ As a workaround:
 ## tidy plugin
 
 Will reformat html5 to html4.
+
+----
+
+
+Ok, I consider this [[done]], at least as a first pass. Html5 mode
+is experimental, but complete enough. --[[Joey]] 
diff --git a/doc/bugs/pagespec_error_on_refresh_but_not_rebuild.mdwn b/doc/bugs/pagespec_error_on_refresh_but_not_rebuild.mdwn
new file mode 100644 (file)
index 0000000..316ea7e
--- /dev/null
@@ -0,0 +1,28 @@
+I'm getting this error message when I refresh my wiki:
+
+    $ hg commit -u me -m "Minor corrections"
+    refreshing wiki..
+    scanning htmletc/moco-conf-rooms.mdwn
+    building htmletc/moco-conf-rooms.mdwn
+    Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/site_perl/5.8.9/Text/Typography.pm line 542.
+    building sidebar.mdwn, which depends on htmletc/moco-conf-rooms
+    building contact.mdwn, which depends on sidebar
+    building 500.mdwn, which depends on sidebar
+    Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/site_perl/5.8.9/Text/Typography.pm line 542.
+    building ceramics.mdwn, which depends on sidebar
+    building glossary.mdwn, which depends on sidebar
+    syntax error in pagespec "internal(glossary/comment_*)"
+    warning: post-commit hook exited with status 2
+
+But there is no error if I use `ikiwiki --rebuild` to regenerate the whole thing.
+
+> You neglect to say what version of ikiwiki this is,
+> or give any information to reproduce the bug.
+> 
+> My guess: A version older than 3.20100403, which  included
+> [this bugfix](http://git.ikiwiki.info/?p=ikiwiki;a=commitdiff;h=799b93d258bad917262ac160df74136f05d4a451),
+> which could lead to incorrect "syntax error in pagespec"
+> that only happened some of the time.
+> 
+> (The Text::Typography warning seems probably unrelated.)
+> --[[Joey]] 
index 215c1cecd36ee9ba30e16630a249b46f99cd29d4..1f81687036187bba170aea03a7b8c1b921ad589a 100644 (file)
@@ -72,7 +72,7 @@ you would care to syndicate.
 
 Ikiwiki aims to produce 
 [valid XHTML 1.0](http://validator.w3.org/check?url=referer).
-(Experimental HTML5 support is also available.)
+(Experimental [[tips/HTML5]] support is also available.)
 
 Ikiwiki generates html using [[templates]], and uses [[css]], so you
 can change the look and layout of all pages in any way you would like.
index 7599e71e5c10ce60a6e3bd8032cb2c69bb95882d..17c60c4239b798f9d6f88483617588446b5e7e34 100644 (file)
@@ -62,7 +62,7 @@ index 0bf100a..77b467a 100644
 
 >>>> So you can see if the two usernames/openids match. If the end is "0",
 >>>> they don't match. If nothing is logged, you have not enabled the websetup plugin.
->>>> If the end if "1" you should see the "Wiki Setup" button, if not the
+>>>> If the end if "1" you should see the "Setup" button, if not the
 >>>> problem is not in determining if you're an admin, but elsewhere..
 >>>> --[[Joey]]
 
diff --git a/doc/forum/PERL5LIB__44___wrappers_and_homedir_install.mdwn b/doc/forum/PERL5LIB__44___wrappers_and_homedir_install.mdwn
new file mode 100644 (file)
index 0000000..fba941e
--- /dev/null
@@ -0,0 +1,38 @@
+What is the way to tell wrappers that PERL5LIB should include ~/bin directories?
+
+Having this in the wiki.setup doesn't help anymore:
+
+        # environment variables
+        ENV => {
+          PATH => '/home/user/bin/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/user/ikiwiki/usr/bin/:/home/user/ikiwiki/usr/sbin/:/home/user/bin/bin/:~/bin/bin/',
+          PERL5LIB => '/home/user/bin/share/perl/5.10.0:/home/user/bin/lib/perl/5.10.0'
+        },
+
+Or at least I get CGI errors and running ikiwiki.cgi manually fails too:
+
+        Use of uninitialized value $tainted in pattern match (m//) at /usr/share/perl5/IkiWiki.pm line 233.
+        Argument "" isn't numeric in umask at /usr/share/perl5/IkiWiki.pm line 139.
+        Undefined subroutine &IkiWiki::cgierror called at /home/user/bin/bin/ikiwiki line 199.
+
+Server has an older ikiwiki installed but I'd like to use a newer version from git, and I don't have root access.
+
+> You can't set `PERL5LIB` in `ENV` in a setup file, because ikiwiki is already
+> running before it reads that, and so it has little effect. Your error
+> messages do look like a new bin/ikiwiki is using an old version of
+> `IkiWiki.pm`.
+> 
+> The thing to do is set `INSTALL_BASE` when you're installing ikiwiki from
+> source. Like so:
+
+        cd ikiwiki
+        perl Makefile.PL INSTALL_BASE=$HOME PREFIX=
+        make install
+
+> Then `$HOME/bin/ikiwiki` will have hardcoded into it to look
+> for ikiwiki's perl modules in `$HOME/lib/perl5/`
+> (This is documented in the README file by the way.) --[[Joey]] 
+
+>> Ok, *perl Makefile.PL INSTALL_BASE=$HOME/bin PREFIX=* finally did it for me. I tried too many things with
+>> these paths so I wasn't sure which actually worked. After that I did 
+>> *$ ikiwiki --setup www.setup --wrappers --rebuild*. Somehow in this update mess I seem to have lost the user
+>> accounts, maybe the --rebuild was too much.
diff --git a/doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn b/doc/forum/how_to_add_post_titles_in_ikiwiki_blog__63__.mdwn
new file mode 100644 (file)
index 0000000..68eb06c
--- /dev/null
@@ -0,0 +1,28 @@
+Look at these two blogs:
+
+1) http://ciffer.net/~svend/blog/
+
+2) http://upsilon.cc/~zack/blog/
+
+Well, i set up successfully my blog (i am using inline function in a wiki page) but i have manually to insert blog pos titles and the result is that of blog #2.
+Instead i would like to have blog post titles automatically inserted like blog #1 (and they are links too! I want them that way).
+I looked in git repo of the two blogs but i couldn't find the answer.
+Any help would be really appreciated.
+
+Thanks!
+
+Raf
+
+> Either name the blog post files with the full title you want them to 
+> have, or use [[ikiwiki/directive/meta]] title to set the title of a blog post.
+> 
+>      \[[!meta title="this is my blog post"]]
+> 
+> Either way, the title will automatically be displayed, clickable, at the top.
+> (zack has hacked his templates not to do that). --[[Joey]] 
+
+>> Thanks for your answer.<br/>
+>> I looked in the [templates](http://git.upsilon.cc/cgi-bin/gitweb.cgi?p=zack-homepage.git;a=tree;f=templates;h=824100e62a06cee41b582ba84fcb9cdd982fe4be;hb=HEAD) folder of zack but couldn't see any hack of that kind.<br/>
+>> Anyway, I didn't hack my template...<br/>
+>> I will follow your suggestion of using \[[ikiwiki/directive/meta]] title to set titles.<br/>
+>> Thanks a lot. --Raf
diff --git a/doc/forum/suppressing_output_of_pages_included_only_for_their_side_effects.mdwn b/doc/forum/suppressing_output_of_pages_included_only_for_their_side_effects.mdwn
new file mode 100644 (file)
index 0000000..99784cd
--- /dev/null
@@ -0,0 +1,16 @@
+In particular, it's kind of annoying that using the sidebar plugin results in the creation of a free-standing sidebar.html (which in the simplest case of course includes a copy of *its own content* as a sidebar).  It would be nice if there were a way to tell Ikiwiki to treat a file like sidebar.mdwn as "inline only": allow its content to be inlined but not to render it separately nor allow linking to it.
+
+In reading through the code and associated docs, it appears that the ideal method is for the file to be removed from the $changed array by plugin's "needsbuild" hook.  Either the sidebar plugin could define such a hook, or perhaps a more general solution is the creation of a meta variable or config file regexp that would handle it according to the user's wishes.
+
+I'm about ready to code up such a change but want to find out if I'm thinking along the right lines.  --[[blipvert]]
+
+> Internal pages should be able to be used for this, as they are used for
+> comments. So you'd have
+> `sidebar._mdwn`. However, mwdn would need to be changed to register a
+> htmlize hook for the `_mdwn` extension for that to really work.
+> 
+> But, if there's no rendered sidebar page, how can users easily edit the page
+> in the web interface? In the specific case of the sidebar, It seems
+> better to have the page display something different when built standalone
+> than when built as the sidebar.
+> --[[Joey]]
diff --git a/doc/news/version_3.20100312.mdwn b/doc/news/version_3.20100312.mdwn
deleted file mode 100644 (file)
index 10c3442..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-ikiwiki 3.20100312 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
-   * Fix utf8 issues in calls to md5\_hex.
-   * moderatedcomments: Added moderate\_pagespec that can be used
-     to control which users or comment locations are moderated.
-     This can be used, just for example, to moderate "user(http://myopenid.com/*)"
-     if you're getting a lot of spammers from one particular openid
-     provider (who should perhaps answer your emails about them),
-     while not moderating other users.
-   * moderatedcomments: The moderate\_users setting is deprecated. Instead,
-     set moderate\_pagespec to "!admin()" or "user(*)".
-   * Fix missing span on recentchanges page template.
-   * search: Avoid '$' in the wikiname appearing unescaped on omega's
-     query template, where it might crash omega.
-   * htmlscrubber: Security fix: In data:image/* uris, only allow a few
-     whitelisted image types. No svg."""]]
\ No newline at end of file
diff --git a/doc/news/version_3.20100403.mdwn b/doc/news/version_3.20100403.mdwn
deleted file mode 100644 (file)
index 3e90630..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-ikiwiki 3.20100403 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
-   * websetup: Add websetup\_unsafe to allow marking other settings
-     as unsafe.
-   * Improve openid url munging; do not display anchors and cgi parameters,
-     as used by yahoo and google urls.
-   * Add complete German basewiki and directives translation done by
-     Sebastian Kuhnert.
-   * Add a include setting, which can be used to make ikiwiki process
-     wiki source files, such as .htaccess, that would normally be skipped
-     for security or other reasons. Closes: #[447267](http://bugs.debian.org/447267)
-     (Thanks to Aaron Wilson for the original patch.)
-   * Add support for setup files written in YAML.
-   * Add --set-yaml switch for setting more complex config file options.
-   * filecheck: Fix bugs that prevented the pagespecs from matching when
-     not called by attachment plugin.
-   * Fix incorrect influence info returned by a failing link() pagespec,
-     that could lead to bad dependency handling in certain situations.
-   * Add preprocessed 'use lib' line to ikiwiki-transition and ikiwiki-calendar
-     if necessary for unusual install.
-   * auto-blog.setup: Set tagbase by default, since most bloggers will want it.
-   * Allow wrappers to be built using tcc. (Workaround #452876)
-   * openid: Use Openid Simple Registration or OpenID Attribute Exchange
-     to get the user's email address and username. (Neither is yet
-     used, but they are available in the session object now.)
-   * page.tmpl: Add Cache-Control must-revalidate to ensure that users
-     (especially of Firefox) see fresh page content.
-   * htmlscrubber: Allow colons in urls after '?'
-   * template: Search for templates in the templatedir, if they are not
-     found as pages in the wiki."""]]
diff --git a/doc/news/version_3.20100501/discussion.mdwn b/doc/news/version_3.20100501/discussion.mdwn
new file mode 100644 (file)
index 0000000..fbf767a
--- /dev/null
@@ -0,0 +1 @@
+Thanks a lot for the HTML5 support! I'll have to try it some time soon.
diff --git a/doc/news/version_3.20100504.mdwn b/doc/news/version_3.20100504.mdwn
new file mode 100644 (file)
index 0000000..5ed6b6b
--- /dev/null
@@ -0,0 +1,16 @@
+ikiwiki 3.20100504 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+   * Add parameter to displaytime to specify that it is a pubdate,
+     and in html5 mode, use time tag.
+   * Add placeholder text in search form (in html5 mode only).
+   * In html5 mode, use all the nice new semantic tags. Care was taken
+     to not change the id/class named used in the CSS, so only CSS
+     that refers to tag types needed to be changed.
+   * Add ACTIONS variable to page.tmpl, which allows plugins to add arbitrary
+     links to the action bar without modifying the template further.
+     (COMMENTSLINK and DISCUSSIONLINK could be folded into this, but
+     are kept separate for now to avoid breaking modified templates.)
+   * websetup: Only display Setup button on admins' preferences page.
+   * graphviz: Fix display of preexisting images in preview mode.
+   * Fixes a bug in skipping of illegal source files introduced in
+     3.20100427."""]]
\ No newline at end of file
index b4d23ba9cfbf85d08dce8a3556ffc45730a29263..a20a3248945780b22b3673c7653a3aa99e58f83b 100644 (file)
@@ -2,7 +2,7 @@
 [[!tag type/web]]
 
 This plugin allows wiki admins to configure the wiki using a web interface,
-rather than editing the setup file directly. A "Wiki Setup" button is added
+rather than editing the setup file directly. A "Setup" button is added
 to the admins' preferences page.
 
 Warning: This plugin rewrites your setup file. Any comments or unusual
index 5e7042c3b5d22c9a90a0c63a02a7d8b1615f81d2..3b1d770ebcd951004866c9cb1002088fa2eb6ab8 100644 (file)
@@ -319,6 +319,15 @@ should return the name of the template file to use (relative to the
 template directory), or undef if it doesn't want to change the default
 ("page.tmpl").
 
+### pageactions
+
+       hook(type => "pageactions", id => "foo", call => \&pageactions);
+
+This hook allows plugins to add arbitrary actions to the action bar on a
+page (next to Edit, RecentChanges, etc). The hook is passed a "page"
+parameter, and can return a list of html fragments to add to the action
+bar.
+
 ### sanitize
 
        hook(type => "sanitize", id => "foo", call => \&sanitize);
index 4b5f01c45a51382c8ab0aa625c26a2708637b34e..729d22fb87483e44de1d2f94acf5cd26ecffe08f 100644 (file)
@@ -80,7 +80,10 @@ Probably incomplete list:
 * YADA format setup files per default?
 * Enable tagbase by default (so that tag autocreation will work by default).
   Note that this is already done for wikis created by `auto-blog.setup`.
-* html5 on by default (some day..)
+* [[tips/html5]] on by default (some day..)
+* stop reading misc.tmpl if it exists (only done in case users have a customized
+  version, or an outdated version of page.tmpl that cannot be used by
+  misctemplate)
 
 In general, we try to use [[ikiwiki-transition]] or forced rebuilds on
 upgrade to deal with changes that break compatability. Some things that
index 2d4da553615cc52c71c053e81dd23b8deeafa3a7..3ea0022ccfc18ed09331924f7e9b5a25db25df17 100644 (file)
@@ -89,7 +89,7 @@ These range from changing the wiki's name, to enabling [[plugins]],
 to banning users and locking pages.
 
 If you log in as the admin user you configured earlier, and go to
-your Preferences page, you can click on "Wiki Setup" to customize many
+your Preferences page, you can click on "Setup" to customize many
 wiki settings and plugins.
 
 Some settings cannot be configured on the web, for security reasons or
index 69c7f80d8085fdae3d4eacbffa3ab393d49a855a..f2f558497341574b1bd5f6676bddde8666072620 100644 (file)
@@ -4,6 +4,13 @@
  * local.css and use it to override or change settings in this one.
  */
 
+article,
+header,
+footer,
+nav {
+       display: block;
+}
+
 .header {
        margin: 0;
        font-size: 22px;
@@ -49,7 +56,7 @@
        border-bottom: 1px solid #000;
 }
 
-div.inlinecontent {
+.inlinecontent {
        margin-top: .4em;
 }
 
@@ -69,6 +76,10 @@ div.inlinecontent {
        margin-top: 1em;
 }
 
+.inlinepage .tags {
+        display: inline;
+}
+
 .mapparent {
        text-decoration: none;
 }
index 9208db0ebf49ad2adf06b503b7de886cb007fb7e..2444cf14d42acc88cd28a44772d7adc6358cf491 100644 (file)
@@ -45,8 +45,6 @@ html out of ikiwiki and in the templates.
   key template to customize. [[!if test="enabled(pagetemplate)" then="""
   (The pagetemplate directive can be used to make a page use a
   different template than `page.tmpl`.)"""]]
-* `misc.tmpl` - Generic template used for any page that doesn't
-  have a custom template.
 * `rsspage.tmpl` - Used for generating rss feeds for blogs.
 * `rssitem.tmpl` - Used for generating individual items on rss feeds.
 * `atompage.tmpl` - Used for generating atom feeds for blogs.
diff --git a/doc/tips/html5.mdwn b/doc/tips/html5.mdwn
new file mode 100644 (file)
index 0000000..945efc4
--- /dev/null
@@ -0,0 +1,26 @@
+First, if you just want to embed videos using the html5 `<video>` tag,
+you can do that without switching anything else to html5.
+However, if you want to fully enter the brave new world of html5, read on..
+
+Currently, ikiwiki does not use html5 by default. There is a `html5`
+setting that can be turned on, in your setup file. Rebuild with it set, and
+lots of fancy new semantic tags will be used all over the place.
+
+You may need to adapt your CSS for html5. While all the class and id names
+are the same, some of the `div` elements are changed to other things.
+Ikiwiki's default CSS will work in both modes.
+
+The html5 support is still experimental, and may break in some browsers.
+No care is taken to add backwards compatability hacks for browsers that
+are not html5 aware (like MSIE). If you want to include the javascript with
+those hacks, you can edit `page.tmpl` to do so. 
+[Dive Into HTML5](http://diveintohtml5.org/) is a good reference for
+current compatability issues and workarounds with html5.
+
+---
+
+Known ikiwiki-specific issues:
+
+* [[plugins/htmltidy]] uses `tidy`, which is not html5 aware, so if you
+  have that enabled, it will mangle it back to html4.
+* [[plugins/toc]] does not understand the html5 outline algorithm.
diff --git a/doc/todo/two-way_convert_of_wikis.mdwn b/doc/todo/two-way_convert_of_wikis.mdwn
new file mode 100644 (file)
index 0000000..61f02a3
--- /dev/null
@@ -0,0 +1,15 @@
+
+[[!tag wishlist]]
+
+Ok, the vision is this: Some of you will know git-svn. I want something like
+git-svn,, but for wikis. I want to be able to do the following:
+
+1. Convert a moinmoin (or whatever) wiki to a local ikiwiki on my laptop.
+2. Edit my local copy (offline).
+3. Preview the changes with my local ikiwki installation + browser.
+4. Push the changes back to moinmoin (or whatever) wiki.
+
+I know, I know, ikiwiki wasn't designed for that, but it would be really cool,
+and useful and people ask for that kind of thing too.
+
+--[[David_Riebenbauer]]
diff --git a/doc/users/blipvert.mdwn b/doc/users/blipvert.mdwn
new file mode 100644 (file)
index 0000000..7c4a24b
--- /dev/null
@@ -0,0 +1 @@
+<http://github.com/blipvert>
index acd37f8026c1a2a9ab076a877358617e9e20435e..ac43044dfcbb6b927de2f83081f9cb67ce6bd384 100755 (executable)
@@ -7,7 +7,7 @@ package IkiWiki;
 use warnings;
 use strict;
 use lib '.'; # For use in nonstandard directory, munged by Makefile.
-use IkiWiki;
+use IkiWiki 3.00;
 
 sub usage () {
        die gettext("usage: ikiwiki [options] source dest"), "\n",
index b107f28ebbb5ab6d5b1a21cce70d7b23329b4cd4..76398e9fbef3581bce0013d5b9aa9092fc93201d 100644 (file)
@@ -1,5 +1,5 @@
 Name:           ikiwiki
-Version: 3.20100501
+Version: 3.20100504
 Release:        1%{?dist}
 Summary:        A wiki compiler
 
index 5e2f05b27a0614693cc6831c9d004c9fa76b64ef..069af09959b930e0a119ee443c8da8dd66bba474 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-01 21:16-0400\n"
+"POT-Creation-Date: 2010-05-04 20:27-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"
@@ -55,7 +55,7 @@ msgstr ""
 msgid "You are banned."
 msgstr ""
 
-#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1298
+#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1316
 msgid "Error"
 msgstr ""
 
@@ -242,7 +242,7 @@ msgstr ""
 msgid "Added a comment: %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270
+#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:272
 msgid "you are not logged in as an admin"
 msgstr ""
 
@@ -254,7 +254,7 @@ msgstr ""
 msgid "comment moderation"
 msgstr ""
 
-#: ../IkiWiki/Plugin/comments.pm:759
+#: ../IkiWiki/Plugin/comments.pm:760
 #, perl-format
 msgid "%i comment"
 msgid_plural "%i comments"
@@ -264,7 +264,7 @@ msgstr[1] ""
 #. translators: Here "Comment" is a verb;
 #. translators: the user clicks on it to
 #. translators: post a comment.
-#: ../IkiWiki/Plugin/comments.pm:769
+#: ../IkiWiki/Plugin/comments.pm:770
 msgid "Comment"
 msgstr ""
 
@@ -375,7 +375,7 @@ msgstr ""
 msgid "failed to run graphviz"
 msgstr ""
 
-#: ../IkiWiki/Plugin/graphviz.pm:95
+#: ../IkiWiki/Plugin/graphviz.pm:90
 msgid "prog not a valid graphviz program"
 msgstr ""
 
@@ -448,7 +448,7 @@ msgstr ""
 msgid "template %s not found"
 msgstr ""
 
-#: ../IkiWiki/Plugin/inline.pm:635
+#: ../IkiWiki/Plugin/inline.pm:626
 msgid "RPC::XML::Client not found, not pinging"
 msgstr ""
 
@@ -607,7 +607,7 @@ msgstr ""
 msgid "rebuilding all pages to fix meta titles"
 msgstr ""
 
-#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:772
+#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:780
 #, perl-format
 msgid "building %s"
 msgstr ""
@@ -865,12 +865,12 @@ msgstr ""
 msgid "rsync_command exited %d"
 msgstr ""
 
-#: ../IkiWiki/Plugin/search.pm:188
+#: ../IkiWiki/Plugin/search.pm:189
 #, perl-format
 msgid "need Digest::SHA1 to index %s"
 msgstr ""
 
-#: ../IkiWiki/Plugin/search.pm:225
+#: ../IkiWiki/Plugin/search.pm:226
 msgid "search"
 msgstr ""
 
@@ -985,26 +985,26 @@ msgstr ""
 msgid "enable %s?"
 msgstr ""
 
-#: ../IkiWiki/Plugin/websetup.pm:274
+#: ../IkiWiki/Plugin/websetup.pm:276
 msgid "setup file for this wiki is not known"
 msgstr ""
 
-#: ../IkiWiki/Plugin/websetup.pm:290
+#: ../IkiWiki/Plugin/websetup.pm:292
 msgid "main"
 msgstr ""
 
-#: ../IkiWiki/Plugin/websetup.pm:433
+#: ../IkiWiki/Plugin/websetup.pm:435
 msgid ""
 "The configuration changes shown below require a wiki rebuild to take effect."
 msgstr ""
 
-#: ../IkiWiki/Plugin/websetup.pm:437
+#: ../IkiWiki/Plugin/websetup.pm:439
 msgid ""
 "For the configuration changes shown below to fully take effect, you may need "
 "to rebuild the wiki."
 msgstr ""
 
-#: ../IkiWiki/Plugin/websetup.pm:474
+#: ../IkiWiki/Plugin/websetup.pm:476
 #, perl-format
 msgid "Error: %s exited nonzero (%s). Discarding setup changes."
 msgstr ""
@@ -1019,59 +1019,59 @@ msgstr ""
 msgid "bad file name %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:163
+#: ../IkiWiki/Render.pm:170
 #, perl-format
 msgid "scanning %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:285
+#: ../IkiWiki/Render.pm:292
 #, perl-format
 msgid ""
 "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to "
 "allow this"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:316
+#: ../IkiWiki/Render.pm:323
 #, perl-format
 msgid "skipping bad filename %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:331
+#: ../IkiWiki/Render.pm:339
 #, perl-format
 msgid "%s has multiple possible source pages"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:373
+#: ../IkiWiki/Render.pm:381
 #, perl-format
 msgid "querying %s for file creation and modification times.."
 msgstr ""
 
-#: ../IkiWiki/Render.pm:435
+#: ../IkiWiki/Render.pm:443
 #, perl-format
 msgid "removing obsolete %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:508
+#: ../IkiWiki/Render.pm:516
 #, perl-format
 msgid "building %s, which links to %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:517
+#: ../IkiWiki/Render.pm:525
 #, perl-format
 msgid "removing %s, no longer built by %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:600 ../IkiWiki/Render.pm:682
+#: ../IkiWiki/Render.pm:608 ../IkiWiki/Render.pm:690
 #, perl-format
 msgid "building %s, which depends on %s"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:695
+#: ../IkiWiki/Render.pm:703
 #, perl-format
 msgid "building %s, to update its backlinks"
 msgstr ""
 
-#: ../IkiWiki/Render.pm:824
+#: ../IkiWiki/Render.pm:832
 #, perl-format
 msgid "ikiwiki: cannot build %s"
 msgstr ""
@@ -1125,13 +1125,13 @@ msgid "wrapper filename not specified"
 msgstr ""
 
 #. translators: The parameter is a C filename.
-#: ../IkiWiki/Wrapper.pm:159
+#: ../IkiWiki/Wrapper.pm:160
 #, perl-format
 msgid "failed to compile %s"
 msgstr ""
 
 #. translators: The parameter is a filename.
-#: ../IkiWiki/Wrapper.pm:179
+#: ../IkiWiki/Wrapper.pm:180
 #, perl-format
 msgid "successfully generated %s"
 msgstr ""
@@ -1181,26 +1181,26 @@ msgstr ""
 msgid "failed to load external plugin needed for %s plugin: %s"
 msgstr ""
 
-#: ../IkiWiki.pm:1280
+#: ../IkiWiki.pm:1298
 #, perl-format
 msgid "preprocessing loop detected on %s at depth %i"
 msgstr ""
 
-#: ../IkiWiki.pm:1944
+#: ../IkiWiki.pm:1962
 msgid "yes"
 msgstr ""
 
-#: ../IkiWiki.pm:2021
+#: ../IkiWiki.pm:2039
 #, perl-format
 msgid "invalid sort type %s"
 msgstr ""
 
-#: ../IkiWiki.pm:2042
+#: ../IkiWiki.pm:2060
 #, perl-format
 msgid "unknown sort type %s"
 msgstr ""
 
-#: ../IkiWiki.pm:2178
+#: ../IkiWiki.pm:2196
 #, perl-format
 msgid "cannot match pages: %s"
 msgstr ""
diff --git a/t/find_src_files.t b/t/find_src_files.t
new file mode 100755 (executable)
index 0000000..4a995c2
--- /dev/null
@@ -0,0 +1,97 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+use Test::More tests => 19;
+
+BEGIN { use_ok("IkiWiki"); }
+BEGIN { use_ok("IkiWiki::Render"); }
+
+%config=IkiWiki::defaultconfig();
+$config{srcdir}="t/tmp/srcdir";
+$config{underlaydir}="t/tmp/underlaydir";
+IkiWiki::checkconfig();
+
+sub cleanup {
+       ok(! system("rm -rf t/tmp"));
+}
+
+sub setup_underlay {
+       foreach my $file (@_) {
+               writefile($file, $config{underlaydir}, "test content");
+       }
+       return @_;
+}
+
+sub setup_srcdir {
+       foreach my $file (@_) {
+               writefile($file, $config{srcdir}, "test content");
+       }
+       return @_;
+}
+
+sub test_src_files {
+       my %expected=map { $_ => 1 } @{shift()}; # the input list may have dups
+       my $desc=shift;
+
+       close STDERR; # find_src_files prints warnings about bad files
+
+       my ($files, $pages)=IkiWiki::find_src_files();
+       is_deeply([sort @$files], [sort keys %expected], $desc);
+}
+
+cleanup();
+
+my @list=setup_underlay(qw{index.mdwn sandbox.mdwn smiley.png ikiwiki.mdwn ikiwiki/directive.mdwn ikiwiki/directive/foo.mdwn});
+push @list, setup_srcdir(qw{index.mdwn foo.mwdn icon.jpeg blog/archive/1/2/3/foo.mdwn blog/archive/1/2/4/bar.mdwn blog/archive.mdwn});
+test_src_files(\@list, "simple test");
+
+setup_srcdir(".badfile");
+test_src_files(\@list, "srcdir dotfile is skipped");
+
+setup_underlay(".badfile");
+test_src_files(\@list, "underlay dotfile is skipped");
+
+setup_srcdir(".ikiwiki/index");
+test_src_files(\@list, "srcdir dotdir is skipped");
+
+setup_underlay(".ikiwiki/index");
+test_src_files(\@list, "underlay dotdir is skipped");
+
+setup_srcdir("foo>.mdwn");
+test_src_files(\@list, "illegal srcdir filename skipped");
+
+setup_underlay("foo>.mdwn");
+test_src_files(\@list, "illegal underlay filename skipped");
+
+system("mkdir -p $config{srcdir}/empty");
+test_src_files(\@list, "empty srcdir directory ignored");
+
+system("mkdir -p $config{underlaydir}/empty");
+test_src_files(\@list, "empty underlay directory ignored");
+
+setup_underlay("bad.mdwn");
+system("ln -sf /etc/passwd $config{srcdir}/bad.mdwn");
+test_src_files(\@list, "underlaydir override attack foiled");
+
+system("ln -sf /etc/passwd $config{srcdir}/symlink.mdwn");
+test_src_files(\@list, "file symlink in srcdir skipped");
+
+system("ln -sf /etc/passwd $config{underlaydir}/symlink.mdwn");
+test_src_files(\@list, "file symlink in underlaydir skipped");
+
+system("ln -sf /etc/ $config{srcdir}/symdir");
+test_src_files(\@list, "dir symlink in srcdir skipped");
+
+system("ln -sf /etc/ $config{underlaydir}/symdir");
+test_src_files(\@list, "dir symlink in underlaydir skipped");
+
+system("ln -sf /etc/ $config{srcdir}/blog/symdir");
+test_src_files(\@list, "deep dir symlink in srcdir skipped");
+
+system("ln -sf /etc/ $config{underlaydir}/ikiwiki/symdir");
+test_src_files(\@list, "deep dir symlink in underlaydir skipped");
+
+
+
+
+cleanup();
index fb76ea00494880863a8973b1942ae11a2e4e5a87..39cba0ff92ad99bc59baecd6b6b7fa34deb76676 100644 (file)
@@ -1,20 +1,20 @@
-<div class="comment" id="<TMPL_VAR NAME=COMMENTID>">
+<TMPL_IF HTML5><article class="comment" id="<TMPL_VAR NAME=COMMENTID>">
+<TMPL_ELSE><div class="comment" id="<TMPL_VAR NAME=COMMENTID>"></TMPL_IF>
 
-<div class="comment-subject">
+<TMPL_IF HTML5><header class="comment-subject"><TMPL_ELSE><div class="comment-subject"></TMPL_IF>
 <TMPL_IF PERMALINK>
 <a href="<TMPL_VAR PERMALINK>"><TMPL_VAR TITLE></a>
 <TMPL_ELSE>
 <TMPL_VAR TITLE>
 </TMPL_IF>
-</div>
+<TMPL_IF HTML5></header><TMPL_ELSE></div></TMPL_IF>
 
-<div class="inlinecontent">
+<TMPL_IF HTML5><section class="inlinecontent"><TMPL_ELSE><div class="inlinecontent"></TMPL_IF>
 <TMPL_VAR CONTENT>
-</div>
+<TMPL_IF HTML5></section><TMPL_ELSE></div></TMPL_IF>
 
-<div class="comment-header">
+<TMPL_IF HTML5><header class="comment-header"><TMPL_ELSE><div class="comment-header"></TMPL_IF>
 Comment by
-
 <TMPL_IF NAME="COMMENTUSER">
 <TMPL_IF NAME="COMMENTOPENID">
 <span class="author" title="OpenID">
@@ -29,10 +29,10 @@ Comment by
 </TMPL_IF>
 </span>
 </TMPL_IF>
-<TMPL_ELSE><!-- !COMMENTUSER -->
+<TMPL_ELSE>
 <TMPL_IF NAME=COMMENTIP>
 <span class="author" title="Unauthenticated, from <TMPL_VAR NAME=COMMENTIP>">
-<TMPL_ELSE><!-- !COMMENTIP -->
+<TMPL_ELSE>
 <span class="author" title="Unauthenticated, from unknown IP address">
 </TMPL_IF>
 <TMPL_IF NAME="AUTHORURL">
@@ -41,19 +41,18 @@ Comment by
 <TMPL_VAR NAME=AUTHOR>
 </TMPL_IF>
 </span>
-</TMPL_IF><!-- !COMMENTUSER -->
-
+</TMPL_IF>
 &mdash; <TMPL_VAR CTIME>
-</div>
+<TMPL_IF HTML5></header><TMPL_ELSE></div></TMPL_IF>
 
 <TMPL_IF NAME="HAVE_ACTIONS">
-<div class="actions">
+<TMPL_IF HTML5><nav class="actions"><TMPL_ELSE><div class="actions"></TMPL_IF>
 <ul>
 <TMPL_IF NAME="REMOVEURL">
 <li><a href="<TMPL_VAR REMOVEURL>" rel="nofollow">Remove comment</a></li>
 </TMPL_IF>
 </ul>
-</div><!--.actions-->
+<TMPL_IF HTML5></nav><TMPL_ELSE></div></TMPL_IF>
 </TMPL_IF>
 
-</div><!--.comment-->
+<TMPL_IF HTML5></article><TMPL_ELSE></div></TMPL_IF>
index 3c0b933159b168fe94119a51258b0d0f49baec06..1e0a1674e763e8fa0f9ccc33136f6d51be74b64f 100644 (file)
@@ -1,7 +1,6 @@
-<div class="inlinepage">
-
-<div class="inlineheader">
+<TMPL_IF HTML5><article class="inlinepage"><TMPL_ELSE><div class="inlinepage"></TMPL_IF>
 
+<TMPL_IF HTML5><section class="inlineheader"><TMPL_ELSE><div class="inlineheader"></TMPL_IF>
 <TMPL_IF NAME="AUTHOR">
 <span class="author">
 <TMPL_IF NAME="AUTHORURL">
 </TMPL_IF>
 </span>
 </TMPL_IF>
-<span class="header">
+<TMPL_IF HTML5><header class="header"><TMPL_ELSE><span class="header"></TMPL_IF>
 <TMPL_IF NAME="PERMALINK">
 <a href="<TMPL_VAR PERMALINK>"><TMPL_VAR TITLE></a>
 <TMPL_ELSE>
 <a href="<TMPL_VAR PAGEURL>"><TMPL_VAR TITLE></a>
 </TMPL_IF>
-</span>
+<TMPL_IF HTML5></header><TMPL_ELSE></span></TMPL_IF>
+<TMPL_IF HTML5></section><TMPL_ELSE></div></TMPL_IF>
 
-</div><!--.inlineheader-->
-
-<div class="inlinecontent">
+<TMPL_IF HTML5><section class="inlinecontent"><TMPL_ELSE><div class="inlinecontent"></TMPL_IF>
 <TMPL_VAR CONTENT>
-</div><!--.inlinecontent-->
+<TMPL_IF HTML5></section><TMPL_ELSE></div></TMPL_IF>
 
-<div class="inlinefooter">
+<TMPL_IF HTML5><footer class="inlinefooter"><TMPL_ELSE><div class="inlinefooter"></TMPL_IF>
 
 <span class="pagedate">
 Posted <TMPL_VAR CTIME>
 </span>
 
 <TMPL_IF NAME="TAGS">
-<span class="tags">
+<TMPL_IF HTML5><nav class="tags"><TMPL_ELSE><span class="tags"></TMPL_IF>
 Tags:
 <TMPL_LOOP NAME="TAGS">
 <TMPL_VAR LINK>
 </TMPL_LOOP>
-</span>
+<TMPL_IF HTML5></nav><TMPL_ELSE></span></TMPL_IF>
 </TMPL_IF>
 
 <TMPL_IF COPYRIGHT>
@@ -53,7 +51,7 @@ License: <TMPL_VAR LICENSE>
 </TMPL_IF>
 
 <TMPL_IF NAME="HAVE_ACTIONS">
-<div class="actions">
+<TMPL_IF HTML5><nav class="actions"><TMPL_ELSE><div class="actions"></TMPL_IF>
 <ul>
 <TMPL_IF NAME="EDITURL">
 <li><a href="<TMPL_VAR EDITURL>" rel="nofollow">Edit</a></li>
@@ -66,9 +64,9 @@ License: <TMPL_VAR LICENSE>
 </TMPL_IF>
 </TMPL_IF>
 </ul>
-</div><!--.actions-->
+<TMPL_IF HTML5></nav><TMPL_ELSE></div></TMPL_IF>
 </TMPL_IF>
 
-</div><!--.inlinefooter-->
+<TMPL_IF HTML5></footer><TMPL_ELSE></div></TMPL_IF>
 
-</div><!--.inlinepage-->
+<TMPL_IF HTML5></article><TMPL_ELSE></div></TMPL_IF>
diff --git a/templates/misc.tmpl b/templates/misc.tmpl
deleted file mode 100644 (file)
index 0b7fefa..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<TMPL_IF HTML5><!DOCTYPE html>
-<html>
-<TMPL_ELSE><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-</TMPL_IF>
-<head>
-<TMPL_IF NAME="FORCEBASEURL">
-<base href="<TMPL_VAR FORCEBASEURL>" />
-<TMPL_ELSE>
-<base href="<TMPL_VAR BASEURL>" />
-</TMPL_IF>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title><TMPL_VAR TITLE></title>
-<TMPL_IF NAME="FAVICON">
-<link rel="icon" href="<TMPL_VAR BASEURL><TMPL_VAR FAVICON>" type="image/x-icon" />
-</TMPL_IF>
-<link rel="stylesheet" href="<TMPL_VAR BASEURL>style.css" type="text/css" />
-<link rel="stylesheet" href="<TMPL_VAR BASEURL>local.css" type="text/css" />
-</head>
-<body>
-
-<div class="pageheader">
-<div class="header">
-<span>
-<TMPL_VAR INDEXLINK>/
-<span class="title">
-<TMPL_VAR TITLE>
-</span>
-</span>
-</div>
-</div> <!-- .pageheader -->
-
-<div id="content">
-<TMPL_VAR PAGEBODY>
-</div>
-
-<div id="footer" class="pagefooter">
-<!-- from <TMPL_VAR WIKINAME> -->
-</div><!-- .pagefooter #footer -->
-
-</body>
-</html>
index f018711371fb97d5eea4e2615b3f543994b125af..68dc886ec84d3355039f5ee7ec3257c659efff06 100644 (file)
@@ -5,6 +5,15 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 </TMPL_IF>
 <head>
+<TMPL_UNLESS ISPAGE>
+<TMPL_IF NAME="FORCEBASEURL">
+<base href="<TMPL_VAR FORCEBASEURL>" />
+<TMPL_ELSE>
+<TMPL_IF BASEURL>
+<base href="<TMPL_VAR BASEURL>" />
+</TMPL_IF>
+</TMPL_IF>
+</TMPL_UNLESS>
 <TMPL_IF HTML5><meta charset="utf-8" /><TMPL_ELSE><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></TMPL_IF>
 <meta http-equiv="Cache-Control" content="must-revalidate" />
 <title><TMPL_VAR TITLE></title>
 <TMPL_IF NAME="PREFSURL">
 <li><a href="<TMPL_VAR PREFSURL>">Preferences</a></li>
 </TMPL_IF>
+<TMPL_IF NAME="ACTIONS">
+<TMPL_LOOP NAME="ACTIONS">
+<li><TMPL_VAR ACTION></li>
+</TMPL_LOOP>
+</TMPL_IF>
 <TMPL_IF NAME="COMMENTSLINK">
-<li><TMPL_VAR COMMENTSLINK><br /></li>
+<li><TMPL_VAR COMMENTSLINK></li>
 <TMPL_ELSE>
 <TMPL_IF NAME="DISCUSSIONLINK">
-<li><TMPL_VAR DISCUSSIONLINK><br /></li>
+<li><TMPL_VAR DISCUSSIONLINK></li>
 </TMPL_IF>
 </TMPL_IF>
 </ul>