Socket
Book a DemoInstallSign in
Socket

jekyll-debug

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jekyll-debug

bundlerRubyGems.org
Version
0.0.2
Version published
Maintainers
1
Created
Source

Jekyll debug

A Jekyll filter that enables runtime debugging.

Gem Version Build Status Dependency Status

Usage

  • Add gem 'jekyll-debug' to your site's Gemfile and run bundle
  • 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

  • Fork the project
  • Create a descriptively named feature branch
  • Add your feature
  • Submit a pull request

FAQs

Package last updated on 22 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts