summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/meta.pm4
-rw-r--r--IkiWiki/Plugin/shortcut.pm3
-rw-r--r--debian/changelog13
-rw-r--r--doc/ikiwiki/blog.mdwn2
-rw-r--r--doc/plugins/meta.mdwn15
-rw-r--r--doc/shortcuts.mdwn4
-rw-r--r--doc/todo/shortcut_with_different_link_text.mdwn6
7 files changed, 45 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm
index 74b630afc..2df5a727c 100644
--- a/IkiWiki/Plugin/meta.pm
+++ b/IkiWiki/Plugin/meta.pm
@@ -193,6 +193,10 @@ sub preprocess (@) { #{{{
" />\n");
}
}
+ elsif ($key eq 'robots') {
+ push @{$metaheaders{$page}}, '<meta name="robots"'.
+ ' value="'.encode_entities($value).'" />';
+ }
else {
push @{$metaheaders{$page}}, scrub('<meta name="'.encode_entities($key).
'" content="'.encode_entities($value).'" />');
diff --git a/IkiWiki/Plugin/shortcut.pm b/IkiWiki/Plugin/shortcut.pm
index fb096ecbd..c3e1f5446 100644
--- a/IkiWiki/Plugin/shortcut.pm
+++ b/IkiWiki/Plugin/shortcut.pm
@@ -62,6 +62,9 @@ sub shortcut_expand ($$@) { #{{{
}eg;
$text=~s/_/ /g;
+ if (defined $params{desc}) {
+ $desc=$params{desc};
+ }
if (defined $desc) {
$desc=~s/\%s/$text/g;
}
diff --git a/debian/changelog b/debian/changelog
index e5d6b44f6..30416ecdd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+ikiwiki (2.41) UNRELEASED; urgency=low
+
+ [ Adeodato Simó ]
+ * Preprocessor directives generated by the shortcut plugin accept a `desc`
+ parameter that overrides the anchor text provided at shortcut definition
+ time. (Closes: #458126)
+
+ [ martin f. krafft ]
+ * The meta plugin now allows for the robots tag to be specified without the
+ risk of it being scrubbed.
+
+ -- martin f. krafft <madduck@debian.org> Sun, 02 Mar 2008 17:46:38 +0100
+
ikiwiki (2.40) unstable; urgency=low
[ Josh Triplett ]
diff --git a/doc/ikiwiki/blog.mdwn b/doc/ikiwiki/blog.mdwn
index 1a816dceb..6a206bb62 100644
--- a/doc/ikiwiki/blog.mdwn
+++ b/doc/ikiwiki/blog.mdwn
@@ -53,7 +53,7 @@ directive:
* `skip` - Specify a number of pages to skip displaying. Can be useful
to produce a feed that only shows archived pages.
* `rss` - controls generation of an rss feed. If the wiki is configured to
- generate tss feeds by default, set to "no" to disable. If the wiki is
+ generate rss feeds by default, set to "no" to disable. If the wiki is
configured to `allowrss`, set to "yes" to enable.
* `atom` - controls generation of an atom feed. If the wiki is configured to
generate atom feeds by default, set to "no" to disable. If the wiki is
diff --git a/doc/plugins/meta.mdwn b/doc/plugins/meta.mdwn
index 0bcd11b67..b503e4511 100644
--- a/doc/plugins/meta.mdwn
+++ b/doc/plugins/meta.mdwn
@@ -103,6 +103,21 @@ Supported fields:
For both cases, an anchor to jump to inside the destination page may also be
specified using the common `PAGE#ANCHOR` syntax.
+* robots
+
+ Causes the robots meta tag to be written:
+
+ \[[meta robots="index, nofollow"]]
+
+ Valid values for the attribute are: "index", "noindex", "follow", and
+ "nofollow". Multiple comma-separated values are allowed, but obviously only
+ some combinations make sense. If there is no robots meta tag, "index,
+ follow" is used as the default.
+
+ The plugin escapes the value, but otherwise does not care about its
+ contents. In particular, it does not check the values against the set of
+ valid values but serves whatever you pass it.
+
If the field is not one of the above predefined fields, the metadata will be
written to the generated html page as a &lt;meta&gt; header. However, this
won't be allowed if the [[htmlscrubber]] is enabled, since it can be used to
diff --git a/doc/shortcuts.mdwn b/doc/shortcuts.mdwn
index e4e740897..8c0700165 100644
--- a/doc/shortcuts.mdwn
+++ b/doc/shortcuts.mdwn
@@ -7,6 +7,7 @@ Some examples of using shortcuts include:
\[[!google foo]]
\[[!wikipedia War_of_1812]]
\[[!debbug 12345]]
+ Check the \[[!cia ikiwiki desc="CIA page for %s"]].
This page controls what shortcut links the wiki supports.
@@ -62,7 +63,8 @@ controls the description of the link.
Remember that the `name` you give the shortcut will become a new
[[ikiwiki/PreprocessorDirective]]. Avoid using a `name` that conflicts
-with an existing directive.
+with an existing directive. These directives also accept a `desc`
+parameter that will override the one provided at definition time.
If you come up with a shortcut that you think others might find useful,
consider contributing it to the [shortcuts page on the ikiwiki
diff --git a/doc/todo/shortcut_with_different_link_text.mdwn b/doc/todo/shortcut_with_different_link_text.mdwn
index 07e999642..93f9651a4 100644
--- a/doc/todo/shortcut_with_different_link_text.mdwn
+++ b/doc/todo/shortcut_with_different_link_text.mdwn
@@ -57,5 +57,11 @@ So that the 'l' plugin inserts the location the page there, and markdown does th
For external links, that is no concern, however. So you could define for each shortcut an alternative directive, that inserts the URL. Perhaps `\[[url shortcutname params]]` or `\[[@shortcutname params]]` (if the preprocessor supported the @), and this could be extended to local links in an obvious manner: `\[[url page]]` or `\[[@page]]`. Now, if you could just get rid off the parantheses for markdown, for the short inline links --[[tuomov]] (who'd really rather not have two separate linking mechanisms: ikiwiki's heavy syntax and markdown's lighter one).
+---
+
+I've added code to make the \[[foo 123]] syntax accept a _desc_
+parameter. I've named it like this to signal that it overrides the
+_desc_ provided at description time. `%s` is expanded here as well.
+[[todo/done]] -- Adeodato Simó