MarkdownMaster CMS Logo

Extra - PrismJS Syntax Highlighter

Provide syntax highlighting for code blocks powered by Prism.JS.

  • PrismJS 1.29.0 - https://prismjs.com
  • License - MIT License

Initialization

To load this plugin, add the following to the extras block in your config.php or theme settings.php:

'extras' => [
    // ...

    'prismjs' => [
        'theme' => 'light|dark|auto',
        'lineNumbers' => true|false,
    ],

    // ...
],

Configuration

  • theme - The theme to use for PrismJS (light, dark, auto)
  • lineNumbers - Enable line numbers for code blocks

Required Schema

N/A

Usage

Render any preformatted code block with the language specified ala Github style.

Example Styles

N/A