0.01
No commit activity in last 3 years
No release in over 3 years
A Jekyll filter that enables runtime debugging.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
>= 2.0, < 4.0

Runtime

>= 2.5, < 5.0
~> 0.10
 Project Readme

Jekyll debug

A Jekyll filter that enables runtime debugging.

Gem Version Build Status Dependency Status

Usage

  1. Add gem 'jekyll-debug' to your site's Gemfile and run bundle
  2. Add the following to your site's _config.yml:
gems:
  - jekyll-debug

To use in your project, add liquid tags to front matter and use the debug filter to catch variables at run time. jekyll-debug extends the pry debugger, so when the debugging console shows appears, all pry commands are valid commands.

example.md

---
title: My first page
---

# Welcome to {{ test | debug }}!

>> ---------------------
My first page is a String
---------------------

From: /Users/brianhedberg/Projects/jekyll-debug/lib/jekyll-liquify.rb @ line 12 LiquidFilter#debug:
     5: def debug(*args)
     6:   if args.any?
     7:     args.map do |arg|
     8:       type = arg.class
     9:       puts '---------------------'
    10:       puts "#{arg} is a #{type}"
    11:       puts '---------------------'
 => 12:       binding.pry
    13:     end
    14:   else
    15:     args
    16:   end
    17: end

[1] pry(#<#<Class:0x007f8a1ccbe7a8>>)>

Contributing

  1. Fork the project
  2. Create a descriptively named feature branch
  3. Add your feature
  4. Submit a pull request