No way to install markdown-it plugins?


(Wolftune) #1

Continuing the discussion from Markdown-it is very powerful with its pulgin, how to achieve these on discourse:

I see per that older topic that markdown-it features outside of commonmark “will not be included”, but there’s no way to add them via the separate markdown-it plugins?

They really would be useful. It’s almost tragic (especially for the goal of commonmark adoption) that commonmark doesn’t include any support for footnotes (I know that Discourse “more details” is a workaround, but it’s not the same).

Am I understanding right that the way markdown-it is incorporated into Discourse, the plugins would have to be added at some higher level and so aren’t available to people just running an instance of Discourse?


(Daniela) #2

I’m not following you.
A Discourse plugin that incorporates markdown-it does not exist, of course you can not install plugins written for other platforms.
If you really need the markdown-it extra-features (which as Jeff said is not the standard markdown we use on Discourse) you should write a plugin, or open a topic on #marketplace to find a dev to pay that write it for you.

I can not understand what you mean. Any official and unofficial plugin, if open to the public of course, can be installed (at your own risk) on Discourse if your instance is self-hosted.

The “plugin” you linked is not a plugin, it’s a search with 0 results for me…
If you search for “discourse” you can find something, but nothing related to markdown-it.
I do not know if there is anything available only for enterprise level, in this case take a screenshot to let us see.


(Wolftune) #3

I’m trying to understand. There are plugins for markdown-it that expand its features. If Discourse used Markdown-it as a full dependency, it would be reasonable to wonder whether adding features to that dependency would bring them to Discourse.

But it seems that however Discourse uses markdown-it, it’s in some more limited way that cannot take plugins to expand the feature set.

Strange that the search link that worked before is broken now. Here’s an example direct link: markdown-it footnote plugin. That has instructions for adding footnote capacity to markdown-it, and the hope was that if Discourse uses markdown-it (which was my understanding), then it would inherit whatever capacity the local instance of markdown-it had to offer. But it seems that hope is not going to work out.


(Sam Saffron) #4

Your assessment here is very off

Markdown it extensions can be repackaged as discourse plugins just fine, I plan to do footnotes next week and write a howto


(Wolftune) #5

Oh okay, great! I assumed that sort of thing was easy enough, but I didn’t know if it would take some repackaging work or just some install instructions.

FWIW, the ones I’m most interested in are Footnotes and Anchors. Secondarily, task-lists and container seem quite useful (just stated as votes to consider for anyone who gets around to repackaging, and I’d like to help but not sure I can at this time).

Cheers!


(Felix Freiberger) #6

For that one, you’ll want this plugin instead:

It not only exists already, but also makes checkboxes interactive: Clicking immediately edits the post :slight_smile:


(Sam Saffron) #7

This is now documented at: Repackaging a markdown.it extension as a Discourse plugin


(Erlend Sogge Heggen) #8