Merge branch 'debian-testing'
authorJoey Hess <joey@kitenet.net>
Sun, 15 Aug 2010 16:01:16 +0000 (12:01 -0400)
committerJoey Hess <joey@kitenet.net>
Sun, 15 Aug 2010 16:01:16 +0000 (12:01 -0400)
Conflicts:
debian/changelog

30 files changed:
IkiWiki/Plugin/filecheck.pm
IkiWiki/Plugin/flattr.pm [new file with mode: 0644]
IkiWiki/Plugin/relativedate.pm
IkiWiki/Plugin/smiley.pm
IkiWiki/Plugin/toggle.pm
debian/changelog
doc/bugs/po:_po_files_instead_of_html_files.mdwn [new file with mode: 0644]
doc/forum/cutpaste.pm_not_only_file-local.mdwn [new file with mode: 0644]
doc/forum/cutpaste.pm_not_only_file-local/comment_1_497c62f21fd1b87625b806407c72dbad._comment [new file with mode: 0644]
doc/forum/multi_domain_setup_possible__63__.mdwn [new file with mode: 0644]
doc/ikiwiki/directive/flattr.mdwn [new file with mode: 0644]
doc/ikiwikiusers.mdwn
doc/news/ikiwiki-hosting.mdwn [new file with mode: 0644]
doc/news/version_3.20100804.mdwn [new file with mode: 0644]
doc/plugins/contrib/flattr.mdwn
doc/plugins/contrib/ikiwiki/directive/ymlfront.mdwn [new file with mode: 0644]
doc/plugins/contrib/ymlfront.mdwn
doc/plugins/contrib/ymlfront/discussion.mdwn
doc/plugins/filecheck.mdwn
doc/plugins/filecheck/discussion.mdwn
doc/plugins/flattr.mdwn [new file with mode: 0644]
doc/plugins/rst/discussion.mdwn
doc/sandbox.mdwn
doc/style.css
doc/tips/Importing_posts_from_Wordpress.mdwn
doc/todo/Add_nicer_math_formatting.mdwn [new file with mode: 0644]
doc/todo/avatar.mdwn
doc/todo/generic_insert_links [new file with mode: 0644]
doc/todo/want_to_avoid_ikiwiki_using_http_or_https_in_urls_to_allow_serving_both.mdwn
doc/users/Perry.mdwn [new file with mode: 0644]

index d00b6dfd3e0445fe243502929cfa92589e15a77c..a78058ffed7b15b46e1c1352c88ce70eebc4b00a 100644 (file)
@@ -132,15 +132,28 @@ sub match_mimetype ($$;@) {
                return IkiWiki::ErrorReason->new("file does not exist");
        }
 
-       # Use ::magic to get the mime type, the idea is to only trust
-       # data obtained by examining the actual file contents.
+       # Get the mime type.
+       #
+       # First, try File::Mimeinfo. This is fast, but doesn't recognise
+       # all files.
        eval q{use File::MimeInfo::Magic};
-       if ($@) {
-               return IkiWiki::ErrorReason->new("failed to load File::MimeInfo::Magic ($@); cannot check MIME type");
+       my $mimeinfo_ok=! $@;
+       my $mimetype;
+       if ($mimeinfo_ok) {
+               my $mimetype=File::MimeInfo::Magic::magic($file);
        }
-       my $mimetype=File::MimeInfo::Magic::magic($file);
+
+       # Fall back to using file, which has a more complete
+       # magic database.
        if (! defined $mimetype) {
-               $mimetype=File::MimeInfo::Magic::default($file);
+               open(my $file_h, "-|", "file", "-bi", $file);
+               $mimetype=<$file_h>;
+               close $file_h;
+       }
+       if (! defined $mimetype || $mimetype !~s /;.*//) {
+               # Fall back to default value.
+               $mimetype=File::MimeInfo::Magic::default($file)
+                       if $mimeinfo_ok;
                if (! defined $mimetype) {
                        $mimetype="unknown";
                }
diff --git a/IkiWiki/Plugin/flattr.pm b/IkiWiki/Plugin/flattr.pm
new file mode 100644 (file)
index 0000000..3aee1eb
--- /dev/null
@@ -0,0 +1,97 @@
+#!/usr/bin/perl
+package IkiWiki::Plugin::flattr;
+
+use warnings;
+use strict;
+use IkiWiki 3.00;
+
+sub import {
+       hook(type => "getsetup", id => "flattr", call => \&getsetup);
+       hook(type => "preprocess", id => "flattr", call => \&preprocess);
+       hook(type => "format", id => "flattr", call => \&format);
+}
+
+sub getsetup () {
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+               flattr_userid => {
+                       type => "string",
+                       example => 'joeyh',
+                       description => "userid or user name to use by default for Flattr buttons",
+                       advanced => 0,
+                       safe => 1,
+                       rebuild => undef,
+               },
+}
+
+my %flattr_pages;
+
+sub preprocess (@) {
+       my %params=@_;
+
+       $flattr_pages{$params{destpage}}=1;
+
+       my $url=$params{url};
+       if (! defined $url) {
+               $url=urlto($params{page}, "", 1);
+       }
+
+       my @fields;
+       foreach my $field (qw{language uid button hidden category tags}) {
+               if (exists $params{$field}) {
+                       push @fields, "$field:$params{$field}";
+               }
+       }
+       
+       return '<a class="FlattrButton" href="'.$url.'"'.
+                       (exists $params{title} ? ' title="'.$params{title}.'"' : '').
+               ' rev="flattr;'.join(';', @fields).';"'.
+               '>'.
+               (exists $params{description} ? $params{description} : '').
+               '</a>';
+}
+
+sub format (@) {
+       my %params=@_;
+
+       # Add flattr's javascript to pages with flattr buttons.
+       if ($flattr_pages{$params{page}}) {
+               if (! ($params{content}=~s!^(<body[^>]*>)!$1.flattrjs()!em)) {
+                       # no <body> tag, probably in preview mode
+                       $params{content}=flattrjs().$params{content};
+               }
+       }
+       return $params{content};
+}
+
+my $js_cached;
+sub flattrjs {
+       return $js_cached if defined $js_cached;
+
+       my $js_url='https://api.flattr.com/js/0.5.0/load.js?mode=auto';
+       if (defined $config{flattr_userid}) {
+               my $userid=$config{flattr_userid};
+               $userid=~s/[^-A-Za-z0-9_]//g; # sanitize for inclusion in javascript
+               $js_url.="&uid=$userid";
+       }
+
+       # This is Flattr's standard javascript snippet to include their
+       # external javascript file, asynchronously.
+       return $js_cached=<<"EOF";
+<script type="text/javascript">
+<!--//--><![CDATA[//><!--
+(function() {
+       var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
+       s.type = 'text/javascript';
+       s.async = true;
+       s.src = '$js_url';
+       t.parentNode.insertBefore(s, t);
+})();//--><!]]>
+</script>
+EOF
+}
+
+1
index c9280ef14799dbecdba10c0bcc259027a245d2fc..7296889ab28f21c9c642e468d503dc502428ede7 100644 (file)
@@ -27,7 +27,7 @@ sub format (@) {
         my %params=@_;
 
        if (! ($params{content}=~s!^(<body[^>]*>)!$1.include_javascript($params{page})!em)) {
-               # no </body> tag, probably in preview mode
+               # no <body> tag, probably in preview mode
                $params{content}=include_javascript($params{page}, 1).$params{content};
        }
        return $params{content};
index 0d77916d0d3d633e7656d79527cce12647089d47..6f4f49d18f4b3fb08d0d73a8ba877987fb12a94d 100644 (file)
@@ -25,7 +25,14 @@ sub getsetup () {
 }
 
 sub build_regexp () {
-       my $list=readfile(srcfile("smileys.mdwn"));
+       my $srcfile = srcfile("smileys.mdwn", 1);
+       if (! defined $srcfile) {
+               print STDERR sprintf(gettext("smiley plugin will not work without %s"),
+                       "smileys.mdwn")."\n";
+               $smiley_regexp='';
+               return;
+       }
+       my $list=readfile($srcfile);
        while ($list =~ m/^\s*\*\s+\\\\([^\s]+)\s+\[\[([^]]+)\]\]/mg) {
                my $smiley=$1;
                my $file=$2;
index 20967d3fd79e85fb5f0e677b0a7d76eb6e7ac38f..1f93f87fe5f714e4b22e195cdc9b780311c14c65 100644 (file)
@@ -69,7 +69,7 @@ sub format (@) {
        if ($params{content}=~s!(<div class="toggleable(?:-open)?" id="[^"]+">\s*)</div>!$1!g) {
                $params{content}=~s/<div class="toggleableend">//g;
                if (! ($params{content}=~s!^(<body[^>]*>)!$1.include_javascript($params{page})!em)) {
-                       # no </body> tag, probably in preview mode
+                       # no <body> tag, probably in preview mode
                        $params{content}=include_javascript($params{page}, 1).$params{content};
                }
        }
index 98d13376d138720bb030306243b69dbf9321e85b..b9b08050b61f8293fcb7570a2e246ecb5cf0f1df 100644 (file)
@@ -1,3 +1,13 @@
+ikiwiki (3.20100816) UNRELEASED; urgency=low
+
+  * filecheck: Fall back to using the file command if the freedesktop
+    magic file cannot identify a file.
+  * flattr: New plugin. (Thanks to jaywalk for the initial implementation
+    at a flattr plugin! This one is less configurable, but simpler.)
+  * smiley: warn instead of error for missing smileys (Giuseppe Bilotta)
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 15 Aug 2010 11:45:48 -0400
+
 ikiwiki (3.20100815) unstable; urgency=medium
 
   * Fix po test suite to not assume ikiwiki's underlay is already installed.
diff --git a/doc/bugs/po:_po_files_instead_of_html_files.mdwn b/doc/bugs/po:_po_files_instead_of_html_files.mdwn
new file mode 100644 (file)
index 0000000..4b08c7c
--- /dev/null
@@ -0,0 +1,4 @@
+On the home page of my wiki, when i click on the link "ikiwiki", i get the english file instead of the french file.  
+At the bottom of this page, there is the "Links" line:  
+Links: index index.fr templates templates.fr  
+When i click on "templates.fr", i get the po.file instead of html.
diff --git a/doc/forum/cutpaste.pm_not_only_file-local.mdwn b/doc/forum/cutpaste.pm_not_only_file-local.mdwn
new file mode 100644 (file)
index 0000000..3563e3e
--- /dev/null
@@ -0,0 +1,14 @@
+I'd like to use the cutpaste plugin, but not only on a file-local basis: fileA
+has \[[!cut id=foo text="foo"]], and fileB does \[[!absorb pagenames=fileA]],
+and can then use \[[!paste id=foo]].
+
+Therefore, I've written an [*absorb* directive /
+plugin](http://www.thomas.schwinge.homeip.net/tmp/absorb.pm), which is meant to
+absorb pages in order to get hold of their *cut* and *copy* directives'
+contents.  This does work as expected.  But it also absorbs page fileA's *meta*
+values, like a *meta title*, etc.  How to avoid / solve this?
+
+Alternatively, do you have a better suggestion about how to achieve what I
+described in the first paragraph?
+
+--[[tschwinge]]
diff --git a/doc/forum/cutpaste.pm_not_only_file-local/comment_1_497c62f21fd1b87625b806407c72dbad._comment b/doc/forum/cutpaste.pm_not_only_file-local/comment_1_497c62f21fd1b87625b806407c72dbad._comment
new file mode 100644 (file)
index 0000000..8cc724a
--- /dev/null
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="http://kerravonsen.dreamwidth.org/"
+ ip="60.241.8.244"
+ subject="field and getfield and ymlfront"
+ date="2010-08-12T02:33:54Z"
+ content="""
+Have you considered trying the [[plugins/contrib/field]] plugin, and its associated plugins?  [[plugins/contrib/ymlfront]] can give you the source (\"cut\") and [[plugins/contrib/getfield]] and/or [[plugins/contrib/report]] can get you the value (\"paste\") including the values from other pages.
+"""]]
diff --git a/doc/forum/multi_domain_setup_possible__63__.mdwn b/doc/forum/multi_domain_setup_possible__63__.mdwn
new file mode 100644 (file)
index 0000000..01b31aa
--- /dev/null
@@ -0,0 +1,15 @@
+Hi! I am searching for a replacement of my blog and webpages made off static HTML with just some custom PHP around it for years already. ikiwiki seems to be one of the hot candidates, since it uses a RCS.
+
+I would like to have a multi domain setup like this:
+
+- myname.private.de => more of a personal page
+- professional.de => more of my professional work related page
+- and possibly others
+
+Now when I write a blog entry about some Linux, Debian or KDE stuff, I possibly would like to have it shown on my private and my professional domain.
+
+And I might like to use some kind of inter wiki links now and then.
+
+Is such a setup possible? I thought about have a big wiki with Apache serving sub directories from it under different domains, but then wiki links like would not work.
+
+Maybe having the same blog entry, same content on several domains is not such a hot idea, but as long as I do not see a problem with it, I'd like to do it.
diff --git a/doc/ikiwiki/directive/flattr.mdwn b/doc/ikiwiki/directive/flattr.mdwn
new file mode 100644 (file)
index 0000000..5083005
--- /dev/null
@@ -0,0 +1,45 @@
+The `flattr` directive is supplied by the [[!iki plugins/flattr desc=flattr]] plugin.
+
+This directive allows easily inserting Flattr buttons onto wiki pages.
+
+Flattr supports both static buttons and javascript buttons. This directive
+only creates dynamic javascript buttons. If you want to insert a static
+Flattr button, you can simply copy the html code for it from Flattr, instead.
+Note that this directive inserts javascript code into the page, that
+loads more javascript code from Flattr.com. So only use it if you feel
+comfortable with that.
+
+The directive can be used to display a button for a thing you have already
+manually submitted to Flattr. In this mode, the only parameter you need to
+include is the exact url to the thing that was submitted to Flattr.
+(If the button is for the current page, you can leave that out.) For
+example, this is the Flattr button for ikiwiki. Feel free to add it to all
+your pages. ;)
+
+       \[[!flattr url="http://ikiwiki.info/" button=compact]]
+
+The directive can also be used to create a button that automatically
+submits a page to Flattr when a user clicks on it. In this mode you
+need to include parameters to specify your uid, and a title, category, tags,
+and description for the page. For example, this is a Flattr button for
+a blog post:
+       
+       \[[!flattr uid=25634 title="my new blog post" category=text
+       tags="blog,example" description="This is a post on my blog."]]
+
+Here are all possible parameters you can pass to the Flattr directive.
+
+* `button` - Set to "compact" for a small button.
+* `url` - The url to the thing to be Flattr'd. If omitted, defaults
+  to the url of the current page.
+* `uid` - Your numeric Flattr userid. Not needed if the flattr plugin
+  has been configured with a global `flattr_userid`.
+* `title` - A short title for the thing, to show on its Flattr page.
+* `description` - A description of the thing, to show on its Flattr
+  page.
+* `category` - One of: text, images, video, audio, software, rest.
+* `tags` - A list of tags separated by a comma.
+* `language` - A language code.
+* `hidden` - Set to 1 to hide the button from listings on Flattr.com.
+
+[[!meta robots="noindex, follow"]]
index efa111bae7f651d0790bcb9c39ce144fe1b4999b..e76d547cc4b5c081279695dae21c74f2495647bc 100644 (file)
@@ -1,3 +1,8 @@
+Ikiwiki Hosting
+===============
+
+* [Branchable](http://branchable.com/)
+
 Projects & Organizations
 ========================
 
diff --git a/doc/news/ikiwiki-hosting.mdwn b/doc/news/ikiwiki-hosting.mdwn
new file mode 100644 (file)
index 0000000..092530a
--- /dev/null
@@ -0,0 +1,16 @@
+ikiwiki-hosting is an interface on top of Ikiwiki to allow easy management
+of lots of ikiwiki sites. I developed it for
+[Branchable](http://www.branchable.com/), an Ikiwiki hosting provider.
+It has a powerful, scriptable command-line interface, and also
+includes special-purpose ikiwiki plugins for things like a user control
+panel.
+
+To get a feel for it, here are some examples:
+
+       ikisite create foo.ikiwiki.net --admin http://joey.kitenet.net/
+       ikisite branch foo.ikiwiki.net bar.ikiwiki.net
+       ikisite backup bar.ikiwiki.net --stdout | ssh otherhost 'ikisite restore bar.ikiwiki.net --stdin'
+
+ikiwiki-hosting is free software, released under the AGPL. Its website:
+<http://ikiwiki-hosting.branchable.com/>
+--[[Joey]]
diff --git a/doc/news/version_3.20100804.mdwn b/doc/news/version_3.20100804.mdwn
new file mode 100644 (file)
index 0000000..be85cb9
--- /dev/null
@@ -0,0 +1,14 @@
+ikiwiki 3.20100804 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+   * template: Fix dependency tracking. Broken in version 3.20100427.
+   * po: The po\_slave\_languages setting is now a list, so the order of
+     translated languages can be controlled. (intrigeri)
+   * git: Fix gitweb historyurl examples so "diff to current" links work.
+     (Thanks jrayhawk)
+   * meta: Allow syntax closer to html meta to be used.
+   * Add new disable hook, allowing plugins to perform cleanup after they
+     have been disabled.
+   * Use Digest::SHA built into perl rather than external Digest::SHA1
+     to simplify dependencies. Closes: #[591040](http://bugs.debian.org/591040)
+   * Fixes a bug that prevented matching deleted pages when using the page()
+     PageSpec."""]]
\ No newline at end of file
index f8f005c319dadbb8bda326143a10632413bc6c6a..e9b4bf85728e2d7d771f4ac37094e45d667b5b82 100644 (file)
@@ -10,6 +10,9 @@ I wrote some notes on [jonatan.walck.se](http://jonatan.walck.se/software/ikiwik
 
 This plugin is licensed under [CC0](http://creativecommons.org/publicdomain/zero/1.0/) (public domain).
 
+Note that there is now a [[plugins/flattr]] plugin bundled with ikiwiki. It
+is less configurable, not supporting static buttons, but simpler to use.
+
 # Usage #
 
     # [[!flattr args]] where args are in the form of arg=value.
diff --git a/doc/plugins/contrib/ikiwiki/directive/ymlfront.mdwn b/doc/plugins/contrib/ikiwiki/directive/ymlfront.mdwn
new file mode 100644 (file)
index 0000000..bb4a58f
--- /dev/null
@@ -0,0 +1,17 @@
+The `ymlfront` directive is supplied by the [[!iki plugins/contrib/ymlfront desc=ymlfront]] plugin.
+
+This directive allows the user to define arbitrary meta-data in YAML format.
+
+    \[[!ymlfront data="""
+     foo: fooness
+     bar: The Royal Pigeon
+     baz: 2
+     """]]
+
+There is one argument to this directive.
+
+* **data:**
+  The YAML-format data.  This should be enclosed inside triple-quotes to preserve the data correctly.
+
+If more than one ymlfront directive is given per page, the result is undefined.
+Likewise, it is inadvisable to try to mix the "---" ymlfront format with the directive form of the data.
index 6dd8ed532ad07d9873ae45be37ad9a70d7b53cef..a2c649044b3c40ccbd9e655646fdab1ef1286fb8 100644 (file)
@@ -13,18 +13,21 @@ IkiWiki::Plugin::ymlfront - add YAML-format data to a page
 ## DESCRIPTION
 
 This plugin provides a way of adding arbitrary meta-data (data fields) to any
-page by prefixing the page with a YAML-format document.  This provides a way to
-create per-page structured data, where each page is treated like a record, and
-the structured data are fields in that record.  This can include the meta-data
-for that page, such as the page title.
+page by prefixing the page with a YAML-format document.  This also provides
+the [[ikiwiki/directive/ymlfront]] directive, which enables one to put
+YAML-formatted data inside a standard IkiWiki [[ikiwiki/directive]].
+
+This is a way to create per-page structured data, where each page is
+treated like a record, and the structured data are fields in that record.  This
+can include the meta-data for that page, such as the page title.
 
 This plugin is meant to be used in conjunction with the [[field]] plugin.
 
 ## DETAILS
 
-The YAML-format data in a page must be placed at the start of the page
-and delimited by lines containing precisely three dashes.  The "normal"
-content of the page then follows.
+If one is not using the ymlfront directive, the YAML-format data in a page
+must be placed at the start of the page and delimited by lines containing
+precisely three dashes.  The "normal" content of the page then follows.
 
 For example:
 
@@ -42,7 +45,7 @@ That will be htmlized using the page-type of the page-file.
 
 ### Accessing the Data
 
-There are a few ways to access the data given in the YAML section.
+There are a few ways to access the given YAML data.
 
 * [[getfield]] plugin
 
index b5c08fedd23b0fa0a1cbd21dc97bf14ba198f7bb..b1fd65fffbacc0f8272d7e579ca1e9c25f60ba27 100644 (file)
@@ -1,13 +1,6 @@
-My field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb:
-<http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/field-etc>)
-has some fixes for compatibility with old YAML modules, mostly done by imitating
-Joey's code in IkiWiki::Setup::Yaml. Please consider merging :-) --[[smcv]]
+Now that I have implemented a \[[!ymlfront ...]] directive, I would like to remove support for the old "---" delimited format, because
 
-> I would if I could *find* it.  I checked out the "field-etc" branch, but I can't find the plugins in question under IkiWiki/Plugin; am I looking in the wrong place, or what?
-> --[[KathrynAndersen]]
+* it is fragile (easily breakable)
+* it is non-standard
 
->> Sorry, I accidentally removed `field-etc` by pushing with `--mirror` from a
->> different checkout. I've put it back; it's a branch from your `ikiplugins.git`,
->> so yes, the code should be in `IkiWiki/Plugin`. --[[smcv]]
-
->>> Done a while back, but now I've actually pushed to my repo. --[[KathrynAndersen]]
+Any objections?
index e5f68b29c317d1ae854bc0a28661be3b953446db..b038bc433c7c3dbdbb0da64334c41b954f843099 100644 (file)
@@ -7,7 +7,8 @@ status. These tests are mostly useful for the [[attachment]] plugin, and
 are documented [[here|ikiwiki/pagespec/attachment]].
 
 This plugin will use the [[!cpan File::MimeInfo::Magic]] perl module, if
-available, for mimetype checking.
+available, for mimetype checking. It falls back to using the `file` command
+if necessary for hard to detect files.
 
 The `virusfree` [[PageSpec|ikiwiki/pagespec/attachment]] requires that
 ikiwiki be configured with a virus scanner program via the `virus_checker`
index f91950b7df39a894c63f54991c885f019cde73c1..6ef780772967624359eac334d166d5d7f3778d69 100644 (file)
@@ -15,3 +15,57 @@ if ::magic() returns undef?  --[[DavidBremner]]
 >> for ::default
 
 >>> Applied
+
+---
+
+At first I need to thank you for ikiwiki - it is what I was always looking
+for - coming from a whole bunch of wiki engines, this is the most
+intelligent and least bloated one.
+
+My question is about the [[plugins/attachment]] plugin in conjunction with
+[[plugins/filecheck]]: I am using soundmanger2 js-library for having
+attached media files of all sorts played inline a page. 
+
+To achieve this soundmanager2 asks for an id inside a ul-tag surrounding
+the a-tag. I was wondering if the Insert Link button could be provided with
+a more elegant solution than to have this code snippet to be filled in by
+hand every time you use it to insert links for attached media files. And in
+fact there apparently is a way in attachment.pm. 
+
+While I can see that it is not needed for everyone inserting links to
+attached media files to have ul- and li-tags surrounding the link itself as
+well as being supplied with an id fill in, for me it would be the most
+straight forward solution. Pitty is I don't have the time to wrap my head
+around perl to write a patch myself.  Is there any way to have this made an
+option which can be called via templates?
+
+For sure I would like to donate for such a patch as well as I will do it
+for ikiwiki anyway, because it is such a fine application.
+
+If you are not familiar with soundmanager2: It is a very straight forward
+solution to inline mediafiles, using the usual flash as well as html5
+solutions (used by soundcloud.com, freesound.org and the like). Worth a
+look anyway [schillmania.com](http://www.schillmania.com/)
+
+Boris
+
+> The behavior of "Insert Links" is currently hardcoded to support images
+> and has a fallback for other files. What you want is a 
+> [[todo/generic_insert_links]] that can insert a template directive.
+> Then you could make a template that generates the html needed for
+> soundmanager2. I've written down a design at
+> [[todo/generic_insert_links]]; I am currently very busy and not sure
+> when I will get around to writing it, but with it on the todo list
+> I shouldn't forget. --[[Joey]] 
+> 
+> You could make a [[ikiwiki/directive/template]] for soundmanager2
+> now, and manually insert the template directive for now
+> when you want to embed a sound file. Something like this:
+
+       \[[!template id=embed_mp3 file=your.mp3]]
+
+> Then in templates/embed_mp3.mdwn, something vaguely like this:
+
+       <ul id="foo">
+       <a href="<TMPL_VAR FILE>">mp3</a>
+       </ul>
diff --git a/doc/plugins/flattr.mdwn b/doc/plugins/flattr.mdwn
new file mode 100644 (file)
index 0000000..5da2795
--- /dev/null
@@ -0,0 +1,9 @@
+[[!template id=plugin name=flattr author="[[Joey]]"]]
+[[!tag type/web]]
+
+[Flattr](http://flattr.com/) is a social micropayment platform.
+This plugin allows easily adding Flattr buttons to pages,
+using the [[ikiwiki/directive/flattr]] directive.
+
+This plugin has a configuration setting. `flattr_userid` can be set
+to either your numeric flatter userid, or your flattr username.
index 3c3b03275a471dc572ba68e6e129b077170ee5c2..c84a6218e37334c540174a47f1f0e2ab0996fc51 100644 (file)
@@ -71,3 +71,11 @@ I need help on a couple of points
 * Can we include this in ikiwiki's rst if it is not too hairy?
 
 --ulrik
+
+
+----
+
+> The main problem with more sophisticated RST support is that ikiwiki turns 
+preprocessor directives into raw HTML and reST hates inline HTML.
+
+Is it possible for ikiwiki to store preprocessor directives in memory, and replace them with place holders, then do the rst process.  After the rst processing, process the preprocessor directives and replace place holders.  --[[weakish]]
index 691f20ffe782f010823455a2eba0ce0b739e679e..cbef5394ea9edd74bd958ebe751b357a6a8222d7 100644 (file)
@@ -1,10 +1,10 @@
 This is the [[SandBox]], a page anyone can edit to try out ikiwiki (version [[!version  ]]).
 
-> This is a blockerquote.
+> This is a blockquote.
 >
 > This is the first level of quoting.
 >
-> > This is nested blockquote.
+> > This is nested blockquote.
 >
 >> Without a space works too.
 >>> to three levels
index 8dd3b1c151905d0c2f8fdae03c0b8bda8c38bf55..66d962bd640d3e2991c11eedb789c3e040d62da4 100644 (file)
@@ -449,6 +449,10 @@ li.L8 { list-style: upper-alpha; }
        background: #ff9900;
 }
 
+.FlattrButton {
+       display: none;
+}
+
 /* openid selector */
 #openid_choice {
        display: none;
index af8e4005da57f0749161f17d51fb45db2e4a3ba2..1ea82b8626a3eb5991e36b4a5d825dafd9886c4b 100644 (file)
@@ -15,3 +15,88 @@ I include a modified version of this script. This version includes the ability t
 -- [[users/simonraven]]
 
 [[ikiwiki-wordpress-import]]
+
+-----
+
+Perhaps slightly insane, but here's an XSLT style sheet that handles my pages.  It's basic, but sufficient to get started.
+Note that I had to break up the ikiwiki meta strings to post this.
+
+-- JasonRiedy
+
+       <?xml version="1.0" encoding="UTF-8"?>
+       <xsl:stylesheet version="2.0"
+         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+         xmlns:content="http://purl.org/rss/1.0/modules/content/"
+         xmlns:wp="http://wordpress.org/export/1.0/">
+         
+       <xsl:output method="text"/>
+       <xsl:output method="text" name="txt"/>
+       
+       <xsl:variable name='newline'><xsl:text>
+       </xsl:text></xsl:variable>
+       
+       <xsl:template match="channel">
+         <xsl:apply-templates select="item[wp:post_type = 'post']"/>
+       </xsl:template>
+       
+       <xsl:template match="item">
+         <xsl:variable name="idnum" select="format-number(wp:post_id,'0000')" />
+         <xsl:variable name="basename"
+                       select="concat('wp-posts/post-',$idnum)" />
+         <xsl:variable name="filename"
+                       select="concat($basename, '.html')" />
+         <xsl:text>Creating </xsl:text>
+         <xsl:value-of select="concat($filename, $newline)" />
+         <xsl:result-document href="{$filename}" format="txt">
+           <xsl:text>[[</xsl:text><xsl:text>meta title="</xsl:text>
+           <xsl:value-of select="replace(title, '&quot;', '&amp;ldquo;')"/>
+           <xsl:text>"]]</xsl:text><xsl:value-of select="$newline"/>
+           <xsl:text>[[</xsl:text><xsl:text>meta date="</xsl:text>
+           <xsl:value-of select="pubDate"/>
+           <xsl:text>"]]</xsl:text><xsl:value-of select="$newline"/>
+           <xsl:text>[[</xsl:text><xsl:text>meta updated="</xsl:text>
+           <xsl:value-of select="pubDate"/>
+           <xsl:text>"]]</xsl:text> <xsl:value-of select="$newline"/>
+           <xsl:value-of select="$newline"/>
+           <xsl:value-of select="content:encoded"/>
+           <xsl:text>
+       
+       </xsl:text>
+           <xsl:apply-templates select="category[@domain='tag' and not(@nicename)]">
+             <xsl:sort select="name()"/>
+           </xsl:apply-templates>
+         </xsl:result-document>
+         <xsl:apply-templates select="wp:comment">
+           <xsl:sort select="date"/>
+           <xsl:with-param name="basename">$basename</xsl:with-param>
+         </xsl:apply-templates>
+       </xsl:template>
+       
+       <xsl:template match="wp:comment">
+         <xsl:param name="basename"/>
+         <xsl:variable name="cnum" select="format-number(wp:comment_id, '000')" />
+         <xsl:variable name="filename" select="concat($basename, '/comment_', $cnum, '._comment')"/>
+         <xsl:variable name="nickname" select="concat(' nickname=&quot;', wp:comment_author, '&quot;')" />
+         <xsl:variable name="username" select="concat(' username=&quot;', wp:comment_author_url, '&quot;')" />
+         <xsl:variable name="ip" select="concat(' ip=&quot;', wp:comment_author_IP, '&quot;')" />
+         <xsl:variable name="date" select="concat(' date=&quot;', wp:comment_date_gmt, '&quot;')" />
+         <xsl:result-document href="{$filename}" format="txt">
+           <xsl:text>[[</xsl:text><xsl:text>comment format=html</xsl:text><xsl:value-of select="$newline"/>
+           <xsl:value-of select="$nickname"/>
+           <xsl:value-of select="$username"/>
+           <xsl:value-of select="$ip"/>
+           <xsl:value-of select="$date"/>
+           <xsl:text>subject=""</xsl:text><xsl:value-of select="$newline"/>
+           <xsl:text>content="""</xsl:text><xsl:value-of select="$newline"/>
+           <xsl:value-of select="wp:comment_content"/>
+           <xsl:value-of select="$newline"/>
+           <xsl:text>"""]]</xsl:text><xsl:value-of select="$newline"/>
+         </xsl:result-document>
+       </xsl:template>
+       
+       <xsl:template match="category">
+         <xsl:text>[</xsl:text><xsl:text>[</xsl:text><xsl:text>!tag "</xsl:text><xsl:value-of select="."/><xsl:text>"]]</xsl:text>
+         <xsl:value-of select="$newline"/>
+       </xsl:template>
+       
+       </xsl:stylesheet>
diff --git a/doc/todo/Add_nicer_math_formatting.mdwn b/doc/todo/Add_nicer_math_formatting.mdwn
new file mode 100644 (file)
index 0000000..041eaee
--- /dev/null
@@ -0,0 +1,5 @@
+It would be nice to add nicer math formatting.  I currently use the [[plugins/teximg]] plugin, but I wonder if [jsMath](http://www.math.union.edu/~dpvc/jsMath/) wouldn't be a better option.
+
+[[Will]]
+
+[[!tag wishlist]]
index f0599e4ed94fdf8695272753d5f3708814b8cf21..91f924fa126fd25f296de803d8830d4627d4ddb4 100644 (file)
@@ -58,3 +58,8 @@ The hash is calculated from the user's email address. If the user's email
 is not known, skip it. 
 
 End. :P
+
+---
+
+[libravatar](https://launchpad.net/libravatar) is a federated avatar
+system. Young but might be the right way to get avatars eventually.
diff --git a/doc/todo/generic_insert_links b/doc/todo/generic_insert_links
new file mode 100644 (file)
index 0000000..050f32e
--- /dev/null
@@ -0,0 +1,24 @@
+The attachment plugin's Insert Links button currently only knows
+how to insert plain wikilinks and img directives (for images).
+
+[[wishlist]]: Generalize this, so a plugin can cause arbitrary text
+to be inserted for a particular file. --[[Joey]] 
+
+Design:
+
+Add an insertlinks hook. Each plugin using the hook would be called,
+and passed the filename of the attachment. If it knows how to handle
+the file type, it returns a the text that should be inserted on the page.
+If not, it returns undef, and the next plugin is tried.
+
+This would mean writing plugins in order to handle links for 
+special kinds of attachments. To avoid that for simple stuff,
+a fallback plugin could run last and look for a template
+named like `templates/embed_$extension`, and insert a directive like:
+
+       \[[!template id=embed_vp8 file=my_movie.vp8]]
+
+Then to handle a new file type, a user could just make a template
+that expands to some relevant html. In the example above,
+`templates/embed_vp8` could make a html5 video tag, possibly with some
+flash fallback code even.
index 65b7cd96a80759425c77839e307c8b219e0af817..5f17e3ae036b61d5ff7c2572b6721c552ace1d99 100644 (file)
@@ -26,4 +26,6 @@ which seems to do the right thing in page.tmpl, but not for change.tmpl. Where i
 
 > The use of an absolute baseurl in change.tmpl is a special case. --[[Joey]]
 
+So I'm facing this same issue. I have a wiki which needs to be accessed on three different URLs(!) and the hard coding of the URL from the setup file is becoming a problem for me. Is there anything I can do here? --[[Perry]]
+
 [[wishlist]]
diff --git a/doc/users/Perry.mdwn b/doc/users/Perry.mdwn
new file mode 100644 (file)
index 0000000..d10b862
--- /dev/null
@@ -0,0 +1 @@
+Just another IkiWiki user.