Skip to main

Quote Macros

content/_includes/quotes.macros.njk

Pullquotes, blockquotes, citations, and quote-grids generated from structured data. See the typography samples for more usage examples.

From markdown

pullquote()

Generate markup for a pullquote, by passing in the quote as markdown. Since pull-quotes don’t require citations, there’s little reason to use structured data.

From data

blockquote()

Generate a single quote from structured data. Basic markdown blockquote syntax is preferred for simple markdown quotes. There is no need for a macro when creating one-off quotes in markdown content.

Params:

  • data {object}

    Quote dictionaries include:

    • text: The markdown content of the quote
    • (citation data): See cite macro
  • type {solo | grid} = solo

Example:

{{ quotes.blockquote(press | findData('slug', 'extension')) }}

from()

Display one or all quotes from a page with press data.

Params:

  • collection {array}

    containing 11ty page objects

  • slugs {string | array | none} = none

    Select quotes based on their slug value

  • page {url | none} = none

    Select quotes from a particular page

  • action {string | none} = none

    Add an action to accompany an optional link

  • url {url | none} = none

    Link to a related url

Example:

{{ quotes.find(collections.all, page='/work/timedesigner/') }}
{{ quotes.find(collections.all, 'extension') }}
{{ quotes.find(collections.all, ['extension', 'goals']) }}

grid()

Generate a quote grid from structured data.

Params:

  • data {array}

    Array of quote objects.

Example:

{{ quotes.grid(press) }}

cite()

Generate a citation line from data.

Params:

  • data {object}

    Citation data includes:

    • name: who said it?
    • venue [optional]: article, publication, or company name
    • title [optional]: job title of the person quoted
    • url [optional]: link for context

Meta

signature()

Make Miriam sign something. Huh, this seems like a bad idea, doesn’t it?

See Also