-
Notifications
You must be signed in to change notification settings - Fork 867
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
Optionally enable Markdig extensions that are not included by default in DocFX #7833
Conversation
Thank you for the enhancement! The tests and parameter passing flow looks good, I wonder if it is possible to use the configuration vocabularies provided by markdig, this way we don't have to invent our own configuration options and would pickup latest markdig extensions without code change, something like: {
"build": {
"markdownEngineName": "markdig",
"markdownEngineProperties": {
"markdigExtensions": [
"common",
"pipetables"
]
}
}
} We'll also need a special extension name to represent the current docfx setup as the default like |
@yufeih Ah that's a much better solution! I wish I had spotted that earlier. Could you please clarify what you mean by this:
Is the expectation here that users should always include "dfm" in the list of extensions, and if it's not included then we shouldn't call Somewhat outside the scope of this change, it may also be worth considering adding a "disabledMarkdigExtensions" property to allow users to opt-out of certain extensions. That would allow new extensions to be enabled by default in the future while maintaining backward compatibility with existing documentation. I don't think it's strictly necessary for this first iteration though. |
Updated the implementation to use a list of extensions as per @yufeih's suggestion. It may make sense to add a "disabledMarkdigExtensions" later, but that might be tricky to do. The best way I could think to do that is to make a separate |
How about
|
There doesn't seem to be a strong desire to remove a markdown extension, most of the time you can just avoid using the syntax. So the design implemented in this PR looks good. |
Taking a first crack at #3387
This change will allow users to optionally enable various Markdig extensions that are disabled by default in DocFX. The following extensions are included in this change (more can be added later):
To enable them, simply include them as a property in your
markdownEngineProperties
(make sure Markdig is set as yourmarkdownEngine
):