Sha256: 1f6e2f66c2216363165b754289a89319a3286a8fac778d411ebc9ceed29c24b2
Contents?: true
Size: 661 Bytes
Versions: 1
Compression:
Stored size: 661 Bytes
Contents
# Volt::CodeHighlight A simple code highlighting component using highlight.js ## Usage In your gemfile add: ``` gem 'volt-code_highlight' ``` In the component you wish to use it in, add to config/dependencies.rb ``` component 'code_highlight' ``` In a view, add something like: ```html <:code_highlight> def some_code puts 'an example' end </:code_highlight> ``` You can also specify a "language" attribute. (see https://highlightjs.org/download/ for the list of default included languages) Lastly, you can include a binding and the code will dynamically update. ```html <:code_highlight language="ruby">{{ page._some_code }}</:code_highlight> ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
volt-code_highlight-0.1.0 | README.md |