{"id":19473367,"url":"https://github.com/ethercreative/craft-b","last_synced_at":"2025-08-23T18:06:13.972Z","repository":{"id":56979627,"uuid":"337977416","full_name":"ethercreative/craft-b","owner":"ethercreative","description":"Shared module for traditional Craft/Twig sites","archived":false,"fork":false,"pushed_at":"2021-02-11T13:15:39.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-10T03:56:15.762Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethercreative.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-11T09:04:30.000Z","updated_at":"2023-12-23T04:37:32.000Z","dependencies_parsed_at":"2022-08-21T08:00:11.516Z","dependency_job_id":null,"html_url":"https://github.com/ethercreative/craft-b","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ethercreative/craft-b","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethercreative%2Fcraft-b","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethercreative%2Fcraft-b/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethercreative%2Fcraft-b/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethercreative%2Fcraft-b/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethercreative","download_url":"https://codeload.github.com/ethercreative/craft-b/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethercreative%2Fcraft-b/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271760498,"owners_count":24816430,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-11-10T19:18:19.315Z","updated_at":"2025-08-23T18:06:13.894Z","avatar_url":"https://github.com/ethercreative.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# craft-b\nShared module for traditional Craft/Twig sites\n\n## Installation\n\n```shell\n$ composer require ether/craftb\n```\n\nIn `config/app.php`:\n\n```php\n\u003c?php\n\nreturn [\n    'modules' =\u003e [\n        'craft-b' =\u003e [\n            'class' =\u003e '\\ether\\craftb\\CraftB',        \n        ],\n    ],\n    'bootstrap' =\u003e ['craft-b'],\n];\n```\n\n## Twig\n\n### Atom\n\nRenders an atom (basically a module or component but with a shorter name).  \nOptionally you can pass some variables. The context is never passed to the atom,\nand it will fail silently if it doesn't exist.  \nBy default, it will load templates from the `_atoms` directory in your \n`templates` folder. You can change this by adding a [config file](#config). \n\n```twig\n{% atom 'hero' {} %}\n```\n\nAlso supports `children` (will inject a variable called `children`):\n\n```twig\n{% atom 'hero' {} %}\n    \u003ch1\u003eHello world!\u003c/h1\u003e\n{% endatom %}\n```\n\n### Critical\n\nFor use with [Build](https://github.com/tam/build).  \nOutputs critical css into the head of the rendered template.    \nWill look for css files in the `_critical` directory in `templates`. You can \nchange this in the [config file](#config).\n\n```twig\n{% critical 'about' %}\n```\n\n## Config\n\nYou can override the config by creating a `B.php` file in the `config` directory.  \nSee [config.php](src/config.php) for the available settings.\n\n## Development\n\nWith Docker installed run:\n\n```shell\n$ docker-compose run php composer install\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethercreative%2Fcraft-b","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethercreative%2Fcraft-b","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethercreative%2Fcraft-b/lists"}