Skip to content

admonition directive #3

Closed
@Mpdreamz

Description

@Mpdreamz

Admonitions

Callouts, or “admonitions”, highlight a particular block of text that exists slightly apart from the narrative of your page, such as a note or a warning.

Kind Link
Reference https://mystmd.org/guide/directives#directive-admonition
Documentation https://mystmd.org/guide/admonitions

Implementation

  • Parses directives and aliases
  • Emits HTML
  • Unit tests
  • Validation (emits, warnings and errors).

Specification compliance:

  • Arguments is parsed
  • Body is parsed
  • Options:
    • label, name (string) - Label the admonition to be cross-referenced or explicitly linked to.
    • enumerated, numbered (boolean) - Turn on/off the numbering for the specific admonition
    • enumerator, number (string) - Explicitly set the admonition number
    • class (string) - CSS classes to add to your admonition. Special classes include:
      • dropdown - turns the admonition into a <details> html element
      • simple - an admonition with “simple” styles
      • the name of an admonition (if no directive alias is used)
    • icon (boolean) - Setting icon to false will hide the icon.
    • open (boolean) - Turn the admonition into a dropdown, and set the open state.
  • Aliases:
    • attention
    • caution
    • danger
    • error
    • important
    • hint
    • note
    • seealso
    • tip
    • warning
    • .callout-note
    • .callout-warning
    • .callout-important
    • .callout-tip
    • .callout-caution

Metadata

Metadata

Assignees

No one assigned

    Labels

    authoringRelates to our markdown parser

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions