pub-pkg-prism
v2.0.5
Published
pub-server plugin for v1.26 of prism.js syntax highlighting
Downloads
67
Readme
---- / ---- 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