Closed egberts closed 20 hours ago
Possible duplicate of https://github.com/getpelican/pelican/issues/2984
Switching the Markdown renderer can be done by writing a (Pelican) plugin, and as per #2984, seems to be the preferred solution.
If you don't have markdown
installed, then the built-in renderer doesn't run.
As for the (Python) markdown
package, it pre-dates CommonMark and doesn't consider itself replaced by it, and continues to be maintained.
I believe @MinchinWeb summarized things very nicely. A few follow-up thoughts…
markdown-it-py
).
- I think using terms like "hardcoded" is a bit misleading. As @MinchinWeb said, if the Python-Markdown package is not installed, then that Markdown renderer does not run. So there is no need to explicitly disable it.
Of course, this could be a problem if virtual environment is not being used if markdown package is installed for use by a non-Pelican application and one should desire not to use this particular Markdown package for Pelican.
(That was my scenario, a pesky hassle but not an unsolvable one at that, as I work on expanding table's style/class enhancement of just_table plugin).
- Python-Markdown continues to be an excellent and well-maintained Markdown parser and is not in need of replacement for most people. It has a very rich third-party extension eco-system that as far as I can tell cannot be matched by any alternative Markdown parser (including
markdown-it-py
).
After reviewing the various alternatives to current Pelican's selection of Markdown, I agree that this suggested step should be deferred until one of THOSE "better outputters" get their customization made a lot more accessible (to Pelican, at least).
Sidenote: This means that my zeal to adding a more robust table plugin has become more desired.
Closing this issue.
Feature Request
In light of the latest Markdown coming ahead called Markdown-It, which is now CommonMark-compliant as well as GitHub Markdown as an extension, which supplanted the Markdown (MD1, MD2, MD3, MD4), MetaMarkdown (MMD), and sundown, we should consider the future plan of supporting plugin-scheme for such markdown formats.
I think it would be helpful to start moving current
Markdown
package use by Pelican from an hardcoded approach toward a future-friendly plug-in approach thus making it easier to take on various MD plugins.(Unless I am missing some
pelicanconf.py
setting for disabling this hardcoded Markdown package somehow).