{"id":26793208,"url":"https://github.com/beapi/gutenberg-serializer","last_synced_at":"2025-04-22T15:12:30.221Z","repository":{"id":62492547,"uuid":"240075839","full_name":"BeAPI/gutenberg-serializer","owner":"BeAPI","description":"Package to transform Gutenberg block array to a Gutenberg firendly string","archived":false,"fork":false,"pushed_at":"2020-12-02T11:10:42.000Z","size":147,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-22T15:12:17.541Z","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/BeAPI.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":"2020-02-12T17:42:17.000Z","updated_at":"2021-02-20T14:06:02.000Z","dependencies_parsed_at":"2022-11-02T11:30:57.033Z","dependency_job_id":null,"html_url":"https://github.com/BeAPI/gutenberg-serializer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeAPI%2Fgutenberg-serializer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeAPI%2Fgutenberg-serializer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeAPI%2Fgutenberg-serializer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BeAPI%2Fgutenberg-serializer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BeAPI","download_url":"https://codeload.github.com/BeAPI/gutenberg-serializer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250264911,"owners_count":21402004,"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-03-29T16:19:29.112Z","updated_at":"2025-04-22T15:12:30.201Z","avatar_url":"https://github.com/BeAPI.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gutenberg-serializer\nPackage to transform Gutenberg block array to a Gutenberg firendly string\n\n# Purpose\nThis package allows you to use a block array from \"parse_blocs\" for example, and serialize it into Gutenberg compatible content.\nThis can be used to migrate content from blocs or programmatically generate content for Gutenberg.\nThe library supports innerBlocs.\n\n# Example\n```php\n$bloc = [\n\t\t[\n\t\t\t'blockName'    =\u003e 'core/paragraph',\n\t\t\t'attrs'        =\u003e\n\t\t\t\t[\n\t\t\t\t\t'id' =\u003e 4\n\t\t\t\t],\n\t\t\t'innerBlocks'  =\u003e [],\n\t\t\t'innerHTML'    =\u003e '\n\t\t\t\t\u003cp\u003eThis is a content\u003c/p\u003e\n\t\t\t',\n\t\t\t'innerContent' =\u003e [\n\t\t\t\t0 =\u003e '\n\t\t\t\t\u003cp\u003eThis is a content\u003c/p\u003e\n\t\t\t\t',\n\t\t\t],\n\t\t]\n];\n$content = BlocksSerializer::from_array( $bloc );\n```\n\nWill become :\n```\n\u003c!-- wp:paragraph {\"id\":\"4\"} --\u003e\n\u003cp\u003eThis is a content\u003c/p\u003e\n\u003c!-- /wp:paragraph --\u003e\n```\n\n# Commands\nYou have commands into the project :\n- `composer cs` : Check the coding standards\n- `composer cbf` : Beautify automatically all the files of the project\n- `composer test` : Launch the tests \n- `composer psalm`: Launch psalm on the files\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeapi%2Fgutenberg-serializer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeapi%2Fgutenberg-serializer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeapi%2Fgutenberg-serializer/lists"}