Skip to content

Transform GitHub alert blocks into Docusaurus admonitions #570

Open

Description

GitHub released a new "Alerts" syntax in GitHub-flavoured Markdown (GFM) for highlighting blocks in late 2022:

Note

This is an important note!

https://github.com/orgs/community/discussions/16925

These are a non-standard Markdown extension, and not natively supported by Docusaurus (ref facebook/docusaurus#7471). However, Docusaurus has its own admonition syntax that serves approximately the same purpose:

:::note

This is an important note!

:::

One of our goals with Electron's documentation is to make the code readable in both GitHub.com and Docusaurus contexts. Ideally, we'd be able to transform the GitHub Alert syntax into Docusaurus admonitions to improve this interop.

There seems to be an open-source Remark plugin that we could try out to this end: https://github.com/incentro-dc/remark-github-admonitions-to-directives

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions