• Hi y’all,

    Thanks for the great plugin. I need to support YAML on some blog posts. Any chance you’d be interested in rolling a new version that includes support for that?

    Alternatively, perhaps the plugin could get the prismjs from a CDN source, allowing site owners to pick and choose their supported languages as a plugin setting?

    Thanks again,
    Jonathan

Viewing 1 replies (of 1 total)
  • Plugin Author Willy Bahuaud

    (@willybahuaud)

    Hello,

    If you need to support YAML, you can use a custom build of prismjs. You can register your custom build following these steps:

    add_action( 'wp_enqueue_scripts', 'custom_enqueue_script', 11 );
    function custom_enqueue_script() {
    	wp_deregister_script( 'prismjs' );
    	wp_register_script( 'prismjs', get_stylesheet_directory_uri() . '/my-prismjs.css', false, true );
    }
    
    add_filter( 'pastacode_langs', 'pastacode_new_languages' );
    function pastacode_new_languages( $languages ) {
    	$languages['yaml'] = 'YAML';
    	return $languages;
    }

    Unfortunatly, all the plugins on the official WordPress Repository are not allowed to use external ressources (for security reason), so we can’t use CDN :-/

    Have a nice day!

Viewing 1 replies (of 1 total)
  • The topic ‘YAML Support’ is closed to new replies.