Replies: 277 comments 781 replies
-
Hi, I like the idea but I would like to propose alternative syntax. GitHub Flavored Markdown is a superset of CommonMark and thus ideally it stays close to that if possible. The generic directives proposal for CM is already used in the ecosystem, take for instance This is how it would look:
This would mean:
|
Beta Was this translation helpful? Give feedback.
-
Would be cool if this can share the same syntax as Microsoft Docs "alerts" and Obsidian's "callouts". MS Docs format [1]: > [!NOTE]
> This is a note. Obsidian format [2]: > [!Note] Callout can have an _optional_ title
> Callouts can also be nested:
> > [!Hint]- You can also create foldable callouts with `+` or `-`
> > This is hidden until unfolded. [1]: https://docs.microsoft.com/en-us/contribute/markdown-reference#alerts-note-tip-important-caution-warning |
Beta Was this translation helpful? Give feedback.
-
How about Edit: Also, to add to this, maybe extend this behaviour to other parts such as headers in block quotes? I like to use headers because of their larger font size, but right now are they not included in this. |
Beta Was this translation helpful? Give feedback.
-
Thanks for this! Any way to customize the text? It would be very useful for non-English documents. |
Beta Was this translation helpful? Give feedback.
-
Why use the blockquote element? HTML Standard says:
|
Beta Was this translation helpful? Give feedback.
-
Would love to see more callouts too for different use-cases. These 5 below might be good to start with! I'm not sure if this is only for documentation, but I would use it in general issues and other places supporting markdown. I would especially like to see one that is red in terms of "caution". That might be especially useful with enforcing a code of conduct when you've already provided a warning and would be generally helpful with RFCs(request for comments) about any major signs of caution. |
Beta Was this translation helpful? Give feedback.
-
How about Check for checked information? |
Beta Was this translation helpful? Give feedback.
-
The highlight stops working if it is indented (even if it is correctly identified as a quote). Code: ### Build
1. Generate project
> [!TIP]
> Change build options' values as needed |
Beta Was this translation helpful? Give feedback.
-
More customization is always nice. What if you could specify the Github's Octoicon, color, and text? For example:
to render the alert octicon (https://primer.github.io/octicons/alert-16) with a hex color of #9a6700 and a text of "Warning":
|
Beta Was this translation helpful? Give feedback.
-
Is it me? Or this isn't working inside the
Click me!
But works without the
Note Test Warning Test Important Test Is GitHub cooking something disgusting again? |
Beta Was this translation helpful? Give feedback.
-
Raw (syntax highlighting also has minor issues with "```")## Update
- New types ([!TIP] and [!CAUTION] corresponding to the markdown renderer in Microsoft Learn) :rocket:
> [!TIP]
> This is a tip.
> [!CAUTION]
> This is a caution.
- MathJax expressions are now supported in alerts. :1234:
> [!NOTE]
> $\LaTeX$
- Code blocks nested in alerts can be copied now. :technologist:
> [!NOTE]
> ```
> git status
> ```
- Empty alerts are not allowed now.
> [!NOTE]<br>
- Alerts nested in blockquotes are not rendered now. :grimacing:
> This is a blockquote.
> > [!NOTE]
> > This is a note.
- Alerts nested in lists are not rendered now. :angry:
> [!NOTE]
> This is a note (broken).
- > [!NOTE]
> This is a note (broken).
- No backward compatibility :rage:
> **Note**
> This syntax is deprecated now. Update
Tip This is a tip. Caution This is a caution.
Note
Note
|
Beta Was this translation helpful? Give feedback.
-
Bad design.
Here is a RST example:
|
Beta Was this translation helpful? Give feedback.
-
This syntax might hinder with what user actually wants to write
The user will expect this to be rendered as following because
Also is Others have proposed great alternatives like Microsoft Docs Here is my take on the syntax. Suggestions are welcomed.
|
Beta Was this translation helpful? Give feedback.
-
Seems like... > **Note**
> Text ...is currently rendered on the same line in readme files, instead of two separate lines like it does here in discussion comments: How it's rendered here:
How it's rendered in readme: |
Beta Was this translation helpful? Give feedback.
-
Related to Murderlon on May 21 Check this out I also think for Markdown admonitions, the syntax:
is currently widely used in MDX, and I think it's a bad manner to overload blockquote syntax since it's against the fundamental design of HTML:
I believe the Google search engine also respects this principle. Docusaurus(Facebook Open Source, and used for official FB docs) also adopts MDX with this syntax: |
Beta Was this translation helpful? Give feedback.
-
Why does the rendering work here, but not on my github readme files? It used to work, now all of my readmes are not correctly rendering. |
Beta Was this translation helpful? Give feedback.
-
@dipree What would it take to make these 2 fundamental changes to admonitions?
It will be perfect if you make these 2 changes and admonition will be feature complete without need for any further improvements because users will have freedom to choose any color and title they want. |
Beta Was this translation helpful? Give feedback.
-
Does it work when it is nested?
Output: Note A Text
It appears that nesting is not supported. |
Beta Was this translation helpful? Give feedback.
-
I wanted to say thanks for restoring the feature for now. I understand there are a variety of deficiencies, and I hope they are addressed as time goes by, but perfect is the enemy of good.
:) |
Beta Was this translation helpful? Give feedback.
-
proposalThe "ⓘ Note" displayed by > **[ⓘ Note](https://www.example.com)**
> This is NOT a Note!!
> [!note]
> This is a Note!
Note This is a Note! I do not think this problem is solved by the different color of the vertical bar on the left side. I think you need to select different color than links. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Headings do not work inside these named blockquotes.
|
Beta Was this translation helpful? Give feedback.
-
Important The primary reason I do this is because I want some of these notes to be referenced as a link, If there were another way to accomplish that, I'd care less about "naming" these notes with a heading. Perhaps Edit For stylized blockquotes with a heading, I would like to see the margin between the colored label and the heading be reduced. There is a very large gap. > #[!NOTE]
> ### This is a Heading
>
> This is content And I think that this special case ought to be ignored when there is a hard break. > #[!NOTE]
>
> ### This is a Heading
>
> This is content Edit |
Beta Was this translation helpful? Give feedback.
-
Important Remember to synchronize and update your repository before starting to write code each time. Does it only in the issue page or discussion page? Why not work in my |
Beta Was this translation helpful? Give feedback.
-
mimic test > [!NOTE]
> This is a note.
$\color{#0969da}\sf{Note}$
$\color{#0969da}\ⓘ\sf{Note}$
$\color{#0969da}\bf{\ⓘ}\sf{Note}$
$\color{#0969da}\bf{\ⓘ}\kern{1 ex}\sf{Note}$
$\color{#0969da}{\large\bf{\ⓘ}\kern{1 ex}}\sf{Note}$
- > [!NOTE]
> $\color{#0969da}{\large\bf{\ⓘ}\kern{1 ex}}\sf{Note}$
> $\color{#0969da}{\large\bf{\ⓘ}\kern{1 ex}}\sf{Note}$
> This is a note. Note This is a note.
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
When is it coming to Github Enterprise Server? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@sinsukehlab any way to color the left border color?
|
Beta Was this translation helpful? Give feedback.
-
Alerts are an extension of Markdown used to emphasize critical information. On GitHub, they are displayed with distinctive colors and icons to indicate the importance of the content.
An example of all five types:
Here is how they are displayed:
Note
Highlights information that users should take into account, even when skimming.
Tip
Optional information to help a user be more successful.
Important
Crucial information necessary for users to succeed.
Warning
Critical content demanding immediate user attention due to potential risks.
Caution
Negative potential consequences of an action.
Update - 14 November 2023
[!TIP]
and[!CAUTION]
.**Note**
isn't supported any longer.Update - 12 October 2023
Update - 28 July 2023
Thank you all once again for providing a ton of feedback. Few more changes based on that:
Update - 26 July 2023
Thanks for all the comments, we are working on a handful of fixes. One of them is to support soft line breaks in Markdown documents, so it will work the same in comments versus docs.
Update - 21 July 2023
We've made several improvements in response to your feedback:
div
instead of ablockquote
.IMPORTANT
.[!NOTE]
, has been added, which will gradually replace the old one. However, the old syntax will continue to work for some time.Thanks to all for your valuable input on this topic!
Initial - 10 May 2022
To better highlight and separate certain information from the rest in your documentation on GitHub, we now render a special and accessible note or warning blockquote in Markdown documents. We are using the existing syntax for blockquote and bold text.
This input:
Becomes:
Let us know what you think and how this helps you provide better documentation. Please note that this is a beta feature that might be subject to change.
🐳
Beta Was this translation helpful? Give feedback.
All reactions