Skip to content

prism-rails wraps the Prism.js library in a rails engine for simple use with the asset pipeline

License

Notifications You must be signed in to change notification settings

initforthe/prism-rails

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prism-rails 1.5.1

prism-rails wraps the Prism.js library in a rails engine for simple use with the asset pipeline

Prism is a lightweight, robust, elegant syntax highlighting library.

Usage

Add the following to your application's Gemfile and run bundle install:

gem 'prism-rails'

Add the following to your Javascript manifest file application.js:

//= require prism-rails

Add the css for the default styling application.css:

*= require prism

Or use one of the other themes below. See Prism and prism-themes for examples.

  • atom-dark
  • base16-ateliersulphurpool.light
  • cb
  • coy
  • dark
  • duotone-dark
  • duotone-earth
  • duotone-forest
  • duotone-light
  • duotone-sea
  • duotone-space
  • funky
  • ghcolors
  • hopscotch
  • okaidia
  • pojoaque
  • solarizedlight
  • tomorrow
  • twilight
  • xonokai

Plugins

See Prism for more details about the plugins

  • autolinker
  • command-line
  • ie8
  • line-highlight
  • line-numbers
  • previewer-angle
  • previewer-base
  • previewer-color
  • previewer-easing
  • previewer-gradient
  • previewer-time
  • show-invisibles
  • show-language
  • unescaped-markup
  • wpd

Add the following to your Javascript manifest file application.js:

//= require prism-plugin/prism-[plugin-name]

Add the following to your application.scss:

*= require prism-plugin/prism-[plugin-name]

Versioning

prism-rails 1.6.0 == Prism.js 1.6.0 Every attempt is made to mirror the currently shipping Prism.js version number wherever possible. The major, minor, and patch version numbers will always represent the Prism.js version. Should a gem bug be discovered, a 4th version identifier will be added and incremented.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/acharlop/prism-rails.

License

The gem is available as open source under the terms of the MIT License.

About

prism-rails wraps the Prism.js library in a rails engine for simple use with the asset pipeline

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 93.3%
  • Shell 6.7%