[Feature Request] Support alert styles that compatible to `learn.microsoft.com`
Is your feature request related to a problem? Please describe.
Currently docfx supports Alerts by using Bootstrap's alert styles
Recently GFM(GitHub Flavored Markdown) supports same alert syntax.
But its styles are similar to the styles of `learn.microsoft.com'. And supports more background color variations.
Describe the solution you'd like
Add support for GitHub or learn.microsoft.com compatible alert styles.
Additional context These features might be implemented by markdig as custom extensions. (https://github.com/xoofx/markdig/issues/774)
Today NOTE/TIP and IMPORTANT/CAUTION uses the same color and icon, we can make TIP green and give it a lightbulb icon , make important purple and give it a exclamation icon.
Markdig 0.36.0 supports new Alerts markdig extension.
But it seems some features are missing that are supported in docfx.
- It can't add/modify SVG icons styles. Because images are embedded in output HTML.
- Custom Alerts are not supported.
- Label customization/localization features are not supported.
So it can't support new styles with simply extension replacement.
It need to extend existing QuoteSectionNote docfx markdig extensions.
It supports both existing alert styles and GitHub/learn.microsoft.com styles.
and it can switch style by configurations.
"markdownEngineProperties" {
"alertStyle": "docfx" // `docfx`(Default) or `GitHub
}
Markdig
0.36.0supports newAlertsmarkdig extension.But it seems some features are missing that are supported in docfx.
- It can't add/modify SVG icons styles. Because images are embedded in output HTML.
- Custom Alerts are not supported.
- Label customization/localization features are not supported.
So it can't support new styles with simply extension replacement. It need to extend existing
QuoteSectionNotedocfx markdig extensions.It supports both
existing alert stylesand GitHub/learn.microsoft.comstyles. and it can switch style by configurations."markdownEngineProperties" { "alertStyle": "docfx" // `docfx`(Default) or `GitHub }
@filzrev does this code works with the new release of docfx 2.76.0 ?
does this code works with the new release of docfx 2.76.0?
It's not implemented yet. It can enable markdig alerts syntax with following configurations.
"markdownEngineProperties": {
"markdigExtensions": [
"Alerts"
]
},
But currently markdig alerts is not works as expected. Additional tasks are required to display markdig alerts.
- Removing existing
QuoteSectionNoteExtensionwhen markdig alert is enabled. - Add custom CSS styles to support markdig alerts.