{"id":23592998,"url":"https://github.com/devuri/twigit","last_synced_at":"2026-01-24T02:07:22.134Z","repository":{"id":269790550,"uuid":"908342267","full_name":"devuri/twigit","owner":"devuri","description":"Twigit brings a modern, decoupled approach to your development","archived":false,"fork":false,"pushed_at":"2025-01-05T21:00:07.000Z","size":186,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T15:49:44.868Z","etag":null,"topics":["twig","wordpress","wordpress-theme"],"latest_commit_sha":null,"homepage":"","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/devuri.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-25T19:53:10.000Z","updated_at":"2025-01-05T21:00:00.000Z","dependencies_parsed_at":"2024-12-26T07:34:57.095Z","dependency_job_id":"4d84feb4-1658-485e-9944-c83f8f7b7f7c","html_url":"https://github.com/devuri/twigit","commit_stats":null,"previous_names":["devuri/twigit"],"tags_count":1,"template":true,"template_full_name":"devuri/dot-access","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devuri%2Ftwigit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devuri%2Ftwigit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devuri%2Ftwigit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devuri%2Ftwigit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devuri","download_url":"https://codeload.github.com/devuri/twigit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252941893,"owners_count":21828957,"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":["twig","wordpress","wordpress-theme"],"created_at":"2024-12-27T08:17:12.643Z","updated_at":"2026-01-24T02:07:17.106Z","avatar_url":"https://github.com/devuri.png","language":"PHP","readme":"### A Streamlined Templating Approach\n\nModern development increasingly leans toward mono repo architectures that centralize application code, dependencies, and templates in a unified repository. This approach simplifies collaboration, version control, and deployment—making it ideal for large-scale and maintainable web projects.\n\n \u003e Embrace the Hybrid CMS:\n\u003e \n\u003e [A hybrid-cms approach](https://github.com/devuri/twigit/blob/main/docs/why.md) allows you to keep WordPress’ as your back end while bypassing the default theme system in favor of a templating engine like Twig.\n\n### 1. Install Twigit via Composer\n\nIn your project root (`mysite`), install Twigit using Composer:\n\n```bash\ncomposer require devuri/twigit\n```\n\nThis installs Twigit and Twig in the `vendor` directory.\n\n\n### 2. Configure Twigit to Use the `templates` Directory\n\nTwigit can be configured via an mu-plugin or programmatically to locate templates in `mysite/templates`. For example:\n\n```php\n// Recommended to define constants upstream for flexibility.\nif (\\defined('USE_TWIGIT') \u0026\u0026 true === \\constant('USE_TWIGIT')) {\n    $twig = Twigit\\Twigit::init('path/to/mysite', ['autoescape' =\u003e 'html']);\n\n    // Apply a template filter that overrides traditional theme handling.\n    $twig-\u003etemplateFilter();\n}\n```\n\n\u003e If using Raydium, many configuration steps are already handled. Learn more here: [Raydium GitHub Repository](https://github.com/devuri/raydium).\n\n\n### 3. Organize Your Templates\n\nCreate a `templates` directory in your project root:\n\n```\nmysite/\n└── templates/\n    ├── base.twig\n    ├── header.twig\n    └── footer.twig\n```\n\nYou can copy and adapt Twigit's base templates from its GitHub repository:  [Twigit Base Templates](https://github.com/devuri/twigit/tree/main/src/templates)\n\n\n### 4. Example Twig Template\n\nHere’s a simple example of a base Twig template:\n\n```twig\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    \u003ctitle\u003e{{ title }}\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    {% block content %}\n    {% endblock %}\n\u003c/body\u003e\n\u003c/html\u003e\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevuri%2Ftwigit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevuri%2Ftwigit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevuri%2Ftwigit/lists"}