summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-14 06:04:44 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-14 06:04:44 +0000
commit7f8efe4524fb8cc2066e07c4f9fbad3b14fbccfb (patch)
treef892b786f07206ecd29f7de73efa10f27dd13ea4
parent2885278ebd2e2bfad188a583d7ad5d3c8b7c3a21 (diff)
fix Discussion links to not take the BestLink.
As a bonus we now have meta Disussion/Discussion pages available, etc. Oh well.. :-)
-rw-r--r--doc/bugs.mdwn4
-rw-r--r--doc/features.mdwn16
-rw-r--r--doc/todo.mdwn11
-rwxr-xr-xikiwiki17
4 files changed, 34 insertions, 14 deletions
diff --git a/doc/bugs.mdwn b/doc/bugs.mdwn
index c9b175453..8ceff9aae 100644
--- a/doc/bugs.mdwn
+++ b/doc/bugs.mdwn
@@ -4,9 +4,6 @@
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
@@ -20,3 +17,4 @@
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.
+* Doesn't update pages that linked to a page when it is removed.
diff --git a/doc/features.mdwn b/doc/features.mdwn
index e56a075d7..6f5b638f5 100644
--- a/doc/features.mdwn
+++ b/doc/features.mdwn
@@ -4,11 +4,21 @@ Currently implemented:
* [[Subversion]]
- Rather than implement its own system for storing page histories etc, ikiwiki simply uses subversion. (Supporting other revision control systems is also possible, ikiwiki only needs $FOO add, $FOO commit, and $FOO log).
+ Rather than implement its own system for storing page histories etc,
+ ikiwiki simply uses subversion. (Supporting other revision control
+ systems is also possible, ikiwiki only needs $FOO add, $FOO commit, and
+ $FOO log).
- Instead of editing pages in a stupid web form, you can use vim and commit changes via svn. Or work disconnected using svk and push your changes out when you come online. Deal with edit conflicts with others in a sane environment. Take advantage of subversion's smart merges.
+ Instead of editing pages in a stupid web form, you can use vim and commit
+ changes via svn. Or work disconnected using svk and push your changes out
+ when you come online. Deal with edit conflicts with others in a sane
+ environment. Take advantage of subversion's smart merges.
- ikiwiki can be run from a [[post-commit]] hook to update your wiki immediately whenever you commit.
+ ikiwiki can be run from a [[post-commit]] hook to update your wiki
+ immediately whenever you commit.
+
+ Note that ikiwiki does not require subversion to function. If you want to
+ run a simple wiki without page history, it can do that too.
* [[MarkDown]]
diff --git a/doc/todo.mdwn b/doc/todo.mdwn
index dd69e21fb..2b4da3c4f 100644
--- a/doc/todo.mdwn
+++ b/doc/todo.mdwn
@@ -86,4 +86,15 @@ allow for different types of setup files for more than just the one
hardcoded thing there is now, and would probably be good for upgrades,
incompatible changes, etc, too.
+## base wiki
+
+Need a toned down version of this wiki with a basic frontpage, sandbox and
+docs to use as a seed for new wikis.
+
+## search
+
+* full text (use third-party tools?)
+* list of all missing pages
+* list of all pages or some kind of page map
+
## [[Bugs]]
diff --git a/ikiwiki b/ikiwiki
index d6057c101..53a86c1ed 100755
--- a/ikiwiki
+++ b/ikiwiki
@@ -210,9 +210,15 @@ sub htmllink { #{{{
my $page=shift;
my $link=shift;
my $noimageinline=shift; # don't turn links into inline html images
- my $createsubpage=shift; # force creation of a subpage if page DNE
+ my $forcesubpage=shift; # force a link to a subpage
- my $bestlink=bestlink($page, $link);
+ my $bestlink;
+ if (! $forcesubpage) {
+ $bestlink=bestlink($page, $link);
+ }
+ else {
+ $bestlink="$page/".lc($link);
+ }
return $link if length $bestlink && $page eq $bestlink;
@@ -224,12 +230,7 @@ sub htmllink { #{{{
$bestlink=htmlpage($bestlink);
}
if (! grep { $_ eq $bestlink } values %renderedfiles) {
- if (! $createsubpage) {
- return "<a href=\"$config{cgiurl}?do=create&page=$link&from=$page\">?</a>$link"
- }
- else {
- return "<a href=\"$config{cgiurl}?do=create&page=$page/$link\">?</a>$link"
- }
+ return "<a href=\"$config{cgiurl}?do=create&page=$link&from=$page\">?</a>$link"
}
$bestlink=File::Spec->abs2rel($bestlink, dirname($page));