Formatting Poetry

Jun 8, 2016

I have been browsing Jekyll themes lately, and found a very nice theme for academics, the Ed. Theme . Its main purpose seems to be publishing classic texts and poetry on the web, and it includes some very handy tools.

Getting indentation right is a problem with poetry on the web. For example, consider these lines from “The Code—Heroics” by Robert Frost.

Here is the Markdown source:

What was there wrong?
Something you said just now.
What did I say?


Even though it contains the proper indentation, it renders like this:

What was there wrong?
Something you said just now.
What did I say?

Now, stripping out extra whitespace is generally a good thing, but I don’t want it to happen with poetry. With help from the CSS in the .Ed theme, I can get the indentation right.

- What was there wrong?
- {:.indent-10}Something you said just now.
- What did I say?