Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

spilth/liquid-eval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Liquid Eval Block

Allows you to embed a block of code in your page as well as the output generated by that code.

Usage

  • Install the gem or add it to your projects Gemfile.
  • Use require 'liquid-eval' somewhere in your code
    • For Jekyll projects, add this to a file in your _plugins directory.

Within a post or page you can now do:

{% eval ruby %}
puts "Hello, world!"
{% endeval %}

This will generate the following HTML in your page:

<h6>Code:</h6>
<pre><code>puts "Hello, world!"</code></pre>

<h6>Output:</h6>
<pre class="output"><code>Hello, world!</code></pre> 

About

Embedded Code and Generated Output for Liquid Templates and Jekyll

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages