]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/infoboxes.mdwn
thoughts
[ikiwiki.git] / doc / todo / infoboxes.mdwn
1 # thoughts on infoboxes
2
3 I was thinking about adding a [[preprocessordirective]] to make it easy to
4 add an info box. Something like:
5
6         \[[infobox "text here"]]
7
8 But it seems it would be better if multi-line text could be put inside,
9 maybe expanding the syntax a bit:
10
11         \[[infobox "
12         text here
13         and here
14         etc.
15         "]]
16
17 This would just wrap the text up in a span element that was styled to float
18 to the right, with a border, the way info boxes do on some wikis.
19
20 However, as I thought about it some more, I realized that this would be
21 just as easy to type:
22
23         <span id=infobox>
24         text here
25         </span>
26
27 Why invent new syntax, after all? I see no reason to for something this
28 simple.
29
30 However, maybe in the more complex case, this would be useful. If the
31 infobox filled in a kind of template:
32
33         \[[infobox type=person name="Joey Hess" email=joey@kitenet.net url="http://kitenet.net/~joey/" description="
34         Joey is the author of ikiwiki and some other stuff. *Yay*!
35         "]]
36
37 That might be a lot more useful. Or here's one to use to describe ikiwiki's
38 own plugins:
39
40         \[[infobox type=plugin name="sidebar" author="Tuomo Valkonen" core=no]]
41
42 This would expand by filling out the template page, which would be
43 infobox/person or infobox/plugin, or whatever, and would have some syntax
44 (possibly HTML::Template, if it's secure) for testing for values and
45 embedding variables. Of course it would register a dependency on its
46 template so changes to the template update all the pages.
47
48 (Since it's a preprocessor directive, the big multiline blocks of text can
49 mix markdown (or whatever) with html, wikilinks, etc, in a natural way,
50 which is nice..)