Skip to main

Typography Filters

src/filters/type.js

typesetting

md()

Block markdown with typesetting

Params:

  • content {string}

mdInline()

Inline markdown with typesetting

Params:

  • content {string}

elide()

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

Params:

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

RSS

headings

h()

Generate a heading at any given level

Params:

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

callouts

callout()

Add callout boxes for highlighted content, e.g. {% callout type, label %}content{% endcallout %}

Params:

  • content {markdown string}
  • type {string} = note

    The primary expected values are ‘note’ or ‘warn’, though we currently only have styling for ‘note’ callouts.

  • label {string | boolean} = true

    true label will default to ‘Note’ when the type is ‘note’, ‘Warning’ when the type is ‘warn’, and otherwise the type as given.

See Also