0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Exexcutes code blocks and appends the generated output after the example code.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
 Project Readme

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>