Skip to main

Typography Filters

src/filters/type.js


typesetting

typogr()

Params:

  • content {string}
  • inline {boolean}

    Inline typesetting removes the “widont” filter if the text has fewer than 5 words

Links:

md()

Block markdown with typesetting

Params:

  • content {string}

mdInline()

Inline markdown with inline typesetting

Params:

  • content {string}

elide()

Elide HTML at a given word count, and append if elided.

Params:

  • html {string}
  • count {Number} = 50

headings

h()

Generate a heading at any given level

Params:

  • content {string}
  • level {Number (1-6)}
  • attrs {object}

See Also: