summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki.pm4
-rw-r--r--IkiWiki/CGI.pm2
-rw-r--r--basewiki/subpage/linkingrules.mdwn5
-rw-r--r--debian/changelog5
-rw-r--r--doc/todo/userdir_links.mdwn2
-rw-r--r--doc/users.mdwn5
-rw-r--r--doc/users/chris.mdwn (renamed from doc/index/chris.mdwn)0
-rw-r--r--doc/users/jeremyreed.mdwn (renamed from doc/jeremyreed.mdwn)0
-rw-r--r--doc/users/joey.mdwn (renamed from doc/joey.mdwn)0
-rw-r--r--doc/users/jonassmedegaard.mdwn (renamed from doc/jonassmedegaard.mdwn)0
10 files changed, 22 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 2ee27ac3e..960d4da99 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -319,6 +319,10 @@ sub bestlink ($$) { #{{{
}
} while $cwd=~s!/?[^/]+$!!;
+ if (length $config{userdir} && exists $links{"$config{userdir}/".lc($link)}) {
+ return $links{"$config{userdir}/".lc($link)};
+ }
+
#print STDERR "warning: page $page, broken link: $link\n";
return "";
} #}}}
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 511358ff5..7f84f345a 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -419,6 +419,8 @@ sub cgi_editpage ($$) { #{{{
push @page_locs, $dir.$page;
}
}
+ push @page_locs, "$config{userdir}/$page"
+ if length $config{userdir};
@page_locs = grep {
! exists $pagecase{lc $_} &&
diff --git a/basewiki/subpage/linkingrules.mdwn b/basewiki/subpage/linkingrules.mdwn
index c07a81387..c1062304a 100644
--- a/basewiki/subpage/linkingrules.mdwn
+++ b/basewiki/subpage/linkingrules.mdwn
@@ -25,3 +25,8 @@ to link to, when there are multiple pages with similar names and the link
goes to the wrong page by default. For example, linking from
"FooBar/SubPage" to "/OtherPage" will link to the "OtherPage" in the root
of the wiki, even if there is a "FooBar/OtherPage".
+
+Also, if the wiki is configured with a userdir, you can link to pages
+within the userdir without specifying a path to them. This is to allow for
+easy linking to a user's page in the userdir, to sign a comment. These
+links are checked for last of all.
diff --git a/debian/changelog b/debian/changelog
index 9d6b7a42a..0735c2db7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,8 +20,11 @@ ikiwiki (1.37) UNRELEASED; urgency=low
* Don't put discussion links on discussion pages.
* Allow disabling of plugins included in goodstuff.
* Add a textile format plugin contributed by mazirian.
+ * If a userdir is configured, links to pages in it can be made without
+ specifying the path. This allows for easy signing of comments by linking
+ to your page in the userdir.
- -- Joey Hess <joeyh@debian.org> Fri, 29 Dec 2006 00:17:58 -0500
+ -- Joey Hess <joeyh@debian.org> Fri, 29 Dec 2006 00:26:47 -0500
ikiwiki (1.36) unstable; urgency=low
diff --git a/doc/todo/userdir_links.mdwn b/doc/todo/userdir_links.mdwn
index 02ebea6d6..02dbdaa65 100644
--- a/doc/todo/userdir_links.mdwn
+++ b/doc/todo/userdir_links.mdwn
@@ -1,3 +1,5 @@
The userdir should be searched at the end of the search "path" for links,
so that users can put their pages in the userdir, and still link to them
easily when signing things, without giving a path.
+
+[[todo/done]]
diff --git a/doc/users.mdwn b/doc/users.mdwn
new file mode 100644
index 000000000..3b8434a4c
--- /dev/null
+++ b/doc/users.mdwn
@@ -0,0 +1,5 @@
+See [[IkiwikiUsers]] for the list of sites using ikiwiki.
+
+Users of this wiki, feel free to create a subpage of this one and talk
+about yourself on it, within reason. You can link to it to sign your
+comments.
diff --git a/doc/index/chris.mdwn b/doc/users/chris.mdwn
index ed9f0e619..ed9f0e619 100644
--- a/doc/index/chris.mdwn
+++ b/doc/users/chris.mdwn
diff --git a/doc/jeremyreed.mdwn b/doc/users/jeremyreed.mdwn
index 3ae8e0d4b..3ae8e0d4b 100644
--- a/doc/jeremyreed.mdwn
+++ b/doc/users/jeremyreed.mdwn
diff --git a/doc/joey.mdwn b/doc/users/joey.mdwn
index c60c76fe8..c60c76fe8 100644
--- a/doc/joey.mdwn
+++ b/doc/users/joey.mdwn
diff --git a/doc/jonassmedegaard.mdwn b/doc/users/jonassmedegaard.mdwn
index 653883979..653883979 100644
--- a/doc/jonassmedegaard.mdwn
+++ b/doc/users/jonassmedegaard.mdwn