Poetry breaks most blog layouts. Lines wrap in the wrong places, italics fight with emphasis, and the author's name floats away from the verse. Attegi's poem card fixes that, and you write it with nothing more than an ordinary quote.

Your first poem card

  1. On an empty line, type > and a space. You are now in a quote.
  2. Type [!poem] followed by the title.
  3. Press Shift + Enter to start each new line.
  4. On the last line, type an em dash and the author: — Robert Frost.

In the editor it looks like this:

> [!poem] The Road Not Taken
> Two roads diverged in a yellow wood,
> And sorry I could not travel both
> And be one traveler, long I stood
> And looked down one as far as I could
> To where it bent in the undergrowth;
>
> — Robert Frost

And on your site, like this:

[!poem] The Road Not Taken
Two roads diverged in a yellow wood,
And sorry I could not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;

— Robert Frost

Options

Add these after the title, on the same line:

Option Chinese alias Effect
[center] [居中] Centers the lines and the author
[plain] [非斜体] Upright text instead of italics

You can combine them. Short forms such as quatrains usually look best centered:

[!poem] Spring Dawn [center] [plain]
Spring sleep, unaware of dawn,
Everywhere I hear singing birds.
Last night, the sound of wind and rain;
How many petals have fallen?

— Meng Haoran

The title is optional. Write [!poem] on its own and the card starts straight with the verse:

[!poem] [center]
I wandered lonely as a cloud
That floats on high o'er vales and hills,
When all at once I saw a crowd,
A host, of golden daffodils;

— William Wordsworth

The rules, in full

  • The quote must start with [!poem]. A quote that mentions it later stays an ordinary quote.
  • Options are lowercase: [center] works, [Center] does not.
  • The last line becomes the author credit if it starts with —, --, or - and is no longer than 40 characters. -- is turned into a proper em dash for you.
  • Blank lines are skipped. Leave one before the author in the editor if it helps you read; it will not show on the page.
  • One card holds one stanza. For a longer poem, use one card per stanza or quote an excerpt.
💡
Readers with JavaScript turned off, and RSS readers, see the poem as a normal quote. Nothing is lost; it just looks plainer.

Building a card by hand

If you need full control, write the markup in an HTML card. The classes are the same ones Attegi generates:

<figure class="kg-poem-card kg-poem-centered">
  <div class="kg-poem-header">
    <p class="kg-poem-title">Title</p>
  </div>
  <div class="kg-poem-divider"></div>
  <blockquote class="kg-poem-content">
    <p class="kg-poem-line">First line</p>
    <p class="kg-poem-line">Second line</p>
  </blockquote>
  <figcaption class="kg-poem-author">— Author</figcaption>
</figure>

Leave out the header and divider for an untitled poem, and add kg-poem-plain next to kg-poem-centered for upright text.

Why it works this way

The card is built from a plain quote so that your writing never depends on the theme. If you switch themes one day, every poem is still there as a readable quote. Attegi only adds the presentation: a width that fits the poem, a hairline divider under the title, and colors that follow light and dark mode.

For a longer example with prose around it, read Pride and Prejudice. For poems in Chinese, see 在 Attegi 里写中文.