summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/patchqueue/clickable-openid-urls-in-logs.mdwn2
-rw-r--r--doc/patchqueue/htmllink-anchors.mdwn29
-rw-r--r--doc/patchqueue/morelink-plugin.mdwn39
-rw-r--r--doc/plugins/more.mdwn15
-rw-r--r--doc/plugins/write.mdwn12
-rw-r--r--doc/wikilink.mdwn5
6 files changed, 27 insertions, 75 deletions
diff --git a/doc/patchqueue/clickable-openid-urls-in-logs.mdwn b/doc/patchqueue/clickable-openid-urls-in-logs.mdwn
index 18ba6be94..997bc7492 100644
--- a/doc/patchqueue/clickable-openid-urls-in-logs.mdwn
+++ b/doc/patchqueue/clickable-openid-urls-in-logs.mdwn
@@ -1,6 +1,6 @@
OpenID URLs aren't clickable in the ViewVC logs because they're directly followed by a colon. At the expense of, um, proper grammar, here's a patch for SVN. If this is OK, I'll patch the other RCS modules, too.
-> Reasonable, but probably needs to modify the wiki_commit_regexp to
+> Reasonable, but probably needs to modify the wiki\_commit\_regexp to
> recognise such commit messages when parsing the logs. Do that and extend
> to the other modules and I'll accept it. --[[Joey]]
diff --git a/doc/patchqueue/htmllink-anchors.mdwn b/doc/patchqueue/htmllink-anchors.mdwn
deleted file mode 100644
index 2bb203f51..000000000
--- a/doc/patchqueue/htmllink-anchors.mdwn
+++ /dev/null
@@ -1,29 +0,0 @@
-Here's an attempt to make `htmllink` "do the right thing" with in-page anchors:
-
-<pre>
-Index: IkiWiki.pm
-===================================================================
---- IkiWiki.pm (revision 2657)
-+++ IkiWiki.pm (working copy)
-@@ -426,6 +426,8 @@
- my $noimageinline=shift; # don't turn links into inline html images
- my $forcesubpage=shift; # force a link to a subpage
- my $linktext=shift; # set to force the link text to something
-+
-+ my $anchor = ($link =~ s/#(.+)$// ? $1 : undef);
-
- my $bestlink;
- if (! $forcesubpage) {
-@@ -455,7 +457,10 @@
- if (! $noimageinline && isinlinableimage($bestlink)) {
- return "<img src=\"$bestlink\" alt=\"$linktext\" />";
- }
-- return "<a href=\"$bestlink\">$linktext</a>";
-+
-+ $bestlink .= "#$anchor" if $anchor;
-+
-+ return "<a href=\"$bestlink\">$linktext</a>";
- } #}}}
-
- sub htmlize ($$$) { #{{{
-</pre> \ No newline at end of file
diff --git a/doc/patchqueue/morelink-plugin.mdwn b/doc/patchqueue/morelink-plugin.mdwn
deleted file mode 100644
index 9724b3e3a..000000000
--- a/doc/patchqueue/morelink-plugin.mdwn
+++ /dev/null
@@ -1,39 +0,0 @@
-Enables _Read more_ links for use in blog posts. Adds a config option for customising the anchor text. (The [[/patchqueue/htmllink-anchors]] patch is a dependency).
-
- Index: IkiWiki/Plugin/morelink.pm
- ===================================================================
- --- IkiWiki/Plugin/morelink.pm (revision 0)
- +++ IkiWiki/Plugin/morelink.pm (revision 0)
- @@ -0,0 +1,30 @@
- +#!/usr/bin/perl
- +package IkiWiki::Plugin::morelink;
- +
- +use warnings;
- +use strict;
- +use IkiWiki;
- +
- +my $linktext = 'Read more';
- +
- +sub import { #{{{
- + hook(type => "checkconfig", id => "more", call => \&checkconfig);
- + hook(type => "preprocess", id => "more", call => \&preprocess);
- +} # }}}
- +
- +sub checkconfig () { #{{{
- + $linktext = $config{morelink_text} || $linktext;
- +} #}}}
- +
- +sub preprocess (@) { #{{{
- + my %args = @_;
- +
- + if ($args{page} ne $args{destpage}) {
- + return "\n".htmllink($args{page}, $args{destpage}, $args{page}.'#more', 0, 0, $linktext);
- + }
- + else {
- + return "<a name='more'></a>".$args{text};
- + }
- +}
- +
- +1
-
---Ben \ No newline at end of file
diff --git a/doc/plugins/more.mdwn b/doc/plugins/more.mdwn
new file mode 100644
index 000000000..44a777813
--- /dev/null
+++ b/doc/plugins/more.mdwn
@@ -0,0 +1,15 @@
+[[template id=plugin name=more author="Ben"]]
+[[tag type/format]]
+
+This plugin provides a way to have a "more" link on a page in a blog, that
+leads to the full version of the page. Use it like this:
+
+ \[[more linktext="click for more" text="""
+ This is the rest of my post. Not intended for people catching up on
+ their blogs at 30,000 feet. Because I like to make things
+ difficult.
+ """]]
+
+If the `linktext` parameter is omitted it defaults to just "more".
+
+Note that you can accomplish something similar using a [[toggle]] instead.
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index c10d73cf9..889057e69 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -329,7 +329,7 @@ subdirectory with the same name as the source page, failing that
goes down the directory tree to the base looking for matching
pages, as described in [[SubPage/LinkingRules]].
-#### `htmllink($$$;$$$)`
+#### `htmllink($$$;@)`
Many plugins need to generate html links and add them to a page. This is
done by using the `htmllink` function. The usual way to call
@@ -346,11 +346,13 @@ Here `$destpage` is the inlining page. A `destpage` parameter is passed to
some of the hook functions above; the ones that are not passed it are not used
during inlining and don't need to worry about this issue.
-The remaining three optional parameters to `htmllink` are:
+After the three required parameters, named parameters can be used to
+control some options. These are:
-1. noimageinline - set to true to avoid turning links into inline html images
-1. forcesubpage - set to force a link to a subpage
-1. linktext - set to force the link text to something
+* noimageinline - set to true to avoid turning links into inline html images
+* forcesubpage - set to force a link to a subpage
+* linktext - set to force the link text to something
+* anchor - set to make the link include an anchor
#### `readfile($;$)`
diff --git a/doc/wikilink.mdwn b/doc/wikilink.mdwn
index 46da8c301..a085ab7a7 100644
--- a/doc/wikilink.mdwn
+++ b/doc/wikilink.mdwn
@@ -2,7 +2,7 @@ WikiLinks provide easy linking between pages of the wiki. To create a
[[WikiLink]], just put the name of the page to link to in double brackets.
For example "\[[WikiLink]]".
-If you ever need to write something like "\[[WikiLink]] without creating a
+If you ever need to write something like "\[[WikiLink]]" without creating a
wikilink, just prefix it with a "\", like "\\\\[[WikiLink]]".
There are some special [[SubPage/LinkingRules]] that come into play when
@@ -19,5 +19,8 @@ It's also possible to write a WikiLink that uses something other than the
page name as the link text. For example "\[[foo_bar|SandBox]]" links to the
SandBox page, but the link will appear like this: [[foo_bar|SandBox]]
+To link to an anchor inside a page, you can use something like
+"\[[WikiLink#foo]]"
+
**Note that you cannot use spaces in WikiLinks**. Replace spaces with
underscores.