{"id":48233715,"url":"https://github.com/parisek/timber-kit","last_synced_at":"2026-04-04T19:49:51.902Z","repository":{"id":345992485,"uuid":"1188083505","full_name":"parisek/timber-kit","owner":"parisek","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-21T20:41:54.000Z","size":201,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-22T07:49:48.967Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parisek.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-21T15:43:21.000Z","updated_at":"2026-03-21T20:40:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/parisek/timber-kit","commit_stats":null,"previous_names":["parisek/timber-kit"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/parisek/timber-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parisek%2Ftimber-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parisek%2Ftimber-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parisek%2Ftimber-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parisek%2Ftimber-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parisek","download_url":"https://codeload.github.com/parisek/timber-kit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parisek%2Ftimber-kit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31411351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T19:29:44.979Z","status":"ssl_error","status_checked_at":"2026-04-04T19:29:11.535Z","response_time":60,"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":"2026-04-04T19:49:51.837Z","updated_at":"2026-04-04T19:49:51.893Z","avatar_url":"https://github.com/parisek.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# timber-kit\n\nWordPress/Timber starter kit — configurable base class, ACF helpers, image resizer.\n\n## Installation\n\n```bash\ncomposer require parisek/timber-kit\n```\n\n## What's Included\n\n### StarterBase\n\nExtends `Timber\\Site` with 25 configurable properties. Handles theme setup, Twig extensions, security hardening, Gutenberg blocks, media processing, and admin cleanup — all opt-in via boolean flags.\n\n### Helpers\n\nStatic methods for formatting ACF data into clean arrays for Twig templates:\n\n- `formatImage()`, `formatFile()`, `formatVideo()` — media formatting\n- `formatFields()`, `fieldFormatter()` — ACF field processing\n- `formatLink()` — link/button formatting\n- `formatMenu()` — navigation menus\n- `formatTerms()` — taxonomy terms\n- `formatLanguageSwitcher()` — WPML language switcher\n- `resizeImage()` — responsive image variants\n- `pagination()` — pagination formatting\n\n### Resizer\n\nImage resizing via [Spatie/Image](https://github.com/spatie/image). AVIF output, responsive variants with breakpoints, crop positions, and cache management. Used as a Twig filter.\n\n## Usage\n\nCreate a `Base` class in your theme that extends `StarterBase`:\n\n```php\n\u003c?php\n\nuse Parisek\\TimberKit\\StarterBase;\nuse Parisek\\TimberKit\\Helpers;\n\nclass Base extends StarterBase {\n\n    public function __construct() {\n        $this-\u003emenus = [\n            'main-menu' =\u003e 'Main Menu',\n            'footer-menu' =\u003e 'Footer Menu',\n        ];\n        $this-\u003efont_stylesheets = [\n            'poppins' =\u003e 'fonts/poppins/stylesheet.css',\n        ];\n        $this-\u003edisable_search = false;\n\n        parent::__construct();\n    }\n}\n```\n\n## Configuration\n\nOverride these properties in your child constructor before calling `parent::__construct()`:\n\n### Theme\n\n| Property | Type | Default | Description |\n|----------|------|---------|-------------|\n| `$menus` | array | `[]` | Registered navigation menus |\n| `$font_stylesheets` | array | `[]` | CSS files to enqueue |\n| `$preload_fonts` | array | `[]` | Font files to preload |\n| `$search_post_types` | array | `['post']` | Post types for search |\n| `$article_post_types` | array | `['post']` | Post types treated as articles |\n| `$block_category` | array | `['slug' =\u003e 'custom', 'title' =\u003e 'Custom']` | Custom block category |\n| `$favicon_path` | string | `'images/touch/favicon.svg'` | Favicon path |\n\n### Security \u0026 Cleanup\n\n| Property | Type | Default | Description |\n|----------|------|---------|-------------|\n| `$cleanup_wp_head` | bool | `true` | Remove unnecessary wp_head output |\n| `$disable_xmlrpc` | bool | `true` | Disable XML-RPC |\n| `$disable_emojis` | bool | `true` | Remove emoji scripts/styles |\n| `$disable_feeds` | bool | `true` | Disable RSS feeds |\n| `$disable_comments` | bool | `true` | Disable comments |\n| `$disable_search` | bool | `true` | Disable search |\n| `$cleanup_dashboard` | bool | `true` | Remove dashboard widgets |\n| `$cleanup_admin_bar` | bool | `true` | Clean up admin bar |\n| `$editor_role_enhancements` | bool | `true` | Enhanced editor role caps |\n| `$disable_self_pingbacks` | bool | `true` | Disable self-pingbacks |\n| `$restrict_rest_users` | bool | `true` | Protect REST API users endpoint |\n\n### Media Processing\n\n| Property | Type | Default | Description |\n|----------|------|---------|-------------|\n| `$clean_image_filenames` | bool | `true` | Sanitize uploaded filenames |\n| `$max_upload_width` | int | `2560` | Max upload image width (px) |\n| `$max_upload_height` | int | `2560` | Max upload image height (px) |\n\n### Gutenberg\n\n| Property | Type | Default | Description |\n|----------|------|---------|-------------|\n| `$gutenberg_align_wide` | bool | `true` | Enable wide/full alignment |\n| `$gutenberg_responsive_embeds` | bool | `true` | Responsive video embeds |\n| `$gutenberg_editor_styles` | bool | `true` | Load editor stylesheet |\n| `$gutenberg_disable_core_patterns` | bool | `true` | Remove core block patterns |\n\n## Testing\n\n```bash\nddev start\nddev exec \"vendor/bin/phpunit\"\nddev exec \"vendor/bin/phpstan analyse\"\n```\n\n## License\n\n[GPL-3.0-or-later](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparisek%2Ftimber-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparisek%2Ftimber-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparisek%2Ftimber-kit/lists"}