{"id":28472048,"url":"https://github.com/parallax/filament-syntax-entry","last_synced_at":"2025-07-02T00:31:13.929Z","repository":{"id":220509119,"uuid":"751808578","full_name":"parallax/filament-syntax-entry","owner":"parallax","description":"Add a Filament infolist entry for themeable syntax highlighting using highlight.js","archived":false,"fork":false,"pushed_at":"2025-03-27T11:20:52.000Z","size":1917,"stargazers_count":18,"open_issues_count":5,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-30T00:11:20.840Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":false,"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/parallax.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2024-02-02T11:24:34.000Z","updated_at":"2025-03-27T15:28:53.000Z","dependencies_parsed_at":"2024-02-02T14:00:42.803Z","dependency_job_id":"7fed387d-6851-433b-8ded-e69d68c2c24a","html_url":"https://github.com/parallax/filament-syntax-entry","commit_stats":null,"previous_names":["parallax/filament-syntax-entry"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/parallax/filament-syntax-entry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallax%2Ffilament-syntax-entry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallax%2Ffilament-syntax-entry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallax%2Ffilament-syntax-entry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallax%2Ffilament-syntax-entry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parallax","download_url":"https://codeload.github.com/parallax/filament-syntax-entry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parallax%2Ffilament-syntax-entry/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263055956,"owners_count":23406802,"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":[],"created_at":"2025-06-07T11:09:47.359Z","updated_at":"2025-07-02T00:31:13.891Z","avatar_url":"https://github.com/parallax.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Filament Syntax Entry\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/parallax/filament-syntax-entry?style=flat-square)](https://packagist.org/packages/parallax/filament-syntax-entry)\n[![Software License](https://img.shields.io/packagist/l/parallax/filament-syntax-entry?style=flat-square)](LICENSE.md)\n[![Total Downloads](https://img.shields.io/packagist/dt/parallax/filament-syntax-entry?style=flat-square)](https://packagist.org/packages/parallax/filament-syntax-entry)\n![Stars](https://img.shields.io/github/stars/parallax/filament-syntax-entry?style=flat-square)\n\nAdd a Filament [infolist entry](https://filamentphp.com/docs/3.x/infolists/entries/getting-started) for themeable server-side syntax highlighting using [tempestphp/highlight](https://github.com/tempestphp/highlight).\n\n\u003cimg class=\"filament-hidden\" src=\"https://github.com/parallax/filament-syntax-entry/raw/main/assets/filament-syntax-entry.jpg\"/\u003e\n\n## Installation\n\nInstall the package via composer:\n\n```bash\ncomposer require parallax/filament-syntax-entry\n```\n\nOptionally, you can publish the views using\n\n```bash\nphp artisan vendor:publish --tag=\"filament-syntax-entry-views\"\n```\n\n## Upgrading from 1.x\n\nThere are a couple of important changes to be aware of when upgrading to version 2.x:\n\n- PHP 8.3 is required for server-side syntax highlighting\n- Highlight.js is no longer supported\n- Theme selection has been replaced with the ability to create custom themes\n\n## Quickstart\n\n### Add the [Infolist entry](https://filamentphp.com/docs/3.x/infolists/entries/getting-started)\n\nAdd the `SyntaxEntry` to the `$infolist-\u003eschema()` method.\n\n```php\n\u003c?php\n\nnamespace App\\Filament\\Resources;\n\nuse Parallax\\FilamentSyntaxEntry\\SyntaxEntry;\n\nclass ProductResource extends Resource\n{\n    public static function infolist(Infolist $infolist): Infolist\n    {\n        return $infolist\n            -\u003eschema([\n                SyntaxEntry::make('metadata'),\n            ]);\n    }\n}\n```\n\n### Setting the language\n\nThe default language value is set to `json`. To override this value you may use the `language()` method:\n\n```php\nSyntaxEntry::make('metadata')\n    -\u003elanguage('json');\n```\n\nThe following languages are currently available:\n\n- `blade`\n- `css`\n- `gdscript`\n- `html`\n- `javascript`\n- `json`\n- `php`\n- `sql`\n- `twig`\n- `xml`\n- `yaml`\n\n### Creating a custom theme\n\nYou may override the default theme by using the `theme()` method:\n\n```php\nSyntaxEntry::make('metadata')\n    -\u003etheme('smudge');\n```\n\nThis will wrap the syntax component with a custom class like so:\n\n```\nsyntax-entry-theme-smudge\n```\n\nThe final step is to follow the [tempestphp/highlight](https://github.com/tempestphp/highlight) documentation on how to create your own theme, and use this in combination with [Filament themes](https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme).\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Credits\n\n- [Parallax](https://parall.ax)\n- [Contributors](https://github.com/parallax/filament-syntax-entry/graphs/contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparallax%2Ffilament-syntax-entry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparallax%2Ffilament-syntax-entry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparallax%2Ffilament-syntax-entry/lists"}