{"id":13513337,"url":"https://github.com/drupal-pattern-lab/unified-twig-extensions","last_synced_at":"2026-02-27T07:44:15.923Z","repository":{"id":56972640,"uuid":"90551755","full_name":"drupal-pattern-lab/unified-twig-extensions","owner":"drupal-pattern-lab","description":"Share Pattern Lab's custom Twig extensions with Drupal 8","archived":false,"fork":false,"pushed_at":"2022-09-06T21:20:55.000Z","size":8,"stargazers_count":9,"open_issues_count":8,"forks_count":10,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-14T00:23:34.792Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/drupal-pattern-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-07T18:03:50.000Z","updated_at":"2024-10-31T19:33:50.000Z","dependencies_parsed_at":"2022-08-21T12:50:14.781Z","dependency_job_id":null,"html_url":"https://github.com/drupal-pattern-lab/unified-twig-extensions","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/drupal-pattern-lab/unified-twig-extensions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupal-pattern-lab%2Funified-twig-extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupal-pattern-lab%2Funified-twig-extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupal-pattern-lab%2Funified-twig-extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupal-pattern-lab%2Funified-twig-extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drupal-pattern-lab","download_url":"https://codeload.github.com/drupal-pattern-lab/unified-twig-extensions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drupal-pattern-lab%2Funified-twig-extensions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29887819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T05:38:26.446Z","status":"ssl_error","status_checked_at":"2026-02-27T05:38:25.235Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2024-08-01T04:00:53.027Z","updated_at":"2026-02-27T07:44:15.905Z","avatar_url":"https://github.com/drupal-pattern-lab.png","language":"PHP","readme":"# Unified Twig Extensions\n\nShare Pattern Lab's custom twigs functions, filters and tags with Drupal 8. Huzzah!\n\n\n## Getting Started\nSimply add to Drupal and enable the `\nUnified Twig Extensions` module on the `admin/modules` page to get started.\n\n\n## Note on Paths\nNote: currently looks for compatible extensions in your current active D8 theme path + either the 'pattern-lab/source/_twig-components' or 'source/_twig-components' folders. @TODO: allow users to customized / override this!\n\n\n## Included Examples\nI'm including a couple example twig extensions to add to your existing Pattern Lab-enabled theme to get started:\n  1. `example/_twig-components/functions/link.function.php` --\u003e example of having Drupal ignore a PL Twig extension given the link function already exists in Drupal.\n\n  2. `example/_twig-components/tags/grid.tag.php` and `example/_twig-components/tags/cell.tag.php` --\u003e example of a custom Twig tag that abstracts away some of the markup involved in an ITCSS-based grid system.\n\n  To test this out, try adding these two custom Twig tags to your theme's existing _twig-components folder and try adding the following HTML (to both PL's twig templates and/or a Drupal template):\n\n```twig\n{% grid 'o-grid--large' %}\n  {% cell 'u-1/1 u-1/2@small u-2/3@medium' %}\n    Grid cell\n  {% endcell %}\n\n  {% cell 'u-1/1 u-1/2@small u-1/3@medium' %}\n    Grid cell\n  {% endcell %}\n{% endgrid %}\n```\n\nEverything should be working as expected if you don't encounter any errors and the following HTML gets output (rendered of course):\n\n```html\n\u003cdiv class=\"o-grid o-grid--large\"\u003e\n  \u003cdiv class=\"o-grid__item u-1/1 u-1/2@small u-2/3@medium\"\u003e\n    Grid cell\n  \u003c/div\u003e\n\n  \u003cdiv class=\"o-grid__item u-1/1 u-1/2@small u-1/3@medium\"\u003e\n    Grid cell\n  \u003c/div\u003e\n\u003c/div\u003e\n  ```\n","funding_links":[],"categories":["PHP","Drupal modules"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrupal-pattern-lab%2Funified-twig-extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrupal-pattern-lab%2Funified-twig-extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrupal-pattern-lab%2Funified-twig-extensions/lists"}