Skip to content

Remove legacy admonition keywords #9307

Closed

Description

@slorber

Have you read the Contributing Guidelines on issues?

Motivation

We historically have admonition keyword "aliases" that we don't even document since v2.0.

CleanShot 2023-09-14 at 17 59 26

Those came from an old v2 dependency: https://github.com/elviswolcott/remark-admonitions

In Docusaurus v4 is time to remove them officially and throw an error for sites that still use them.

Note: in Docusaurus v3 we made :::warning the official admonition, and :::caution an alias to remove in v4 (see #7558)

EDIT: maybe we should have some kind of siteConfig.markdown.admonitions config and probably let users define their own set of directive/icon/color/label without requiring swizzling anything?

Self-service

  • I'd be willing to do some initial work on this proposal myself.

Activity

  1. added
    proposal
    on Sep 14, 2023
  2. added this to the 4.0 milestone on Sep 14, 2023
  3. added
    domain: markdown
    on Sep 14, 2023
  4. tats-u commented on Oct 1, 2023

    @tats-u
    Contributor

    FYI AsciiDoc uses both warning and caution.

    https://docs.asciidoctor.org/asciidoc/latest/blocks/admonitions/

    Caution vs. Warning

    When choosing the admonition type, you may find yourself getting confused between "caution" and "warning" as these words are often used interchangeably. Here’s a simple rule to help you differentiate the two:

    • Use CAUTION to advise the reader to act carefully (i.e., exercise care).
    • Use WARNING to inform the reader of danger, harm, or consequences that exist.

    To find a deeper analysis, see www.differencebetween.com/difference-between-caution-and-vs-warning/.

    In the distant future, it would be nice if a remark-compatible AsciiDoc parser would appear and get supported by Docusaurus. (This is just my personal ideal though)

  5. tats-u commented on Oct 5, 2023

    @tats-u
    Contributor

    I have no authority but I believe manuals of many (physical) products use both cautions and warnings.

    ANSI

    From: https://www.muirgraphics.com/2016/08/difference-life-death-choosing-right-safety-signal-words/

    MHI0111-OABLOG-SafetySigns-750x375-1

    From: http://www.overheadlifting.org/understanding-safety-signs-and-overhead-lifting-equipment-hazards/

    I'd like to and I believe we can use both in software manuals depending on severity, too.

    Or do you want us to substitute :::warning Caution for the current :::caution?

  6. slorber commented on Oct 6, 2023

    @slorber
    CollaboratorAuthor

    I guess we could keep it, as long as the color/icon is consistent with what users could expect

    If we look at our legacy admonition aliases, some are really off (success with a lightbulb? important blue? wtf is secondary? 🤔 ) but caution still kinda makes sense

    CleanShot 2023-10-06 at 13 19 40@2x
  7. tats-u commented on Oct 7, 2023

    @tats-u
    Contributor

    If we keep caution, we should adjust the hues of "warning" and "caution" because they share the same icon ⚠; "warning" should be closer to red and "caution" can be closer to yellow.

    success

    If we could keep it, we'll have to change the icon from 💡 to ✔ at least.

    important

    A warm color could be better, but I don't know what color is best (possibly non-warm color). At lease the current aqua seems different from what I want "important" admonition to be,

    secondary

    I don't know how and where I should use it instead of the others.

  8. Josh-Cena commented on Oct 7, 2023

    @Josh-Cena
    Collaborator

    success, important, and secondary are not semantic names—they are leaks of abstraction from the theme color names of the Infima styles. Namely, Infima defines --ifm-color-secondary, --ifm-color-success, etc., which are the colors used by these admonitions.

  9. tats-u commented on Oct 16, 2023

    @tats-u
    Contributor

    https://infima.dev/docs/components/alert
    Infima means this, right? That's why every variable name starts with ifm.

    I guess we have no choice but to follow these classifications...

    • secondary → note
    • success → tip

    For caution, it seems the best to treat it as an alias for warning. I'll recommend readers of our documents to write :::warning caution instead when I have a time.

  10. connorjs commented on Dec 25, 2023

    @connorjs
  11. boevski commented on Jan 29, 2024

    @boevski

    One more vote for keeping both Warning and Caution. Providing config options instead of swizzling sounds like the cherry on top, but even if we have that, Warning and Caution should be part of the default options IMHO.

    In general, Warning is tied to physical danger. Caution is of similar weight, suggesting things could go very wrong, but without any direct risk of physical injury.

    Cisco, for one, uses both in its documentation. VMware, being a pure software company, guides for using Caution exclusively. These are two examples of companies I've worked at.

  12. tats-u commented on Nov 13, 2025

    @tats-u
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain: markdownproposal

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions