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