From fcc3b945d6dfb00a93863d39da56e91544ae799d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 22 May 2009 14:43:31 -0400 Subject: document internal here (was already documented in plugins/aggregate) --- doc/ikiwiki/directive/aggregate.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/ikiwiki/directive') diff --git a/doc/ikiwiki/directive/aggregate.mdwn b/doc/ikiwiki/directive/aggregate.mdwn index 70174f440..ddfcd40b7 100644 --- a/doc/ikiwiki/directive/aggregate.mdwn +++ b/doc/ikiwiki/directive/aggregate.mdwn @@ -19,6 +19,11 @@ more aggregated feeds. For example: \[[!inline pages="internal(example/*)"]] +Note the use of `internal()` in the [[ikiwiki/PageSpec]] to match +aggregated pages. By default, aggregated pages are internal pages, +which prevents them from showing up directly in the wiki, and so this +special [[PageSpec]] is needed to match them. + ## usage Here are descriptions of all the supported parameters to the `aggregate` -- cgit v1.2.3 From a9970df0bfd3d982def2747b4576cea54b211b0f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 23 May 2009 05:21:19 -0400 Subject: mention highlight --- doc/ikiwiki/directive/format.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc/ikiwiki/directive') diff --git a/doc/ikiwiki/directive/format.mdwn b/doc/ikiwiki/directive/format.mdwn index 94cf1b04f..23830e9cd 100644 --- a/doc/ikiwiki/directive/format.mdwn +++ b/doc/ikiwiki/directive/format.mdwn @@ -18,4 +18,12 @@ some other format: 4 """]] +Note that if the highlight plugin is enabled, this directive can also be +used to display syntax highlighted code. Many languages and formats are +supported. For example: + + \[[format perl """ + print "hello, world\n"; + """]] + [[!meta robots="noindex, follow"]] -- cgit v1.2.3 From 5cdee82ef6c8f9fa888b35ef81f2bcc35dd8ce4a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 2 Jun 2009 17:06:46 -0400 Subject: comment: Make comment directives no longer use the internal "_comment" form, and document the comment directive syntax. Rationalle: Comments need to be user-editable so that they can be posted via git commit etc. The _comment directive is still supported, for back-compat. --- IkiWiki/Plugin/comments.pm | 4 +++- debian/changelog | 7 +++++++ doc/ikiwiki/directive/comment.mdwn | 38 ++++++++++++++++++++++++++++++++++++++ doc/plugins/comments.mdwn | 2 +- templates/editcomment.tmpl | 1 - 5 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 doc/ikiwiki/directive/comment.mdwn (limited to 'doc/ikiwiki/directive') diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 0aa4759d8..517e16f9f 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -21,6 +21,8 @@ my %commentstate; sub import { hook(type => "checkconfig", id => 'comments', call => \&checkconfig); hook(type => "getsetup", id => 'comments', call => \&getsetup); + hook(type => "preprocess", id => 'comment', call => \&preprocess); + # here for backwards compatability with old comments hook(type => "preprocess", id => '_comment', call => \&preprocess); hook(type => "sessioncgi", id => 'comment', call => \&sessioncgi); hook(type => "htmlize", id => "_comment", call => \&htmlize); @@ -377,7 +379,7 @@ sub editcomment ($$) { my $location=unique_comment_location($page, $config{srcdir}); - my $content = "[[!_comment format=$type\n"; + my $content = "[[!comment format=$type\n"; # FIXME: handling of double quotes probably wrong? if (defined $session->param('name')) { diff --git a/debian/changelog b/debian/changelog index 4a1844e06..cee073b3a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ikiwiki (3.15) UNRELEASED; urgency=low + + * comment: Make comment directives no longer use the internal "_comment" + form, and document the comment directive syntax. + + -- Joey Hess Tue, 02 Jun 2009 17:03:41 -0400 + ikiwiki (3.14) unstable; urgency=low * highlight: New plugin supporting syntax highlighting of pretty much diff --git a/doc/ikiwiki/directive/comment.mdwn b/doc/ikiwiki/directive/comment.mdwn new file mode 100644 index 000000000..f03664d13 --- /dev/null +++ b/doc/ikiwiki/directive/comment.mdwn @@ -0,0 +1,38 @@ +The `comment` directive is supplied by the +[[!iki plugins/comment desc=comment]] plugin, and is used to add a comment +to a page. Typically, the directive is the only thing on a comment page, +and is filled out by the comment plugin when a user posts a comment. + +Example: + + \[[!comment format=mdwn + username="foo" + subject="Bar" + date="2009-06-02T19:05:01Z" + content=""" + Blah blah. + """ + ]] + +## usage + +The only required parameter is `content`, the others just add or override +metadata of the comment. + +* `content` - Text to display for the comment. + Note that [[directives|ikiwiki/directive]] + may not be allowed, depending on the configuration + of the comment plugin. +* `format` - Specifies the markup used for the content. +* `subject` - Subject for the comment. +* `date` - Date the comment was posted. Can be entered in + nearly any format, since it's parsed by [[!cpan TimeDate]] +* `username` - Used to record the username (or OpenID) + of a logged in commenter. +* `ip` - Can be used to record the IP address of a commenter, + if they posted anonymously. +* `claimedauthor` - Records the name that the user entered, + if anonmous commenters are allowed to enter their (unverified) + name. + +[[!meta robots="noindex, follow"]] diff --git a/doc/plugins/comments.mdwn b/doc/plugins/comments.mdwn index c13a6daa6..7e2232411 100644 --- a/doc/plugins/comments.mdwn +++ b/doc/plugins/comments.mdwn @@ -19,7 +19,7 @@ users can only post comments. Individual comments are stored as internal-use pages named something like `page/comment_1`, `page/comment_2`, etc. These pages internally use a -`\[[!_comment]]` [[ikiwiki/directive]]. +[[comment_directive|ikiwiki/directive/comment]]. There are some global options for the setup file: diff --git a/templates/editcomment.tmpl b/templates/editcomment.tmpl index 27d9457d4..545edb596 100644 --- a/templates/editcomment.tmpl +++ b/templates/editcomment.tmpl @@ -16,7 +16,6 @@ Website: (optional)
Subject:


-IkiWiki directives ([[!directive]]) are not allowed in comments on this wiki.
-- cgit v1.2.3 From 2ab9e4b4d48d556b38135986ecfceecdcd1f1d95 Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" Date: Wed, 3 Jun 2009 07:34:25 -0400 Subject: Correct wikilink. --- doc/ikiwiki/directive/comment.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/ikiwiki/directive') diff --git a/doc/ikiwiki/directive/comment.mdwn b/doc/ikiwiki/directive/comment.mdwn index f03664d13..21386dfc3 100644 --- a/doc/ikiwiki/directive/comment.mdwn +++ b/doc/ikiwiki/directive/comment.mdwn @@ -1,5 +1,5 @@ The `comment` directive is supplied by the -[[!iki plugins/comment desc=comment]] plugin, and is used to add a comment +[[!iki plugins/comments desc=comments]] plugin, and is used to add a comment to a page. Typically, the directive is the only thing on a comment page, and is filled out by the comment plugin when a user posts a comment. -- cgit v1.2.3