1 [[!meta author="spalax"]]
2 [[!template id=plugin name=poetry author="[[Louis|spalax]]"]]
6 The poetry plugin provides the [[ikiwiki/directive/poetry]] directive, used to
7 render poetry (or songs).
13 In regular text, there are two different meaning of a new line: a break between
14 two paragraphs, and the line wrap.
16 When rendering poetry, we need a third one: the carriage return between two
17 verse lines. This one should be different from the line wrap carriage return,
18 otherwise one will not be able to tell apart these two: is a word displayed at
19 the begenning of its line a new verse line, or the previous verse line,
20 continuing on a new line because it is too long?
22 Generally, wrapped text is indented, whereas verse lines are not.
26 One could use carriage return (two white spaces at the end of a line) between
27 verse lines, and paragraph break between stanzas, but:
29 * adding white spaces at the end of lines is painful;
30 * there is no easy way to render chorus (in a different way from verses).
34 The directive takes only one argument `content`, containing the poetry to
35 render. Carriage returns are respected.
37 Chorus are lines with `> ` as a starting character.
39 Lines starting with `) ` are consored/outdated/crossed out verses.
41 [[!toggle id=example text="View example"]]
42 [[!toggleable id=example text='''
43 \[[!poetry content="""
47 > And here is the chorus
56 ) Because I did not like it
63 This plugin is useless without some corresponding CSS. An example is given
66 [[!toggle id=css text="CSS"]]
67 [[!toggleable id=css text="""
70 border-left: 0.1em solid lightgray;
81 text-decoration: line-through;
84 .poetry .paren:hover {
85 text-decoration: initial;
91 border-left: 0.3em solid slategray;
102 This plugin is used to render songs on [this choir's
103 website](http://barricades.int.eu.org/repertoire/bread_and_roses/).
107 Code and documentation can be found here : [[https://atelier.gresille.org/projects/gresille-ikiwiki/wiki/Poetry]].