Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform GitHub alert blocks into Docusaurus admonitions #570

Closed
erickzhao opened this issue Jun 4, 2024 · 1 comment · Fixed by #655
Closed

Transform GitHub alert blocks into Docusaurus admonitions #570

erickzhao opened this issue Jun 4, 2024 · 1 comment · Fixed by #655
Labels
area:markdown help wanted Extra attention is needed ✨ enhancement New feature or request

Comments

@erickzhao
Copy link
Member

erickzhao commented Jun 4, 2024

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

@AmrMustafa282
Copy link
Contributor

Hi @erickzhao ,
i fixed this issue, you can see my pull request #655
i hope i did the best solution as it needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:markdown help wanted Extra attention is needed ✨ enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants