diff options
-rw-r--r-- | doc/bugs/HTML_inlined_into_Atom_not_necessarily_well-formed.mdwn | 33 | ||||
-rw-r--r-- | doc/bugs/rss_feeds_do_not_use_recommended_encoding_of_entities_for_some_fields.mdwn (renamed from doc/bugs/HTML-escaped_titles_in_Atom__44___RSS_feeds_don__39__t_validate.mdwn) | 0 | ||||
-rw-r--r-- | doc/plugins/creole.mdwn | 2 | ||||
-rw-r--r-- | doc/plugins/creole/discussion.mdwn | 7 | ||||
-rw-r--r-- | doc/plugins/write.mdwn | 44 | ||||
-rw-r--r-- | doc/sandbox/Teximg.mdwn | 2 | ||||
-rw-r--r-- | doc/sandbox/Try_some_math_formulas.mdwn | 7 | ||||
-rw-r--r-- | doc/todo/color_plugin.mdwn | 9 | ||||
-rw-r--r-- | doc/todo/mbox.mdwn | 14 | ||||
-rw-r--r-- | doc/todo/search_terms.mdwn | 2 |
10 files changed, 91 insertions, 29 deletions
diff --git a/doc/bugs/HTML_inlined_into_Atom_not_necessarily_well-formed.mdwn b/doc/bugs/HTML_inlined_into_Atom_not_necessarily_well-formed.mdwn new file mode 100644 index 000000000..6c5c79672 --- /dev/null +++ b/doc/bugs/HTML_inlined_into_Atom_not_necessarily_well-formed.mdwn @@ -0,0 +1,33 @@ +If a blog entry contains a HTML named entity, such as the `—` produced by [[plugins/rst]] for blockquote citations, it's pasted into the Atom feed as-is. However, Atom feeds don't have a DTD, so named entities beyond `<`, `>`, `"`, `&` and `'` aren't well-formed XML. + +Possible solutions: + +* Put HTML in Atom feeds as type="html" (and use ESCAPE=HTML) instead + +> Are there any particular downsides to doing that ..? --[[Joey]] + +>> It's the usual XHTML/HTML distinction. type="html" will always be interpreted as "tag soup", I believe - this may lead to it being rendered differently in some browsers. In general ikiwiki seems to claim to produce XHTML (at least, the default page.tmpl makes it claim to be XHTML Strict). On the other hand, this is a much simpler solution... see escape-feed-html branch in my repository, which I'm now using instead --[[smcv]] + +>>> Of course, browsers [probably don't treat xhtml pages as xhtml anyway](http://hixie.ch/advocacy/xhtml). +>>> And the same content will be treated as html (probably as tag soup) if it's +>>> in a rss feed. + +* Keep HTML in Atom feeds as type="xhtml", but replace named entities with numeric ones, + like in the re-escape-entities branch in my repository ([diff here](http://git.debian.org/?p=users/smcv/ikiwiki.git;a=commitdiff;h=c0eb041c65d0653bacf0d4acb7a602e9bda8888e)) + +>> I can see why you think this is excessively complex! --[[smcv]] + +(Also, the HTML in RSS feeds would probably get better interoperability if it was escaped with ESCAPE=HTML rather than being in a CDATA section?) + +> Can't see why? --[[Joey]] + +>> For a start, `]]>` in content wouldn't break the feed :-) but I was really thinking of non-XML, non-SGML parsers (more tag soup) that don't understand CDATA (I've suffered from CDATA damage when feeding generated code through gtkdoc, for instance). --[[smcv]] + +>>> FWIW, the htmlscrubber escapes the `]]>`. (Wouldn't hurt to make that +>>> more robust tho.) +>>> +>>> ikiwiki has used CDATA from the beginning -- this is the first time +>>> I've heard about rss 2.0 parsers that didn't know about CDATA. +>>> +>>> (IIRC, I used CDATA because the result is more space-efficient and less +>>> craptacular to read manually.) diff --git a/doc/bugs/HTML-escaped_titles_in_Atom__44___RSS_feeds_don__39__t_validate.mdwn b/doc/bugs/rss_feeds_do_not_use_recommended_encoding_of_entities_for_some_fields.mdwn index 48c168997..48c168997 100644 --- a/doc/bugs/HTML-escaped_titles_in_Atom__44___RSS_feeds_don__39__t_validate.mdwn +++ b/doc/bugs/rss_feeds_do_not_use_recommended_encoding_of_entities_for_some_fields.mdwn diff --git a/doc/plugins/creole.mdwn b/doc/plugins/creole.mdwn index b6861ab26..ed347e2c5 100644 --- a/doc/plugins/creole.mdwn +++ b/doc/plugins/creole.mdwn @@ -12,5 +12,5 @@ wiki markup formats, so should be fairly easy to guess at. There is also a [CheatSheet](http://www.wikicreole.org/wiki/CheatSheet). Links are standard [[WikiLinks|ikiwiki/WikiLink]]. Links and -[[PreProcessorDirectives]] inside `{{{ }}}` blocks are still expanded, +[[ikiwiki/PreProcessorDirectives]] inside `{{{ }}}` blocks are still expanded, since this happens before the creole format is processed. diff --git a/doc/plugins/creole/discussion.mdwn b/doc/plugins/creole/discussion.mdwn new file mode 100644 index 000000000..a31f9cf83 --- /dev/null +++ b/doc/plugins/creole/discussion.mdwn @@ -0,0 +1,7 @@ +I've installed Text::WikiCreole 0.05 and enabled the plugin, but I get an error when rebuilding the wiki: `Undefined subroutine &IkiWiki::Plugin::creole::creole_custombarelinks called at /usr/pkg-20080723/lib/perl5/vendor_perl/5.8.0/IkiWiki/Plugin/creole.pm line 23`. Is there a newer Text::WikiCreole I'm not finding online? +-- [[schmonz]] + +> There's a patch in the debian package of libtext-wikicreole-perl that +> adds that option. I'm not sure what the status of it being released +> upstream is, though IIRC I was assured it would not be a problem. +> --[[Joey]] diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 7c28088de..58c04d97a 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -128,26 +128,34 @@ of a plugin. hook(type => "preprocess", id => "foo", call => \&preprocess); -Replace "foo" with the command name that will be used inside brackets for -the preprocessor directive. - -Each time the directive is processed, the referenced function (`preprocess` -in the example above) is called, and is passed named parameters. A "page" -parameter gives the name of the page that embedded the preprocessor -directive, while a "destpage" parameter gives the name of the page the -content is going to (different for inlined pages), and a "preview" -parameter is set to a true value if the page is being previewed. All -parameters included in the directive are included as named parameters as -well. Whatever the function returns goes onto the page in place of the +Replace "foo" with the command name that will be used for the preprocessor directive. -An optional "scan" parameter, if set to a true value, makes the hook be -called during the preliminary scan that ikiwiki makes of updated pages, -before begining to render pages. This parameter should be set to true if -the hook modifies data in `%links`. Note that doing so will make the hook -be run twice per page build, so avoid doing it for expensive hooks. (As an -optimisation, if your preprocessor hook is called in a void contets, you -can assume it's being run in scan mode.) +Each time the directive is processed, the referenced function (`preprocess` +in the example above) is called. Whatever the function returns goes onto +the page in place of the directive. Or, if the function aborts using +`error()`, the directive will be replaced with the error message. + +The function is passed named parameters. First come the parameters set +in the preprocessor directive. These are passed in the same order as +they're in the directive, and if the preprocessor directive contains a bare +parameter (example: `\[[!foo param]]`), that parameter will be passed with +an empty value. + +After the parameters from the preprocessor directive some additional ones +are passed: A "page" parameter gives the name of the page that embedded the +preprocessor directive, while a "destpage" parameter gives the name of the +page the content is going to (different for inlined pages), and a "preview" +parameter is set to a true value if the page is being previewed. + +If `hook` is passed an optional "scan" parameter, set to a true value, this +makes the hook be called during the preliminary scan that ikiwiki makes of +updated pages, before begining to render pages. This should be done if the +hook modifies data in `%links`. Note that doing so will make the hook be +run twice per page build, so avoid doing it for expensive hooks. (As an +optimisation, if your preprocessor hook is called in a void context, you +can assume it's being run in scan mode, and avoid doing expensive things at +that point.) Note that if the [[htmlscrubber]] is enabled, html in [[ikiwiki/PreProcessorDirective]] output is sanitised, which may limit what diff --git a/doc/sandbox/Teximg.mdwn b/doc/sandbox/Teximg.mdwn new file mode 100644 index 000000000..8483c1489 --- /dev/null +++ b/doc/sandbox/Teximg.mdwn @@ -0,0 +1,2 @@ +[[!teximg code="E = - \frac{Z^2 \cdot \mu \cdot e^4}{32\pi^2 \epsilon_0^2 \hbar^2 n^2}" ]] + diff --git a/doc/sandbox/Try_some_math_formulas.mdwn b/doc/sandbox/Try_some_math_formulas.mdwn new file mode 100644 index 000000000..31eb10813 --- /dev/null +++ b/doc/sandbox/Try_some_math_formulas.mdwn @@ -0,0 +1,7 @@ +# Title with $\TeX$ + +* How about some math? +* $\frac{1}{2} = \frac{3}{6}$ + + + diff --git a/doc/todo/color_plugin.mdwn b/doc/todo/color_plugin.mdwn index 1e1fb174e..68370158c 100644 --- a/doc/todo/color_plugin.mdwn +++ b/doc/todo/color_plugin.mdwn @@ -58,6 +58,11 @@ comments are very welcome. --[[Paweł|ptecza]] >> Similar hardcoded method I've found in `img` plugin :) But only one >> argument is not named there (image path). +>>> I think I hadn't realized what you were doing there. The order +>>> for unnamed parameters can in fact be relied on. +>>> +>>> --[[Joey]] + >> Maybe I shouldn't use so simple plugin syntax? For following syntax >> I wouldn't have that problem: @@ -96,6 +101,8 @@ seems to be too enigmatic and it was hard to me to handle unnamed parameters in not hardcoded way. I hope that my changes are acceptable for you. Of course, I'm open for discussion or exchange of ideas :) --[[Paweł|ptecza]] +> One question, why the 2px padding for span.color? --[[Joey]] + --- /dev/null 2008-06-21 02:02:15.000000000 +0200 +++ color.pm 2008-07-27 14:58:12.000000000 +0200 @@ -0,0 +1,69 @@ @@ -146,7 +153,7 @@ Of course, I'm open for discussion or exchange of ideas :) --[[Paweł|ptecza]] + $content =~ s!<span class="color">((color: ([a-z]+|\#[0-9a-f]{3,6})?)?((; )?(background-color: ([a-z]+|\#[0-9a-f]{3,6})?)?)?)</span>!<span class="color" style="$1">!g; + $content =~ s!<span class="colorend">!!g; + - + return $content; + + return $content; +} #}}} + +sub preprocess(@) { #{{{ diff --git a/doc/todo/mbox.mdwn b/doc/todo/mbox.mdwn index 2df7ed877..dd0e5756b 100644 --- a/doc/todo/mbox.mdwn +++ b/doc/todo/mbox.mdwn @@ -2,11 +2,9 @@ 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]] - ->> I am going to start putting something simple together, but ->> probably not too quickly. ->> So far I don't see a way to have ikiwiki process directories ->> (i.e. maildirs or mh folders) as a single page. This not that ->> big of a deal, but it means that every mailbox will need ->> something like \[[!mailbox type=maildir path=thedir]] in some ->> "normal" (e.g. markdown) page -- [[DavidBremner]] +>> If you like to read code, you can have a gander at the +>> [mailbox](http://pivot.cs.unb.ca/git/?p=ikimailbox.git;a=summary) +>> plugin. At the moment, it reads all of the messages in a maildir and passes them through +>> a template of your choice. Kinda acts like `cat` at the moment because none of the +>> css is defined yet. Next missions are threading (Email::Thread?), and maybe some simple css. +>> To see the (unsurprising) syntax, look at [a trivial example markdown file](http://pivot.cs.unb.ca/git/?p=ikimailbox.git;a=blob;f=test/in/index.mdwn;hb=HEAD) diff --git a/doc/todo/search_terms.mdwn b/doc/todo/search_terms.mdwn index 0e5edb520..cf1708c34 100644 --- a/doc/todo/search_terms.mdwn +++ b/doc/todo/search_terms.mdwn @@ -1,4 +1,4 @@ -The [[plugin/search]] plugin could use xapian terms to allow some special +The [[plugins/search]] plugin could use xapian terms to allow some special searches. For example, "title:foo", or "link:somepage", or "author:foo", or "copyright:GPL". |