Wordpress-seo: Add support for Jetpack's Markdown module

Created on 16 Jun 2016  路  8Comments  路  Source: Yoast/wordpress-seo

soms_heb_je_gewoon_een_post_nodig_om_te_testen_ _yoast_nl
_Result on frontpage with Markdown_

bericht_bewerken_ _yoast_nl_ _wordpress
_Source code in Markdown in the text editor_

bericht_bewerken_ _yoast_nl_ _wordpress
_Resulting analysis_


bericht_bewerken_ _yoast_nl_ _wordpress
_rabbit without Markdown markup (not bold)_

bericht_bewerken_ _yoast_nl_ _wordpress
_Resulting analysis_

compatibility feature request

Most helpful comment

@omarreiss I see the tag for milestone 3.4, and for 3.5. How good are the chances this gets implemented in 3.5? I'm looking forward to the feature. Thank you.

All 8 comments

Doing some initial research.

You can detect whether Jetpack's Markdown module is enabled by checking the jetpack_active_modules option. It'll have an array value markdown if the module is enabled. If it is, markdown is always enabled for posts.

Marked looks like a pretty solid library in terms of performance. It also supports GitHub flavored markdown, which Jetpack supports too.

I don't know how to filter the content of the editor before we send it to the analysis in YoastSEO.js, @jcomack was digging into that for me.

As per @jcomack :

wp-seo-shortcode-plugin.js lines 21 and 57

That combination of registering with Pluggable.js and calling the registerModification function, should do the trick.

Seems like a simple plugin to me:

  • load the Marked library when Markdown is enabled;
  • register the modification;
  • pass the content through Marked and return it;
  • done.

We should include this on our side, as Jetpack has been kind enough to do similar stuff on their end too.

+1

@omarreiss I see the tag for milestone 3.4, and for 3.5. How good are the chances this gets implemented in 3.5? I'm looking forward to the feature. Thank you.

@Zettt I would love to build this, but I simply don't have the resources at the moment, we'll try again for 3.7

Please inform the customer of conversation # 156397 when this conversation has been closed.

Still not working with markdown? ;(

@omarreiss would be great to get this working properly with Markdown 馃憤

Was this page helpful?
0 / 5 - 0 ratings