{"id":14979504,"url":"https://github.com/geolexica/liquid-pry","last_synced_at":"2025-10-28T18:31:46.034Z","repository":{"id":56881376,"uuid":"336374990","full_name":"geolexica/liquid-pry","owner":"geolexica","description":"Brings Pry to Liquid templates and to Jekyll-powered sites","archived":false,"fork":false,"pushed_at":"2021-02-09T05:43:11.000Z","size":22,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T17:23:43.212Z","etag":null,"topics":["jekyll","jekyll-plugin","pry"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geolexica.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-05T19:57:46.000Z","updated_at":"2022-10-01T11:07:31.000Z","dependencies_parsed_at":"2022-08-20T22:31:21.362Z","dependency_job_id":null,"html_url":"https://github.com/geolexica/liquid-pry","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geolexica%2Fliquid-pry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geolexica%2Fliquid-pry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geolexica%2Fliquid-pry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geolexica%2Fliquid-pry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geolexica","download_url":"https://codeload.github.com/geolexica/liquid-pry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238700445,"owners_count":19515932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jekyll","jekyll-plugin","pry"],"created_at":"2024-09-24T14:00:10.446Z","updated_at":"2025-10-28T18:31:45.588Z","avatar_url":"https://github.com/geolexica.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Liquid::Pry\n\n:jekyll: https://jekyllrb.com/\n:jekyll_plugin_install: https://jekyllrb.com/docs/plugins/installation/\n:pry: https://pry.github.io/\n:ribose: https://www.ribose.com\n\nifdef::env-github[]\nimage:https://img.shields.io/gem/v/liquid-pry?style=for-the-badge[\n  Latest Version, link=\"https://rubygems.org/gems/liquid-pry\"]\nimage:https://img.shields.io/github/workflow/status/geolexica/liquid-pry/Tests/master?style=for-the-badge[\n  Build Status, link=\"https://github.com/geolexica/liquid-pry/actions?workflow=tests\"]\nendif::[]\n\nifndef::env-github[]\n[quote, Pry home page]\nPry is a runtime developer console with powerful introspection capabilities.\nendif::[]\nifdef::env-github[]\n“Pry is a runtime developer console with powerful introspection capabilities.”\n-- Pry home page\nendif::[]\n\nLiquid::Pry brings {pry}[Pry] to Liquid templates and to Jekyll-powered sites.\n\n== Installation\n\n=== Without Jekyll\n\nAdd following to the `Gemfile`:\n\n----\ngem \"liquid-pry\"\n----\n\n=== With Jekyll\n\nIf you want to integrate Liquid::Pry with Jekyll, it's probably the easiest\nto add following to the `Gemfile`, so that Jekyll will automatically load and\nenable Liquid::Pry:\n\n----\ngroup :jekyll_plugins do\n  gem \"liquid-pry\"\nend\n----\n\nFor other options, read {jekyll_plugin_install}[Jekyll documentation].\n\n== Usage\n\nThis gem provides a Liquid filter and a Liquid tag.\n\n=== Filter\n\nThe `pry` filter hooks Pry into filter chain in a Liquid template, helping user\nto debug Jekyll's front matter or any other data available in given template.\nFor example following could be used to debug `page.title`:\n\n----\nYou are on page {{ page.title | pry }}.\n----\n\nWhen Liquid renderer encounters `pry` filter, then Pry console is launched.\nA convenience local variable named `input` is defined, which contains filter\ninput (value of `page.title` in above example), allowing site developer to\ninspect or alter that value.  Another local variable `context` provides access\nto rendering context.\n\nThe filter returns its input, hence it does not affect rendered page.  Also, it\ncan be placed anywhere in the filter chain, not necessarily at the end.\nFor example, in a following example `pry` filter is placed before `upcase`,\nallowing user to inspect `page.title` value before the `upcase` filter is\napplied.\n\n----\nYou are on page {{ page.title | pry | upcase }}.\n----\n\nHowever, if user modify the value of `input` variable, then modified version is\nreturned.  This may be used for experimenting.\n\nThe `pry` filter is typically more useful than the `pry` tag, especially for\nnovice users.\n\n=== Tag\n\nThe `pry` tag interrupts Liquid rendering, allowing user to inspect or modify\nthe rendering context.  For example:\n\n----\n{% pry %}\n----\n\nWhen Liquid renderer encounters `pry` tag, then Pry console is launched\nand rendering context is available via `context` local variable.\n\n==== Using with `once` option\n\nIf `pry` tag is supplied with `once` option, then Pry console is launched only\nfor the first time that tag is encountered on given page.  In following example:\n\n----\n{% for product in collection.products %}\n  {% pry once %}\n  {{ product.title }}\n{% endfor %}\n----\n\nPry will be launched only once, no matter if `collection.products` contains one\nitem or a hundred.\n\nStill, in following example Pry will be launched twice, because `pry` tag is\nplaced that many times in the template:\n\n----\n{% pry once %}\n{% pry once %}\n----\n\n=== Using Pry console\n\nSee {pry}[Pry documentation].\n\n== Credits\n\nThis gem is developed, maintained and funded by {ribose}[Ribose Inc.]\n\n== License\n\nThe gem is available as open source under the terms of the\nhttps://opensource.org/licenses/MIT[MIT License].\n\n== See also\n\nThis gem is tiny but quite comprehensive.  However, there are some other ones\nyou may want to try:\n\n- https://github.com/gemfarmer/jekyll-debug[jekyll-debug]\n- https://github.com/zhongxiang117/jekyll-liquid-debug[jekyll-liquid-debug]\n  (a very different approach)\n- https://github.com/octopress/debugger[octopress-debugger]\n  (seems unmaintained as of Jan 2021)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeolexica%2Fliquid-pry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeolexica%2Fliquid-pry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeolexica%2Fliquid-pry/lists"}