From 285ef010c440a4c83093fbf0d2ac922849a873a4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 21 May 2009 14:51:57 -0400 Subject: add contrib plugin page for the mailbox plugin --- doc/plugins/contrib/mailbox.mdwn | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/plugins/contrib/mailbox.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/mailbox.mdwn b/doc/plugins/contrib/mailbox.mdwn new file mode 100644 index 000000000..b7a9f81c7 --- /dev/null +++ b/doc/plugins/contrib/mailbox.mdwn @@ -0,0 +1,18 @@ +[[!template id=plugin name=mailbox author="[[DavidBremner]]"]] +[[!tag type/format]] + +The `mailbox` plugin adds support to ikiwiki for +rendering mailbox file into a page displaying the mails +in the mailbox. It supports mbox, maildir, and MH folders, +does threading, and deals with MIME. + +One hitch I noticed was that it is not currently possible to treat a +maildir or an MH directory as a page (i.e. just call it foo.mh and have it +transformed to page foo). I'm not sure if this is possible and worthwhile +to fix. It is certainly workable to use a [[!mailbox ]] directive. +-- [[DavidBremner]] + +This plugin is not in ikiwiki yet, but can be downloaded +from + + -- cgit v1.2.3 From fb955a49456545774e8d434049e76c7231e28194 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 21 May 2009 14:59:21 -0400 Subject: add contrib plugin page for postal plugin --- doc/plugins/contrib/postal.mdwn | 39 +++++++++++++++++++++++++++++++ doc/todo/comment_by_mail.mdwn | 52 +---------------------------------------- 2 files changed, 40 insertions(+), 51 deletions(-) create mode 100644 doc/plugins/contrib/postal.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/postal.mdwn b/doc/plugins/contrib/postal.mdwn new file mode 100644 index 000000000..b14c80d3b --- /dev/null +++ b/doc/plugins/contrib/postal.mdwn @@ -0,0 +1,39 @@ +[[!template id=plugin name=postal author="[[DavidBremner]]"]] +[[!tag type/useful]] + +The `postal` plugin allows users to send mail to +a special address to comment on a page. It uses the [[mailbox]] +plugin to display their comments in the wiki. + +This plugin is not in ikiwiki yet, but can be downloaded +from + +Details: + + * Adds a mailto: url to each page matching some pagespec + (currently every page gets a comment footer) + + * This mailto url goes to an address identifying the page (something like + user-iki-blog~I\_hate\_markdown@host.fqdn.tld). + [more details](http://www.cs.unb.ca/~bremner/blog/posts/encoding) + + * on the mail receiving end, these messages are either deleted, or ran through + a filter to be turned into blog posts. As a first step, I have +[written](http://pivot.cs.unb.ca/git/?p=ikipostal.git;a=blob_plain;f=filters/postal-filer.pl;hb=010357a08e9) +a filter that decodes the address and writes the message into an appropriate +mailbox. I would be interested in any ideas people have about security. + + * the same plugin can check for comments on a particular page next time the wiki + is generated, and add a link. (more or less done) + > If the filter just checks in the posts into revision control, the + > post-commit hook would handle updating the wiki to include those + > posts as they come in. --[[Joey]] + * work in progress can be + + - [cloned](http://pivot.cs.unb.ca/git/ikipostal.git), or + - [browsed](http://pivot.cs.unb.ca/git/?p=ikipostal.git;a=summary) + +The current version of this plugin is now running on my home page. See for example +[a recent post in my blog](http://www.cs.unb.ca/~bremner/blog/posts/can-i-haz-a-distributed-rss/). +Unfortunately although the [[mailbox|todo/mbox]] renderer supports threading, I haven't had +a chance to implement comments on comments yet. --[[DavidBremner]] diff --git a/doc/todo/comment_by_mail.mdwn b/doc/todo/comment_by_mail.mdwn index bf934176a..87e57417e 100644 --- a/doc/todo/comment_by_mail.mdwn +++ b/doc/todo/comment_by_mail.mdwn @@ -1,53 +1,3 @@ I would like to allow comments on ikiwiki pages without CGI. -I have in mind something like - * Use a pagetemplate hook - in a plugin (DONE) - * add a mailto: url to each page matching some pagespec - (currently every page gets a comment footer) - * this mailto url goes to an address identifying the page (something like - user-iki-blog~I\_hate\_markdown@host.fqdn.tld). (DONE) - [more details](http://www.cs.unb.ca/~bremner/blog/posts/encoding) - - * on the mail receiving end, these messages are either deleted, or ran through - a filter to be turned into blog posts. As a first step, I have -[written](http://pivot.cs.unb.ca/git/?p=ikipostal.git;a=blob_plain;f=filters/postal-filer.pl;hb=010357a08e9) -a filter that decodes the address and writes the message into an appropriate -mailbox. I would be interested in any ideas people have about security. - - * the same plugin can check for comments on a particular page next time the wiki - is generated, and add a link. (more or less done) - > If the filter just checks in the posts into revision control, the - > post-commit hook would handle updating the wiki to include those - > posts as they come in. --[[Joey]] - * work in progress can be - - - [cloned](http://pivot.cs.unb.ca/git/ikipostal.git), or - - [browsed](http://pivot.cs.unb.ca/git/?p=ikipostal.git;a=summary) - - -Any comments? Write them here or send them to [[DavidBremner]] - -> I don't want to derail this with too much blue-skying, but I was thinking -> earlier that it would be nice if ikiwiki could do something sensible with -> mailbox files, such as turning them into a (threaded?) blog display. -> -> One reason I was thinking about that was just that it would be nice to -> be able to use ikiwiki for mailing list archives. But another reason was -> that it would be nice to solve the problem described in -> [[discussion_page_as_blog]]. For that you really want a threaded system, -> and mailbox file formats already have threading. -> -> If that were done, it would tie into what you're working on in an -> interesting way, since the incoming mail would only need to be committed to -> the appropriate mailbox file, with ikiwiki then running to process it. -> --[[Joey]] ->> It is an interesting idea. I like that it uses an arbitrary MUA ->> as a "moderation" interface. After I killed a debian BTS entry with ->> clumsy pseudoheader editing I think any ->> reference info should also be encoded into the address. - -The current version of this plugin is now running on my home page. See for example -[a recent post in my blog](http://www.cs.unb.ca/~bremner/blog/posts/can-i-haz-a-distributed-rss/). -Unfortunately although the [[mailbox|todo/mbox]] renderer supports threading, I haven't had -a chance to implement comments on comments yet. [[DavidBremner]] +> [[done]], see [[plugins/contrib/postal]] -- cgit v1.2.3 From 6fb04eaf8daa3ffebb9b5856fa8d222f5c2e9e11 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 21 May 2009 15:29:36 -0400 Subject: reword --- doc/plugins/contrib.mdwn | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib.mdwn b/doc/plugins/contrib.mdwn index e22b13f71..a03e6a95d 100644 --- a/doc/plugins/contrib.mdwn +++ b/doc/plugins/contrib.mdwn @@ -1,6 +1,5 @@ -Contributed [[plugins]]: - -(See [[install]] for installation help.) +These plugins are provided by third parties and are not currently +included in ikiwiki. See [[install]] for installation help. [[!inline pages="plugins/contrib/* and !*/Discussion" feedpages="created_after(plugins/contrib/navbar)" archive="yes" -- cgit v1.2.3 From e7bad274894fec38e03f99f54aa73586729e6798 Mon Sep 17 00:00:00 2001 From: bremner Date: Thu, 21 May 2009 15:54:55 -0400 Subject: update postal plugin page to reflect the fact I implement Joey's suggestion about checking new posts in to VCS --- doc/plugins/contrib/postal.mdwn | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/postal.mdwn b/doc/plugins/contrib/postal.mdwn index b14c80d3b..b2f875393 100644 --- a/doc/plugins/contrib/postal.mdwn +++ b/doc/plugins/contrib/postal.mdwn @@ -18,21 +18,17 @@ Details: [more details](http://www.cs.unb.ca/~bremner/blog/posts/encoding) * on the mail receiving end, these messages are either deleted, or ran through - a filter to be turned into blog posts. As a first step, I have -[written](http://pivot.cs.unb.ca/git/?p=ikipostal.git;a=blob_plain;f=filters/postal-filer.pl;hb=010357a08e9) -a filter that decodes the address and writes the message into an appropriate -mailbox. I would be interested in any ideas people have about security. - - * the same plugin can check for comments on a particular page next time the wiki - is generated, and add a link. (more or less done) - > If the filter just checks in the posts into revision control, the - > post-commit hook would handle updating the wiki to include those - > posts as they come in. --[[Joey]] + a filter to be turned into blog posts. I have +[written](http://pivot.cs.unb.ca/git/?p=ikipostal.git;a=blob_plain;f=filters/postal-accept.pl;hb=HEAD) + a filter that decodes the address and writes the message into an appropriate +mailbox. The changes are then checked into version control; typically a hook then updates the html version of the wiki. * work in progress can be - [cloned](http://pivot.cs.unb.ca/git/ikipostal.git), or - [browsed](http://pivot.cs.unb.ca/git/?p=ikipostal.git;a=summary) + * I would be interested in any ideas people have about security. + The current version of this plugin is now running on my home page. See for example [a recent post in my blog](http://www.cs.unb.ca/~bremner/blog/posts/can-i-haz-a-distributed-rss/). Unfortunately although the [[mailbox|todo/mbox]] renderer supports threading, I haven't had -- cgit v1.2.3 From 8ae260015fa6ecd5aa39a84898f42837935c9953 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 22 May 2009 22:57:03 -0400 Subject: highlight: New plugin supporting syntax highlighting of pretty much anything. * debian/control: Add suggests for libhighlight-perl, although that package is not yet created by Debian's highlight source package. (See #529869) --- IkiWiki/Plugin/highlight.pm | 118 +++++++++++++++++++++ debian/changelog | 10 ++ debian/control | 2 +- doc/plugins/highlight.mdwn | 72 +++++++++++++ doc/style.css | 18 ++++ ..._use_of_syntax_plugin_on_source_code_files.mdwn | 3 + doc/todo/syntax_highlighting.mdwn | 28 ++--- doc/todo/syntax_highlighting/discussion.mdwn | 2 + ...wiki-formatted_comments_with_syntax_plugin.mdwn | 5 + 9 files changed, 240 insertions(+), 18 deletions(-) create mode 100644 IkiWiki/Plugin/highlight.pm create mode 100644 doc/plugins/highlight.mdwn (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/highlight.pm b/IkiWiki/Plugin/highlight.pm new file mode 100644 index 000000000..f43f18628 --- /dev/null +++ b/IkiWiki/Plugin/highlight.pm @@ -0,0 +1,118 @@ +#!/usr/bin/perl +package IkiWiki::Plugin::highlight; + +use warnings; +use strict; +use IkiWiki 3.00; +use highlight; + +# locations of highlight's files +my $filetypes="/etc/highlight/filetypes.conf"; +my $langdefdir="/usr/share/highlight/langDefs"; + +sub import { + hook(type => "getsetup", id => "highlight", call => \&getsetup); + hook(type => "checkconfig", id => "highlight", call => \&checkconfig); +} + +sub getsetup () { + return + plugin => { + safe => 1, + rebuild => 1, # format plugin + }, + tohighlight => { + type => "string", + example => ".c, .h, .cpp, .pl, .py, Makefile:make", + description => "source files to syntax highlight", + safe => 1, + rebuild => 1, + }, +} + +sub checkconfig () { + if (exists $config{tohighlight}) { + foreach my $file (split /, /, $config{tohighlight}) { + my @opts = $file=~s/^\.// ? + (keepextension => 1) : + (noextension => 1); + my $ext = $file=~s/:(.*)// ? $1 : $file; + + my $langfile=ext2langfile($ext); + if (! defined $langfile) { + error(sprintf(gettext( + "tohighlight contains unknown file type '%s'"), + $ext)); + } + + hook( + type => "htmlize", + id => $file, + call => sub { + my %params=@_; + highlight($langfile, $params{content}); + }, + longname => sprintf(gettext("Source code: %s"), $file), + @opts, + ); + } + } +} + +my %ext2lang; +my $filetypes_read=0; + +# Parse highlight's config file to get extension => language mappings. +sub read_filetypes () { + open (IN, $filetypes); + while () { + chomp; + if (/^\$ext\((.*)\)=(.*)$/) { + $ext2lang{$_}=$1 foreach $1, split ' ', $2; + } + } + close IN; + $filetypes_read=1; +} + +sub langfile ($) { + return "$langdefdir/$_[0].lang"; +} + +# Given a filename extension, determines the language definition to +# use to highlight it. +sub ext2langfile ($) { + my $ext=shift; + + read_filetypes() unless $filetypes_read; + if (exists $ext2lang{$ext}) { + return langfile($ext2lang{$ext}); + } + # If a language only has one common extension, it will not + # be listed in filetypes, so check the langfile. + elsif (-e langfile($ext)) { + return langfile($ext); + } + else { + return undef; + } +} + +# Interface to the highlight C library. +sub highlight ($$) { + my $langfile=shift; + my $input=shift; + + my $gen = highlightc::CodeGenerator_getInstance($highlightc::XHTML); + $gen->setFragmentCode(1); # generate html fragment + $gen->setHTMLEnclosePreTag(1); # include stylish
+	$gen->initLanguage($langfile);
+	$gen->initTheme("/dev/null"); # theme is not needed because CSS is not emitted
+	$gen->setEncoding("utf-8");
+
+	my $output=$gen->generateString($input);
+	highlightc::CodeGenerator_deleteInstance($gen);
+	return $output;
+}
+
+1
diff --git a/debian/changelog b/debian/changelog
index 71445ea71..db3e32cda 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+ikiwiki (3.14) UNRELEASED; urgency=low
+
+  * highlight: New plugin supporting syntax highlighting of pretty much
+    anything.
+  * debian/control: Add suggests for libhighlight-perl, although
+    that package is not yet created by Debian's highlight source package.
+    (See #529869)
+
+ -- Joey Hess   Fri, 22 May 2009 22:03:12 -0400
+
 ikiwiki (3.13) unstable; urgency=low
 
   * ikiwiki-transition: If passed a nonexistant srcdir, or one not
diff --git a/debian/control b/debian/control
index 57c5f917a..233de8f7c 100644
--- a/debian/control
+++ b/debian/control
@@ -35,7 +35,7 @@ Suggests: viewvc | gitweb | viewcvs, libsearch-xapian-perl,
   liblocale-gettext-perl (>= 1.05-1), libtext-typography-perl,
   libtext-csv-perl, libdigest-sha1-perl, graphviz, libnet-amazon-s3-perl,
   sparkline-php, texlive, dvipng, libtext-wikicreole-perl,
-  libsort-naturally-perl, libtext-textile-perl
+  libsort-naturally-perl, libtext-textile-perl, libhighlight-perl
 Conflicts: ikiwiki-plugin-table
 Replaces: ikiwiki-plugin-table
 Provides: ikiwiki-plugin-table
diff --git a/doc/plugins/highlight.mdwn b/doc/plugins/highlight.mdwn
new file mode 100644
index 000000000..07e888f36
--- /dev/null
+++ b/doc/plugins/highlight.mdwn
@@ -0,0 +1,72 @@
+[[!template id=plugin name=highlight author="[[Joey]]"]]
+[[!tag type/format]]
+
+This plugin allows ikiwiki to syntax highlight source files, using
+a fast syntax highlighter that supports over a hundred programming
+languages and file formats.
+
+## prerequisites
+
+You will need to install the perl bindings to the
+[highlight library](http://www.andre-simon.de/), which in Debian
+are in the [[!debpkg libhighlight-perl]] package.
+
+## configuration
+
+Nothing will be highlighted by default.
+To enable syntax highlighting, use the `tohighlight` setting in your
+setup file to control which files should be syntax highlighted.
+Here is a typical setting for it, enabling highlighting for files
+with the extensions .c, etc, and also for any files named "Makefile".
+
+	tohighlight => .c, .h, .cpp, .pl, .py, Makefile:make",
+
+It knows what language to use for most filename extensions (see
+`/etc/highlight/filetypes.conf` for a partial list), but if you want to
+bind an unusual filename extension, or any file without an extension
+(such as a Makefile), to a language, you can do so by appending a colon
+and the name of the language, as illustrated for Makefiles above.
+
+## embedding highlighted code
+
+To embed highlighted code on a page, you can use the
+[[ikiwiki/directive/format]] directive.
+
+For example:
+
+	\[[!format c """
+	void main () {
+		printf("hello, world!");
+	}
+	"""]]
+
+You can do this for any of the extensions/filenames enabled in
+`tohighlight`.
+
+## colors
+
+The colors etc used for the syntax highlighting are entirely configurable
+by CSS. See ikiwiki's [[style.css]] for the defaults.
+
+## limitations
+
+With this plugin enabled, source files become full-fledged ikiwiki pages,
+which means they can include [[WikiLinks|ikiwiki/wikilink]] and
+[[directives|ikiwiki/directive]] like any other page can, and are also
+affected by the [[smiley]] plugin, if it is enabled. This can be
+annoying if your code accidentially contains things that look like those.
+
+On the other hand, this also allows your syntax highlighed
+source code to contain markdown formatted comments and hyperlinks
+to other code files, like this:
+
+	/* \[[!format mdwn """
+		This comment will be formatted as *markdown*!
+
+		See [[bar.h]].
+	""]] */
+
+## security
+
+This lets anyone who can edit a page in your wiki also edit
+source code files that are in your wiki. Use appropriate caution.
diff --git a/doc/style.css b/doc/style.css
index 74d968ddf..e6512aed8 100644
--- a/doc/style.css
+++ b/doc/style.css
@@ -389,3 +389,21 @@ span.color {
 	border: 1px solid #aaa;
 	padding: 3px;
 }
+
+/* Used by the highlight plugin. */
+
+pre.hl { color:#000000; background-color:#ffffff; }
+.hl.num { color:#2928ff; }
+.hl.esc { color:#ff00ff; }
+.hl.str { color:#ff0000; }
+.hl.dstr { color:#818100; }
+.hl.slc { color:#838183; font-style:italic; }
+.hl.com { color:#838183; font-style:italic; }
+.hl.dir { color:#008200; }
+.hl.sym { color:#000000; }
+.hl.line { color:#555555; }
+.hl.mark { background-color:#ffffbb; }
+.hl.kwa { color:#000000; font-weight:bold; }
+.hl.kwb { color:#830000; }
+.hl.kwc { color:#000000; font-weight:bold; }
+.hl.kwd { color:#010181; }
diff --git a/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files.mdwn b/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files.mdwn
index cd5ff34de..71b4b88f0 100644
--- a/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files.mdwn
+++ b/doc/todo/automatic_use_of_syntax_plugin_on_source_code_files.mdwn
@@ -12,3 +12,6 @@ this would allow the use of ikiwiki for [[!wikipedia literate programming]].
 * I have started something along these lines see [[plugins/contrib/sourcehighlight]].  For some reason I started with source-highlight [[DavidBremner]]
 
 * I wonder if this is similar to what you want: 
+
+> The new [[plugins/highlight]] plugin is in ikiwiki core and supports
+> source code files natively. [[done]] --[[Joey]] 
diff --git a/doc/todo/syntax_highlighting.mdwn b/doc/todo/syntax_highlighting.mdwn
index 81ba19bc8..01aa7b576 100644
--- a/doc/todo/syntax_highlighting.mdwn
+++ b/doc/todo/syntax_highlighting.mdwn
@@ -28,13 +28,17 @@ things easier for the user.
   also uses source-highlight, and operates on whole source files.
   Updated to work with the fix for [[bugs/multiple_pages_with_same_name]].  Untested with files with no extension, e.g. `Makefile`.
 * [[users/jasonblevins]]'s code plugin uses source-highlight, and supports both
-  while file and directive use.
+  whole file and directive use.
 
 * [hlsimple](http://pivot.cs.unb.ca/git/?p=ikiplugins.git;a=blob_plain;f=IkiWiki/Plugin/hlsimple.pm;hb=HEAD) is a wrapper for the the perl module [[!cpan Syntax::Highlight::Engine::Simple]].  This is pure perl, pretty simple, uses css. It ought to be pretty fast (according to the author, and just because it is not external).
 On the other hand, there are not many predefined languages yet.  Defining language syntaxes is about as much 
 work as source-highlight, but in perl.  I plan to package the base module for debian. Perhaps after the author 
 releases the 5 or 6 language definitions he has running on his web site, it might be suitable for inclusion in ikiwiki. [[DavidBremner]]
 
+* [[plugins/highlight]] uses [highlight](http://www.andre-simon.de) via
+  its swig bindings. It supports whole files only. It uses either
+  keepextension or noextension, as appropriate for the type of file.
+
 ## General problems / requirements
 
 * Using non-perl syntax highlighting backends is slower. All things equal,
@@ -56,7 +60,6 @@ releases the 5 or 6 language definitions he has running on his web site, it migh
   > it has a pass-through feature that I find very useful.  My memory is unfortunately a bit fuzzy as to how
   > well the swig bindings work. [[DavidBremner]]
 
-
 * Engines that already support a wide variety of file types are of
   course preferred. If the engine doesn't support a particular type
   of file, it could fall back to doing something simple like
@@ -105,20 +108,11 @@ releases the 5 or 6 language definitions he has running on his web site, it migh
 
   Perhaps the thing to do here is to use the new `longname` parameter to
   the format hook, to give them all names that will group together at or
-  near the end of the list. Ie: "Syntax: perl", "Syntax: C", etc.
-
-## format directive and comments
-
-Hmm, the [[ikiwiki/directive/format]] directive would also allow comments
-inside source files to have mdwn embedded in them, without making the use
-of mdwn a special case, or needing to postprocess the syntax highlighter
-output to find comments.
-
-	/* \[[!format mdwn """
-
-	This is a comment in my C file. You can use mdwn in here.
+  near the end of the list. Ie: "Syntax: perl", "Source code: c", etc.
 
-	"""]] */
+---
 
-Note that this assumes that directives are expanded in source files,
-which has its own set of problems.
+I'm calling this [[done]] since I added the [[plugins/highlight]]
+plugin. There are some unresolved issues touched on here,
+but they either have the own other bug reports, or are documented
+as semi-features in the docs to the plugin. --[[Joey]] 
diff --git a/doc/todo/syntax_highlighting/discussion.mdwn b/doc/todo/syntax_highlighting/discussion.mdwn
index 7a4095c65..27cb7084b 100644
--- a/doc/todo/syntax_highlighting/discussion.mdwn
+++ b/doc/todo/syntax_highlighting/discussion.mdwn
@@ -24,3 +24,5 @@ repository?  --[[JasonBlevins]]
 >> [[sourcecode|todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion]]
 >> plugin only adds the file extensions listed in the config.  This shouldn't cause
 >> massive drop-down menu pollution.  -- [[Will]]
+
+>>> That seems to be the way to go! --[[Joey]] 
diff --git a/doc/todo/wiki-formatted_comments_with_syntax_plugin.mdwn b/doc/todo/wiki-formatted_comments_with_syntax_plugin.mdwn
index a5244c9ef..7a4a295d4 100644
--- a/doc/todo/wiki-formatted_comments_with_syntax_plugin.mdwn
+++ b/doc/todo/wiki-formatted_comments_with_syntax_plugin.mdwn
@@ -2,3 +2,8 @@
 wiki syntax within the comments of code pretty-printed with the
 [[plugins/contrib/syntax]] plugin.  This would allow the use of links and
 formatting in comments.
+
+> You can do this using the [[plugins/highlight]] plugin, but you have
+> to explicitly put a format directive in the comment to do it. Thus,
+> I'm leaving this open for now.. ideally, comments would be detected,
+> and formatted as markdown. --[[Joey]] 
-- 
cgit v1.2.3


From 21d6aded47d306fb44a60c1a8ad9331933cac855 Mon Sep 17 00:00:00 2001
From: Joey Hess 
Date: Fri, 22 May 2009 23:05:58 -0400
Subject: formatting

---
 doc/plugins/highlight.mdwn | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'doc/plugins')

diff --git a/doc/plugins/highlight.mdwn b/doc/plugins/highlight.mdwn
index 07e888f36..0cab8717b 100644
--- a/doc/plugins/highlight.mdwn
+++ b/doc/plugins/highlight.mdwn
@@ -63,7 +63,7 @@ to other code files, like this:
 	/* \[[!format mdwn """
 		This comment will be formatted as *markdown*!
 
-		See [[bar.h]].
+		See \[[bar.h]].
 	""]] */
 
 ## security
-- 
cgit v1.2.3


From cdd1b58b386da575f3c73ab94ae72e5e66be797b Mon Sep 17 00:00:00 2001
From: Joey Hess 
Date: Sat, 23 May 2009 00:09:14 -0400
Subject: remove commas in tohighlight list

---
 IkiWiki/Plugin/highlight.pm | 4 ++--
 doc/plugins/highlight.mdwn  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'doc/plugins')

diff --git a/IkiWiki/Plugin/highlight.pm b/IkiWiki/Plugin/highlight.pm
index f43f18628..117ab5898 100644
--- a/IkiWiki/Plugin/highlight.pm
+++ b/IkiWiki/Plugin/highlight.pm
@@ -23,7 +23,7 @@ sub getsetup () {
 		},
 		tohighlight => {
 			type => "string",
-			example => ".c, .h, .cpp, .pl, .py, Makefile:make",
+			example => ".c .h .cpp .pl .py Makefile:make",
 			description => "source files to syntax highlight",
 			safe => 1,
 			rebuild => 1,
@@ -32,7 +32,7 @@ sub getsetup () {
 
 sub checkconfig () {
 	if (exists $config{tohighlight}) {
-		foreach my $file (split /, /, $config{tohighlight}) {
+		foreach my $file (split ' ', $config{tohighlight}) {
 			my @opts = $file=~s/^\.// ?
 				(keepextension => 1) :
 				(noextension => 1);
diff --git a/doc/plugins/highlight.mdwn b/doc/plugins/highlight.mdwn
index 0cab8717b..5172af759 100644
--- a/doc/plugins/highlight.mdwn
+++ b/doc/plugins/highlight.mdwn
@@ -19,7 +19,7 @@ setup file to control which files should be syntax highlighted.
 Here is a typical setting for it, enabling highlighting for files
 with the extensions .c, etc, and also for any files named "Makefile".
 
-	tohighlight => .c, .h, .cpp, .pl, .py, Makefile:make",
+	tohighlight => ".c .h .cpp .pl .py Makefile:make",
 
 It knows what language to use for most filename extensions (see
 `/etc/highlight/filetypes.conf` for a partial list), but if you want to
-- 
cgit v1.2.3


From 47298b01c1921deff7e056406245a90f8371bd59 Mon Sep 17 00:00:00 2001
From: Joey Hess 
Date: Sat, 23 May 2009 05:17:26 -0400
Subject: allow format to use any language supported by highlight

format: Provide a htmlizefallback hook that other plugins can use to
handle formats that are not suitable for general-purpose htmlize hooks.

highlight: Use the hook to allow formatting of any language/extension,
without it needing to be enabled for standalone source files.

highlight: If the highlight perl binding is not available, fallback
safely to a passthrough mode.
---
 IkiWiki/Plugin/format.pm          | 28 +++++++++++-----
 IkiWiki/Plugin/highlight.pm       | 21 +++++++++++-
 debian/changelog                  |  3 ++
 doc/plugins/highlight.mdwn        | 67 ++++++++++++++++++++-------------------
 doc/todo/syntax_highlighting.mdwn |  6 ++--
 5 files changed, 82 insertions(+), 43 deletions(-)

(limited to 'doc/plugins')

diff --git a/IkiWiki/Plugin/format.pm b/IkiWiki/Plugin/format.pm
index bbe3aa9fe..1513cbed7 100644
--- a/IkiWiki/Plugin/format.pm
+++ b/IkiWiki/Plugin/format.pm
@@ -10,21 +10,33 @@ sub import {
 }
 
 sub preprocess (@) {
-	my $format=$_[0];
-	shift; shift;
-	my $text=$_[0];
-	shift; shift;
 	my %params=@_;
+	my $format=shift;
+	shift;
+	my $text=IkiWiki::preprocess($params{page}, $params{destpage}, shift);
+	shift;
 
 	if (! defined $format || ! defined $text) {
 		error(gettext("must specify format and text"));
 	}
-	elsif (! exists $IkiWiki::hooks{htmlize}{$format}) {
-		error(sprintf(gettext("unsupported page format %s"), $format));
+	elsif (exists $IkiWiki::hooks{htmlize}{$format}) {
+		return IkiWiki::htmlize($params{page}, $params{destpage},
+		                        $format, $text);
 	}
+	else {
+		# Other plugins can register htmlizefallback
+		# hooks to add support for page types
+		# not suitable for htmlize. Try them until
+		# one succeeds.
+		my $ret;
+		IkiWiki::run_hooks(htmlizefallback => sub {
+			$ret=shift->($format, $text)
+				unless defined $ret;
+		});
+		return $ret if defined $ret;
 
-	return IkiWiki::htmlize($params{page}, $params{destpage}, $format,
-		IkiWiki::preprocess($params{page}, $params{destpage}, $text));
+		error(sprintf(gettext("unsupported page format %s"), $format));
+	}
 }
 
 1
diff --git a/IkiWiki/Plugin/highlight.pm b/IkiWiki/Plugin/highlight.pm
index 117ab5898..f116c41dd 100644
--- a/IkiWiki/Plugin/highlight.pm
+++ b/IkiWiki/Plugin/highlight.pm
@@ -4,7 +4,6 @@ package IkiWiki::Plugin::highlight;
 use warnings;
 use strict;
 use IkiWiki 3.00;
-use highlight;
 
 # locations of highlight's files
 my $filetypes="/etc/highlight/filetypes.conf";
@@ -13,6 +12,9 @@ my $langdefdir="/usr/share/highlight/langDefs";
 sub import {
 	hook(type => "getsetup", id => "highlight",  call => \&getsetup);
 	hook(type => "checkconfig", id => "highlight", call => \&checkconfig);
+	# this hook is used by the format plugin
+	hook(type => "htmlizefallback", id => "highlight", call =>
+		\&htmlizefallback);
 }
 
 sub getsetup () {
@@ -59,6 +61,17 @@ sub checkconfig () {
 	}
 }
 
+sub htmlizefallback {
+	my $format=lc shift;
+	my $langfile=ext2langfile($format);
+
+	if (! defined $langfile) {
+		return;
+	}
+
+	return highlight($langfile, shift);
+}
+
 my %ext2lang;
 my $filetypes_read=0;
 
@@ -103,6 +116,12 @@ sub highlight ($$) {
 	my $langfile=shift;
 	my $input=shift;
 
+	eval q{use highlight};
+	if ($@) {
+		print STDERR gettext("warning: highlight perl module not available; falling back to pass through");
+		return $input;
+	}
+
 	my $gen = highlightc::CodeGenerator_getInstance($highlightc::XHTML);
 	$gen->setFragmentCode(1); # generate html fragment
 	$gen->setHTMLEnclosePreTag(1); # include stylish 
diff --git a/debian/changelog b/debian/changelog
index db3e32cda..8088fa705 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,9 @@ ikiwiki (3.14) UNRELEASED; urgency=low
   * debian/control: Add suggests for libhighlight-perl, although
     that package is not yet created by Debian's highlight source package.
     (See #529869)
+  * format: Provide a htmlizefallback hook that other plugins
+    can use to handle formats that are not suitable for general-purpose
+    htmlize hooks. Used by highlight.
 
  -- Joey Hess   Fri, 22 May 2009 22:03:12 -0400
 
diff --git a/doc/plugins/highlight.mdwn b/doc/plugins/highlight.mdwn
index 5172af759..44ced80f7 100644
--- a/doc/plugins/highlight.mdwn
+++ b/doc/plugins/highlight.mdwn
@@ -1,7 +1,7 @@
 [[!template id=plugin name=highlight author="[[Joey]]"]]
 [[!tag type/format]]
 
-This plugin allows ikiwiki to syntax highlight source files, using
+This plugin allows ikiwiki to syntax highlight source code, using
 a fast syntax highlighter that supports over a hundred programming
 languages and file formats.
 
@@ -11,26 +11,10 @@ You will need to install the perl bindings to the
 [highlight library](http://www.andre-simon.de/), which in Debian
 are in the [[!debpkg libhighlight-perl]] package.
 
-## configuration
-
-Nothing will be highlighted by default.
-To enable syntax highlighting, use the `tohighlight` setting in your
-setup file to control which files should be syntax highlighted.
-Here is a typical setting for it, enabling highlighting for files
-with the extensions .c, etc, and also for any files named "Makefile".
-
-	tohighlight => ".c .h .cpp .pl .py Makefile:make",
-
-It knows what language to use for most filename extensions (see
-`/etc/highlight/filetypes.conf` for a partial list), but if you want to
-bind an unusual filename extension, or any file without an extension
-(such as a Makefile), to a language, you can do so by appending a colon
-and the name of the language, as illustrated for Makefiles above.
-
 ## embedding highlighted code
 
 To embed highlighted code on a page, you can use the
-[[ikiwiki/directive/format]] directive.
+[[format]] plugin.
 
 For example:
 
@@ -40,21 +24,36 @@ For example:
 	}
 	"""]]
 
-You can do this for any of the extensions/filenames enabled in
-`tohighlight`.
+	\[[!format diff """
+	-bar
+	+foo
+	"""]]
 
-## colors
+You can do this for any extension or language name supported by
+the [highlight library](http://www.andre-simon.de/) -- basically anything
+you can think of should work.
 
-The colors etc used for the syntax highlighting are entirely configurable
-by CSS. See ikiwiki's [[style.css]] for the defaults.
+## highlighting entire source files
 
-## limitations
+To enable syntax highlighting of entire standalone source files, use the
+`tohighlight` setting in your setup file to control which files should be
+syntax highlighted. Here is a typical setting for it, enabling highlighting
+for files with the extensions .c, etc, and also for any files named
+"Makefile".
 
-With this plugin enabled, source files become full-fledged ikiwiki pages,
-which means they can include [[WikiLinks|ikiwiki/wikilink]] and
-[[directives|ikiwiki/directive]] like any other page can, and are also
-affected by the [[smiley]] plugin, if it is enabled. This can be
-annoying if your code accidentially contains things that look like those.
+	tohighlight => ".c .h .cpp .pl .py Makefile:make",
+
+It knows what language to use for most filename extensions (see
+`/etc/highlight/filetypes.conf` for a partial list), but if you want to
+bind an unusual filename extension, or any file without an extension
+(such as a Makefile), to a language, you can do so by appending a colon
+and the name of the language, as illustrated for Makefiles above.
+
+With the plugin configured this way, source files become full-fledged
+wiki pages, which means they can include [[WikiLinks|ikiwiki/wikilink]]
+and [[directives|ikiwiki/directive]] like any other page can, and are also
+affected by the [[smiley]] plugin, if it is enabled. This can be annoying
+if your code accidentially contains things that look like those.
 
 On the other hand, this also allows your syntax highlighed
 source code to contain markdown formatted comments and hyperlinks
@@ -66,7 +65,11 @@ to other code files, like this:
 		See \[[bar.h]].
 	""]] */
 
-## security
+Finally, bear in mind that this lets anyone who can edit a page in your
+wiki also edit source code files that are in your wiki. Use appropriate
+caution.
+
+## colors
 
-This lets anyone who can edit a page in your wiki also edit
-source code files that are in your wiki. Use appropriate caution.
+The colors etc used for the syntax highlighting are entirely configurable
+by CSS. See ikiwiki's [[style.css]] for the defaults.
diff --git a/doc/todo/syntax_highlighting.mdwn b/doc/todo/syntax_highlighting.mdwn
index 01aa7b576..3d122829b 100644
--- a/doc/todo/syntax_highlighting.mdwn
+++ b/doc/todo/syntax_highlighting.mdwn
@@ -36,8 +36,10 @@ work as source-highlight, but in perl.  I plan to package the base module for de
 releases the 5 or 6 language definitions he has running on his web site, it might be suitable for inclusion in ikiwiki. [[DavidBremner]]
 
 * [[plugins/highlight]] uses [highlight](http://www.andre-simon.de) via
-  its swig bindings. It supports whole files only. It uses either
-  keepextension or noextension, as appropriate for the type of file.
+  its swig bindings. It optionally supports whole files, but also
+  integrates with the format directive to allow formatting of *any* of
+  highlight's supported formats. (For whole files, it uses either
+  keepextension or noextension, as appropriate for the type of file.)
 
 ## General problems / requirements
 
-- 
cgit v1.2.3


From 3c68de2e1786d75f2dc4610163a881116958ac30 Mon Sep 17 00:00:00 2001
From: "http://dr.jones.dk/" 
Date: Mon, 25 May 2009 18:29:16 -0400
Subject: Mention bug#530574: improved po4a Markdown support

---
 doc/plugins/contrib/po.mdwn | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'doc/plugins')

diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn
index 5b33f6716..265f37fd2 100644
--- a/doc/plugins/contrib/po.mdwn
+++ b/doc/plugins/contrib/po.mdwn
@@ -423,3 +423,5 @@ daring a timid "please pull"... or rather, please review again :)
 >> --[[intrigeri]]
 >>
 >>> Did you get a chance to? --[[Joey]] 
+
+Related to this is [bug#530574](http://bugs.debian.org/530574) with improved po4a Markdown support. -- [[JonasSmedegaard]]
-- 
cgit v1.2.3


From 817a40b7812d8bb5eacf2d0a265ef175ac74e1ea Mon Sep 17 00:00:00 2001
From: "http://dr.jones.dk/" 
Date: Thu, 28 May 2009 04:13:33 -0400
Subject: Move po4a patch note up close to "translated basewiki", and expand
 with note on danish translation.

---
 doc/plugins/contrib/po.mdwn | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'doc/plugins')

diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn
index 265f37fd2..364d8e6b2 100644
--- a/doc/plugins/contrib/po.mdwn
+++ b/doc/plugins/contrib/po.mdwn
@@ -153,6 +153,14 @@ Any thoughts on this?
 >> basewiki, which seems like it should be pretty easy to do, and would be
 >> a great demo! --[[Joey]]
 >>
+>>> I have a complete translation of basewiki into danish, and am working with
+>>> others on preparing one in german.  For a complete translated user
+>>> experience, however, you will also need templates translated (there are a few
+>>> translatable strings there too).  My not-yet-merged po4a Markdown improvements
+>>> (see [bug#530574](http://bugs.debian.org/530574)) correctly handles multiple
+>>> files in a single PO which might be relevant for template translation handling.
+>>> --[[JonasSmedegaard]]
+>>
 >>> I've merged your changes into my own branch, and made great
 >>> progress on the various todo items. Please note my repository
 >>> location has changed a few days ago, my user page was updated
@@ -423,5 +431,3 @@ daring a timid "please pull"... or rather, please review again :)
 >> --[[intrigeri]]
 >>
 >>> Did you get a chance to? --[[Joey]] 
-
-Related to this is [bug#530574](http://bugs.debian.org/530574) with improved po4a Markdown support. -- [[JonasSmedegaard]]
-- 
cgit v1.2.3


From e90adc56c38ebac42baddd05d68c9590465498ae Mon Sep 17 00:00:00 2001
From: "http://dr.jones.dk/" 
Date: Thu, 28 May 2009 13:20:52 -0400
Subject: Mention need for localized templates, and separation of system and
 page locales.

---
 doc/plugins/contrib/po.mdwn | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

(limited to 'doc/plugins')

diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn
index 364d8e6b2..51dca4bf4 100644
--- a/doc/plugins/contrib/po.mdwn
+++ b/doc/plugins/contrib/po.mdwn
@@ -431,3 +431,21 @@ daring a timid "please pull"... or rather, please review again :)
 >> --[[intrigeri]]
 >>
 >>> Did you get a chance to? --[[Joey]] 
+
+ * As discussed at [[todo/l10n]] the templates needs to be translatable too.  They
+   should be treated properly by po4a using the markdown option - at least with my
+   later patches in [bug#530574](http://bugs.debian.org/530574)) applied.
+
+ * It seems to me that the po plugin (and possibly other parts of ikiwiki) wrongly
+   uses gettext.  As I understand it, gettext (as used currently in ikiwiki) always
+   lookup a single language, That might make sense for a single-language site, but
+   multilingual sites should emit all strings targeted at the web output in each own
+   language.
+
+   So generally the system language (used for e.g. compile warnings) should be separated
+   from both master language and slave languages.
+
+   Preferrably the gettext subroutine could be extended to pass locale as optional
+   secondary parameter overriding the default locale (for messages like "N/A" as
+   percentage in po plugin).  Alternatively (with above mentioned template support)
+   all such strings could be externalized as templates that can then be localized.
-- 
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/plugins')

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 f902bedd322b1e64d50444d21c2b753240d7dc01 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 3 Jun 2009 18:31:41 +0200 Subject: po: fixed one of the last Joey's concerns Signed-off-by: intrigeri --- doc/plugins/contrib/po.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn index 51dca4bf4..665e48343 100644 --- a/doc/plugins/contrib/po.mdwn +++ b/doc/plugins/contrib/po.mdwn @@ -391,6 +391,9 @@ daring a timid "please pull"... or rather, please review again :) >>> "discussion". Also, I consider `$config{cgi}` and `%links` (etc) >>> documented parts of the plugin interface, which won't change; po could >>> rely on them to avoid this minor problem. --[[Joey]] +>>>> +>>>> Done in my branch. --[[intrigeri]] +>>>> > > * Is there any real reason not to allow removing a translation? > I'm imagining a spammy translation, which an admin might not -- cgit v1.2.3 From 068f1398852ae963158f475242ef1e4465d13a8b Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" Date: Wed, 3 Jun 2009 12:50:22 -0400 Subject: Fixing a broken link: since it's not obvious how many broken links point to this location, I'm creating a redirect rather than just fixing one broken link. --- doc/plugins/mailbox.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/plugins/mailbox.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/mailbox.mdwn b/doc/plugins/mailbox.mdwn new file mode 100644 index 000000000..595bcfbc1 --- /dev/null +++ b/doc/plugins/mailbox.mdwn @@ -0,0 +1 @@ +[[!meta redir=contrib/mailbox]] -- cgit v1.2.3 From 1f0560d262144be7d1be75e931db4a194d9ff85e Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" Date: Wed, 3 Jun 2009 12:53:51 -0400 Subject: Adding a plain link along with a redirect in order to track backlinks at the bottom of the target page correctly. --- doc/plugins/mailbox.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/mailbox.mdwn b/doc/plugins/mailbox.mdwn index 595bcfbc1..d3646486c 100644 --- a/doc/plugins/mailbox.mdwn +++ b/doc/plugins/mailbox.mdwn @@ -1 +1,3 @@ [[!meta redir=contrib/mailbox]] + +Redirecting to [[contrib/mailbox]]. -- cgit v1.2.3 From 5193f9ee6b3b2a5c914d4de56cf25db52c47aa1c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 3 Jun 2009 15:42:04 -0400 Subject: update openid docs regarding openid 2, since smcv noticed a newer perl module supports it. Although, based on its bug reports at , there may be some problems (myspace is known not to work, for example). --- doc/ikiwiki/openid.mdwn | 2 +- doc/plugins/openid.mdwn | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'doc/plugins') diff --git a/doc/ikiwiki/openid.mdwn b/doc/ikiwiki/openid.mdwn index 5c91dfb58..a79655284 100644 --- a/doc/ikiwiki/openid.mdwn +++ b/doc/ikiwiki/openid.mdwn @@ -16,7 +16,7 @@ To sign up for an OpenID, visit one of the following identity providers: * [Videntity](http://videntity.org/) * [LiveJournal](http://www.livejournal.com/openid/) * [TrustBearer](https://openid.trustbearer.com/) -* or any of the [many others out there](http://openiddirectory.com/openid-providers-c-1.html) (but not [Yahoo](http://openid.yahoo.com) [[yet|plugins/openid/discussion/#Yahoo_unsupported]]). +* or any of the [many others out there](http://openiddirectory.com/openid-providers-c-1.html) Your OpenID is the URL that you are given when you sign up. [[!if test="enabled(openid)" then=""" diff --git a/doc/plugins/openid.mdwn b/doc/plugins/openid.mdwn index d4aa18c7d..91fc7cddc 100644 --- a/doc/plugins/openid.mdwn +++ b/doc/plugins/openid.mdwn @@ -4,10 +4,12 @@ This plugin allows users to use their [OpenID](http://openid.net/) to log into the wiki. -The plugin needs the [[!cpan Net::OpenID::Consumer]] perl module. The -[[!cpan LWPx::ParanoidAgent]] perl module is used if available, for added -security. Finally, the [[!cpan Crypt::SSLeay]] perl module is needed to support -users entering "https" OpenID urls. +The plugin needs the [[!cpan Net::OpenID::Consumer]] perl module. +Version 1.x is needed in order for OpenID v2 to work. + +The [[!cpan LWPx::ParanoidAgent]] perl module is used if available, for +added security. Finally, the [[!cpan Crypt::SSLeay]] perl module is needed +to support users entering "https" OpenID urls. This plugin has a configuration option. You can set `--openidsignup` to the url of a third-party site where users can sign up for an OpenID. If -- cgit v1.2.3 From 95e3e2d352b43e88a4ad87ef6d25ec53a7474422 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 3 Jun 2009 15:46:47 -0400 Subject: fix link, remove redirection page There was only one broken links. See plugins/brokenlinks for a list. --- doc/plugins/mailbox.mdwn | 3 --- doc/todo/mbox.mdwn | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 doc/plugins/mailbox.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/mailbox.mdwn b/doc/plugins/mailbox.mdwn deleted file mode 100644 index d3646486c..000000000 --- a/doc/plugins/mailbox.mdwn +++ /dev/null @@ -1,3 +0,0 @@ -[[!meta redir=contrib/mailbox]] - -Redirecting to [[contrib/mailbox]]. diff --git a/doc/todo/mbox.mdwn b/doc/todo/mbox.mdwn index 31e4a9863..a6af0c3c5 100644 --- a/doc/todo/mbox.mdwn +++ b/doc/todo/mbox.mdwn @@ -3,7 +3,7 @@ I'd like to be able to drop an unmodified RFC2822 email message into ikiwiki, an > We're discussing doing just that (well, whole mailboxes, really) over in > [[comment_by_mail]] --[[Joey]] >> The ->> [[plugins/mailbox]] +>> [[plugins/contrib/mailbox]] >> plugin is roughly feature complete at this point. It can read mbox, maildir, and >> MH folders, does threading, and deals with MIME (now with >> pagespec based sanity checking). No doubt lots of things could be -- cgit v1.2.3 From 2e48da19a29d6c06dbdb8c1e0a00a2c3528cf8ee Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" Date: Thu, 4 Jun 2009 10:53:15 -0400 Subject: Reporting minor problems with cvonnecting to the remote repo. --- doc/plugins/contrib/mailbox/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/plugins/contrib/mailbox/discussion.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/mailbox/discussion.mdwn b/doc/plugins/contrib/mailbox/discussion.mdwn new file mode 100644 index 000000000..00fb0c05f --- /dev/null +++ b/doc/plugins/contrib/mailbox/discussion.mdwn @@ -0,0 +1,5 @@ +# The remote repo + +For some reason, `git fetch` from http://pivot.cs.unb.ca/git/ikimailbox.git/ didn't work very smoothly for me: it hung, and I had to restart it 3 times before the download was complete. + +I'm writing this just to let you know that there might be some problems with such connections to your http-server. --Ivan Z. -- cgit v1.2.3 From 52b635c70827ef2cab65a97097e5896e9f7adf90 Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" Date: Fri, 5 Jun 2009 13:55:48 -0400 Subject: Fixed a wikilink. --- doc/plugins/txt.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/txt.mdwn b/doc/plugins/txt.mdwn index 77d94d450..420898d09 100644 --- a/doc/plugins/txt.mdwn +++ b/doc/plugins/txt.mdwn @@ -8,7 +8,7 @@ Unlike other [[type/format]] plugins, no formatting of markup in txt files is done; the file contents is displayed to the user as-is, with html markup characters such as ">" escaped. -The only exceptions are that [[WikiLinks|WikiLink]] and +The only exceptions are that [[WikiLinks|ikiwiki/WikiLink]] and [[directives|ikiwiki/directive]] are still expanded by ikiwiki, and that, if the [[!cpan URI::Find]] perl module is installed, URLs in the txt file are converted to hyperlinks. -- cgit v1.2.3 From 9362aa77563bc0a0f72e8ae1a31b8b0721a08fbf Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" Date: Fri, 5 Jun 2009 14:31:16 -0400 Subject: Test the more plugin. --- doc/plugins/more/discussion.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/plugins/more/discussion.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/more/discussion.mdwn b/doc/plugins/more/discussion.mdwn new file mode 100644 index 000000000..f369d1e12 --- /dev/null +++ b/doc/plugins/more/discussion.mdwn @@ -0,0 +1,7 @@ +# Test: + +[[!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. +"""]] -- cgit v1.2.3 From 62bec4f47b6c447f38428bfeaf19d383b43ed922 Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" Date: Fri, 5 Jun 2009 14:50:53 -0400 Subject: Added a keyword to the description, so that this plugin can be found by searching. --- doc/plugins/contrib/headinganchors.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/headinganchors.mdwn b/doc/plugins/contrib/headinganchors.mdwn index c80cc0b49..0b007f00e 100644 --- a/doc/plugins/contrib/headinganchors.mdwn +++ b/doc/plugins/contrib/headinganchors.mdwn @@ -1,6 +1,6 @@ [[!template id=plugin name=headinganchors author="[[PaulWise]]"]] -This is a simple plugin to add ids to all headings, based on their text. It +This is a simple plugin to add ids (which will server as [[ikiwiki/anchor]]s) to all headings, based on their text. It works as a postprocessing filter, allowing it to work on mdwn, wiki, html, rst and any other format that produces html. The code is available here: -- cgit v1.2.3 From 91edfd285126e832812e027cea60b87f808cb4aa Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" Date: Fri, 5 Jun 2009 14:55:27 -0400 Subject: A suggestion to simply extract/merge this functionality from/with another plugin. --- doc/plugins/contrib/headinganchors/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/plugins/contrib/headinganchors/discussion.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/headinganchors/discussion.mdwn b/doc/plugins/contrib/headinganchors/discussion.mdwn new file mode 100644 index 000000000..a5e4dd54f --- /dev/null +++ b/doc/plugins/contrib/headinganchors/discussion.mdwn @@ -0,0 +1 @@ +Isn't this functionality a part of what [[plugins/toc]] needs and does? Then probably the [[plugins/toc]] plugin's code could be split into the part that implements the [[plugins.contrib/headinganchors]]'s functionality and the TOC generation itself. That will bring more order into the code and the set of available plugins. --Ivan Z. -- cgit v1.2.3 From 30d23b969ea85a4a4472d6c64d3e99060b79d7f3 Mon Sep 17 00:00:00 2001 From: "http://lj.rossia.org/users/imz/" Date: Fri, 5 Jun 2009 14:56:41 -0400 Subject: Fixed a wikilink target. --- doc/plugins/contrib/headinganchors/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/headinganchors/discussion.mdwn b/doc/plugins/contrib/headinganchors/discussion.mdwn index a5e4dd54f..91fe04a6d 100644 --- a/doc/plugins/contrib/headinganchors/discussion.mdwn +++ b/doc/plugins/contrib/headinganchors/discussion.mdwn @@ -1 +1 @@ -Isn't this functionality a part of what [[plugins/toc]] needs and does? Then probably the [[plugins/toc]] plugin's code could be split into the part that implements the [[plugins.contrib/headinganchors]]'s functionality and the TOC generation itself. That will bring more order into the code and the set of available plugins. --Ivan Z. +Isn't this functionality a part of what [[plugins/toc]] needs and does? Then probably the [[plugins/toc]] plugin's code could be split into the part that implements the [[plugins/contrib/headinganchors]]'s functionality and the TOC generation itself. That will bring more order into the code and the set of available plugins. --Ivan Z. -- cgit v1.2.3 From df20a91bc9efe48cb96ecb7efd39643a816dd489 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 5 Jun 2009 16:24:46 -0400 Subject: move anchor page out of ikiwiki subdir Since this page is not in the basewiki, it is confusing to put it in the ikiwiki subdir, which is intended for basewiki and other underlay pages that are used to document ikiwiki on other wikis. --- doc/anchor.mdwn | 3 +++ doc/ikiwiki/anchor.mdwn | 3 --- doc/ikiwiki/wikilink/discussion.mdwn | 4 ++-- doc/plugins/contrib/headinganchors.mdwn | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 doc/anchor.mdwn delete mode 100644 doc/ikiwiki/anchor.mdwn (limited to 'doc/plugins') diff --git a/doc/anchor.mdwn b/doc/anchor.mdwn new file mode 100644 index 000000000..012e52fa0 --- /dev/null +++ b/doc/anchor.mdwn @@ -0,0 +1,3 @@ +ikiwiki works with anchors in various situations. + +This page accumulates links to the concept of anchors. diff --git a/doc/ikiwiki/anchor.mdwn b/doc/ikiwiki/anchor.mdwn deleted file mode 100644 index 012e52fa0..000000000 --- a/doc/ikiwiki/anchor.mdwn +++ /dev/null @@ -1,3 +0,0 @@ -ikiwiki works with anchors in various situations. - -This page accumulates links to the concept of anchors. diff --git a/doc/ikiwiki/wikilink/discussion.mdwn b/doc/ikiwiki/wikilink/discussion.mdwn index ac32834b2..b146c9447 100644 --- a/doc/ikiwiki/wikilink/discussion.mdwn +++ b/doc/ikiwiki/wikilink/discussion.mdwn @@ -1,6 +1,6 @@ -# Creating an [[ikiwiki/anchor]] in Markdown +# Creating an [[anchor]] in Markdown -Is it a native Markdown "tag" for creating an [[ikiwiki/anchor]]? Unfortunately, +Is it a native Markdown "tag" for creating an [[anchor]]? Unfortunately, I haven't any information about it at [Markdown syntax](http://daringfireball.net/projects/markdown/syntax) page. diff --git a/doc/plugins/contrib/headinganchors.mdwn b/doc/plugins/contrib/headinganchors.mdwn index 0b007f00e..becbf89a5 100644 --- a/doc/plugins/contrib/headinganchors.mdwn +++ b/doc/plugins/contrib/headinganchors.mdwn @@ -1,6 +1,6 @@ [[!template id=plugin name=headinganchors author="[[PaulWise]]"]] -This is a simple plugin to add ids (which will server as [[ikiwiki/anchor]]s) to all headings, based on their text. It +This is a simple plugin to add ids (which will serve as [[anchor]]s) to all headings, based on their text. It works as a postprocessing filter, allowing it to work on mdwn, wiki, html, rst and any other format that produces html. The code is available here: -- cgit v1.2.3