{"id":15516004,"url":"https://github.com/unabris/liquid-tag-attribute_parser","last_synced_at":"2026-02-05T23:31:27.969Z","repository":{"id":46563838,"uuid":"398805844","full_name":"unabris/liquid-tag-attribute_parser","owner":"unabris","description":"Liquid::Tag::AttributeParser allows you to send familiar html-like attributes along with your Liquid tags to receive back a more manageable Ruby hash with all the given information.","archived":false,"fork":false,"pushed_at":"2024-05-16T19:19:53.000Z","size":16,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-07T22:36:20.282Z","etag":null,"topics":["jekyll","liquid"],"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/unabris.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-22T13:25:06.000Z","updated_at":"2021-10-05T18:01:46.000Z","dependencies_parsed_at":"2025-03-11T05:44:23.955Z","dependency_job_id":"d09ea9c7-22e9-4c16-bd05-a4ff67c11aa8","html_url":"https://github.com/unabris/liquid-tag-attribute_parser","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/unabris/liquid-tag-attribute_parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unabris%2Fliquid-tag-attribute_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unabris%2Fliquid-tag-attribute_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unabris%2Fliquid-tag-attribute_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unabris%2Fliquid-tag-attribute_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unabris","download_url":"https://codeload.github.com/unabris/liquid-tag-attribute_parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unabris%2Fliquid-tag-attribute_parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29138375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T23:14:48.546Z","status":"ssl_error","status_checked_at":"2026-02-05T23:14:35.724Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","liquid"],"created_at":"2024-10-02T10:05:20.028Z","updated_at":"2026-02-05T23:31:27.952Z","avatar_url":"https://github.com/unabris.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Liquid::Tag::AttributeParser\n\n![Gem](https://img.shields.io/gem/v/liquid-tag-attribute_parser)\n[![Maintainability](https://api.codeclimate.com/v1/badges/5aad2d37fdb6fc3acfd9/maintainability)](https://codeclimate.com/github/unabris/liquid-tag-attribute_parser/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/5aad2d37fdb6fc3acfd9/test_coverage)](https://codeclimate.com/github/unabris/liquid-tag-attribute_parser/test_coverage)\n![GitHub](https://img.shields.io/github/license/unabris/liquid-tag-attribute_parser)\n\n\n`Liquid::Tag::AttributeParser` allows you to send familiar `html`-like attributes along with your Liquid tags to receive back a more manageable Ruby hash with all the given information.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'liquid-tag-attribute_parser'\n```\n\nAnd then execute:\n\n```shell\n$ bundle install\n```\n\nOr install it yourself as:\n\n```shell\n$ gem install liquid-tag-attribute_parser\n```\n## Usage\n\nThree easy steps:\n\n1. Take the raw argument data you get from the Liquid Tag\n1. Use `Liquid::Tag::AttributeParser` to parse the raw data\n1. Get back the data on a Hash format\n\n#### Working example for [Jekyll tags](https://jekyllrb.com/docs/plugins/tags/):\n\n```ruby\nrequire \"liquid/tag/attribute_parser\"\n\nmodule Jekyll\n  class GreetingTag \u003c Liquid::Tag\n    def initialize(_tag_name, text, _tokens)\n      super\n      @attributes = Liquid::Tag::AttributeParser.new(text).attributes\n    end\n\n    def render(_context)\n      \"Hello! My name is #{@attributes[:name]} and I'm #{@attributes[:age]}\"\n    end\n  end\nend\n\nLiquid::Template.register_tag('greeting', Jekyll::GreetingTag)\n```\n\n```html\n{% greeting name=\"Jekyll\" age=13 %}\n```\n\n## Supported data types\n\n### `String`\n\n```ruby\nLiquid::Tag::AttributeParser.new('string=\"This is a string\"').attributes\n\n# =\u003e {:string=\u003e\"This is a string\"}\n```\n\n### `Boolean`\n\n```ruby\nLiquid::Tag::AttributeParser.new('boolean=true').attributes\n\n# =\u003e {:boolean=\u003etrue}\n```\n\n```ruby\nLiquid::Tag::AttributeParser.new('boolean=false').attributes\n\n# =\u003e {:boolean=\u003efalse}\n```\n\n### `Integer`\n\n```ruby\nLiquid::Tag::AttributeParser.new('integer=123').attributes\n\n# =\u003e {:integer=\u003e123}\n```\n\n```ruby\nLiquid::Tag::AttributeParser.new('integer=+123').attributes\n\n# =\u003e {:integer=\u003e123}\n```\n\n```ruby\nLiquid::Tag::AttributeParser.new('integer=-123').attributes\n\n# =\u003e {:integer=\u003e-123}\n```\n\n### `Float`\n\n```ruby\nLiquid::Tag::AttributeParser.new('float=1.23').attributes\n\n# =\u003e {:float=\u003e1.23}\n```\n\n```ruby\nLiquid::Tag::AttributeParser.new('float=+1.23').attributes\n\n# =\u003e {:float=\u003e1.23}\n```\n\n```ruby\nLiquid::Tag::AttributeParser.new('float=-1.23').attributes\n\n# =\u003e {:float=\u003e-1.23}\n```\n\n```ruby\nLiquid::Tag::AttributeParser.new('float=123.0').attributes\n\n# =\u003e {:float=\u003e123.0}\n```\n\n```ruby\nLiquid::Tag::AttributeParser.new('float=+123.0').attributes\n\n# =\u003e {:float=\u003e123.0}\n```\n\n```ruby\nLiquid::Tag::AttributeParser.new('float=-123.0').attributes\n\n# =\u003e {:float=\u003e-123.0}\n```\n\n```ruby\nLiquid::Tag::AttributeParser.new('float=.123').attributes\n\n# =\u003e {:float=\u003e0.123}\n```\n\n```ruby\nLiquid::Tag::AttributeParser.new('float=+.123').attributes\n\n# =\u003e {:float=\u003e0.123}\n```\n\n```ruby\nLiquid::Tag::AttributeParser.new('float=-.123').attributes\n\n# =\u003e {:float=\u003e-0.123}\n```\n\n### Combination of different data types\n\n```ruby\nLiquid::Tag::AttributeParser.new('string=\"This is a string\" boolean=true integer=-123 float=.123').attributes\n\n# =\u003e {:string=\u003e\"This is a string\", :boolean=\u003etrue, :integer=\u003e-123, :float=\u003e0.123}\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/unabris/liquid-tag-attribute_parser.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funabris%2Fliquid-tag-attribute_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funabris%2Fliquid-tag-attribute_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funabris%2Fliquid-tag-attribute_parser/lists"}