pub-pkg-prism

2.0.5 • Public • Published

---- / ---- name: README

pub-pkg-prism

pub-server plugin for syntax highlighting with prism.js v1.26.

Runs inside pub-generator during markdown processing -- no client-side javascript required.

Includes language support for markup, css, clike, javascript, c, csharp, cpp, fsharp, go, go-module, handlebars, java, makefile, markdown, markup-templating, perl, php, python, jsx, tsx, ruby, rust, sql, swift, typescript, typoscript, wasm.

A website with some examples can be found at https://jldec.github.io/pub-pkg-prism

installation

This package is included with pub-server.

To enable it, add pub-pkg-prism to your pub-config pkgs.

Markdown code blocks will be automatically highlighted by pub-generator using marked, synchronously calling prism.hightlight().

CSS

This package will inject /css/prism.css into your main template provided it includes {{{injectCss}}}.

credits

Based on prism.js by Lea Verou - https://github.com/LeaVerou

/pub-pkg-prism/

    Package Sidebar

    Install

    npm i pub-pkg-prism

    Weekly Downloads

    15

    Version

    2.0.5

    License

    MIT

    Unpacked Size

    76.8 kB

    Total Files

    8

    Last publish

    Collaborators

    • jldec