to point to it, but will forget to update the linkbacks in Foo/Baz.
And if Foo/Bar/Baz is then removed, it forgets to update Foo/Bar to link
back to Foo/Baz.
+
+ Basically this makes creating new pages painful, top of TODO list..
+
* Foo/Bar/Baz shows up as Bar/Baz in the linkbacks on page Foo/Bar. Should
show as just Baz there.
* If I try to do a web commit, to a svn+ssh repo, it fails with
"Host key verification failed."
I think that the setuid isn't fully taking; it should be running as me,
- but commit log shows www-data. So maybe it has the wrong username?
+ but commit log shows www-data. So maybe it has the wrong username? Or
+ EUID/Real UID screwage.
* Can't put the source in a directory named .source; the page finder skips
that due to too broad exclusion of any dotfile in a path.
-* RecentChanges is a regular page, perhaps it should be automatically replaced with a link to the [[CGI]]?
+* RecentChanges is a regular page, perhaps it should be automatically
+ replaced with a link to the [[CGI]]?
* [[ikiwiki]] should go to the same place as [[index]] (on this wiki).
* There's no way to escape a [[WikiLink]] when discussing one on a wiki.
-* Wikilinks are even expanded in the middle of [[MarkDown]] code blocks, and probably shouldn't be (nor in blockquotes?)
-* RecentChanges is supposed to linkify WikiNames and it does, but only if the user's page exists. It doesn't add a ?link to a noneistant page to aid creating it.
\ No newline at end of file
+* Wikilinks are even expanded in the middle of [[MarkDown]] code blocks,
+ and probably shouldn't be (nor in blockquotes?)
+
+ Hmm, the best way to fix this would be to add WikiLink support into
+ markdown, but that will probably be a bear. I guess the question is how
+ common "[[ ]]" is, and maybe we should just provide a way to escape a
+ wikilink..
+
+Fixed bugs:
+
+* RecentChanges is supposed to linkify WikiNames and it does, but only if
+ the user's page exists. It doesn't add a ?link to a noneistant page to
+ aid creating it. (Fixed. -- [[Joey]])
## recentchanges
-Should support RSS for notification of new and changed pages.
+* Should support RSS for notification of new and changed pages.
+
+ This can be a static rss file that is generated when the moo
+is built. (As long as all changes to all pages is ok.)
+
+* Should support mail notification of new and changed pages.
+
+ Hmm, should be easy to implement this.. it runs as a svn post-cookit hook
+ already, so just look at the userdb, svnlook at what's changed, and send
+ mails to people who have subscribed.
## docs
Make the html valid. Add css.
+## sigs
+
+Need a way to sign name in page that's easier to type than "-- [[ Joey ]]"
+and that includes the date.
+
+What syntax do other wikis use for this? I'm considering "[[ -- ]]" (with
+spaces removed) as it has a nice nmemonic.
+
## [[Bugs]]
my $historyurl="";
my $svn=1;
my $anonok=0;
+my $rebuild=0;
sub usage { #{{{
die "usage: ikiwiki [options] source templates dest\n";
sub htmllink { #{{{
my $page=shift;
my $link=shift;
- my $noimagelink=shift;
+ my $noimageinline=shift; # don't turn links into inline html images
+ my $createsubpage=shift; # force creation of a subpage if page DNE
my $bestlink=bestlink($page, $link);
- return $link if $page eq $bestlink;
+ return $link if length $bestlink && $page eq $bestlink;
# TODO BUG: %renderedfiles may not have it, if the linked to page
# was also added and isn't yet rendered! Note that this bug is
$bestlink=htmlpage($bestlink);
}
if (! grep { $_ eq $bestlink } values %renderedfiles) {
- return "<a href=\"$cgiurl?do=create&page=$link&from=$page\">?</a>$link"
+ if (! $createsubpage) {
+ return "<a href=\"$cgiurl?do=create&page=$link&from=$page\">?</a>$link"
+ }
+ else {
+ return "<a href=\"$cgiurl?do=create&page=$page/$link\">?</a>$link"
+ }
}
$bestlink=File::Spec->abs2rel($bestlink, dirname($page));
- if (! $noimagelink && isinlinableimage($bestlink)) {
+ if (! $noimageinline && isinlinableimage($bestlink)) {
return "<img src=\"$bestlink\">";
}
return "<a href=\"$bestlink\">$link</a>";
sub indexlink () { #{{{
return "<a href=\"$url\">$wikiname</a>";
} #}}}
-
+
sub finalize ($$) { #{{{
my $content=shift;
my $page=shift;
parentlinks => [parentlinks($page)],
content => $content,
backlinks => [backlinks($page)],
+ discussionlink => htmllink($page, "Discussion", 1, 1),
);
return $template->output;
my $dest=shift;
my $src=shift;
- if (! exists $renderedfiles{$src} && -e $dest) {
- error("$dest exists and was not rendered from $src before, not overwriting");
+ if (! exists $renderedfiles{$src} && -e $dest && ! $rebuild) {
+ error("$dest exists and was rendered from ".
+ join(" ",(grep { $renderedfiles{$_} eq $dest } keys
+ %renderedfiles)).
+ ", not from $src before not overwriting");
}
} #}}}
eval q{use CGI::FormBuilder};
my $form = CGI::FormBuilder->new(
title => "$wikiname signin",
- fields => [qw(do page name password confirm_password email)],
+ fields => [qw(do page from name password confirm_password email)],
header => 1,
method => 'POST',
validate => {
$form->field(name => "name", required => 0);
$form->field(name => "do", type => "hidden");
$form->field(name => "page", type => "hidden");
+ $form->field(name => "from", type => "hidden");
$form->field(name => "password", type => "password", required => 0);
$form->field(name => "confirm_password", type => "password", required => 0);
$form->field(name => "email", required => 0);
$form->field("do") ne 'signin') {
print $q->redirect(
"$cgiurl?do=".$form->field("do").
- "&page=".$form->field("page"));
+ "&page=".$form->field("page").
+ "&from=".$form->field("from"));;
}
else {
print $q->redirect($url);
# The trailing question mark tries to avoid broken
# caches and get the most recent version of the page.
- print $q->redirect("$url/".htmlpage($page)."?");
+ print $q->redirect("$url/".htmlpage($page)."?updated");
}
} #}}}
} #}}}
# main {{{
-my $rebuild=0;
my $wrapper=0;
if (grep /^-/, @ARGV) {
eval {use Getopt::Long};