- Add Discussion links to the button bar, these will automatically create
/Discussion subpages. - Fix linking to DNE pages in some edge cases. - Fix --rebuild (oops) - Fix propigation of "from" field trru the login process when creating a new page.a - Ideas for change notification.master
parent
f4a6a03de6
commit
2d4bf757fb
|
@ -4,16 +4,32 @@
|
|||
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.
|
||||
* 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]])
|
||||
|
|
|
@ -58,6 +58,12 @@ Currently implemented:
|
|||
Can optionally be configured to allow only registered users to post
|
||||
pages; online user registration form, etc.
|
||||
|
||||
* Discussion pages
|
||||
|
||||
Thanks to subpages, every page can easily and automatically have a
|
||||
/Discussion subpage. By default, these links are included in the
|
||||
[[templates]] for each page.
|
||||
|
||||
----
|
||||
|
||||
It also has lots of [[TODO]] items and [[Bugs]]. This wiki is not ready for production!
|
||||
|
|
|
@ -8,7 +8,16 @@
|
|||
|
||||
## 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
|
||||
|
||||
|
@ -44,4 +53,12 @@ case.
|
|||
|
||||
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]]
|
||||
|
|
30
ikiwiki
30
ikiwiki
|
@ -27,6 +27,7 @@ my $cgiurl="";
|
|||
my $historyurl="";
|
||||
my $svn=1;
|
||||
my $anonok=0;
|
||||
my $rebuild=0;
|
||||
|
||||
sub usage { #{{{
|
||||
die "usage: ikiwiki [options] source templates dest\n";
|
||||
|
@ -177,11 +178,12 @@ sub isinlinableimage ($) { #{{{
|
|||
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
|
||||
|
@ -191,12 +193,17 @@ sub htmllink { #{{{
|
|||
$bestlink=htmlpage($bestlink);
|
||||
}
|
||||
if (! grep { $_ eq $bestlink } values %renderedfiles) {
|
||||
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>";
|
||||
|
@ -301,6 +308,7 @@ sub finalize ($$) { #{{{
|
|||
parentlinks => [parentlinks($page)],
|
||||
content => $content,
|
||||
backlinks => [backlinks($page)],
|
||||
discussionlink => htmllink($page, "Discussion", 1, 1),
|
||||
);
|
||||
|
||||
return $template->output;
|
||||
|
@ -312,8 +320,11 @@ sub check_overwrite ($$) { #{{{
|
|||
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");
|
||||
}
|
||||
} #}}}
|
||||
|
||||
|
@ -757,7 +768,7 @@ sub cgi_signin ($$) { #{{{
|
|||
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 => {
|
||||
|
@ -777,6 +788,7 @@ sub cgi_signin ($$) { #{{{
|
|||
$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);
|
||||
|
@ -850,7 +862,8 @@ sub cgi_signin ($$) { #{{{
|
|||
$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);
|
||||
|
@ -1035,7 +1048,7 @@ sub cgi_editpage ($$) { #{{{
|
|||
|
||||
# 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");
|
||||
}
|
||||
} #}}}
|
||||
|
||||
|
@ -1085,7 +1098,6 @@ sub cgi () { #{{{
|
|||
} #}}}
|
||||
|
||||
# main {{{
|
||||
my $rebuild=0;
|
||||
my $wrapper=0;
|
||||
if (grep /^-/, @ARGV) {
|
||||
eval {use Getopt::Long};
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
<a href="<TMPL_VAR HISTORYURL>">History</a>
|
||||
</TMPL_IF>
|
||||
|
||||
<TMPL_VAR DISCUSSIONLINK><br>
|
||||
|
||||
<hr>
|
||||
<TMPL_VAR CONTENT>
|
||||
<hr>
|
||||
|
|
Loading…
Reference in New Issue