{"id":13566706,"url":"https://github.com/Automattic/newspack-blocks","last_synced_at":"2025-04-04T00:32:07.201Z","repository":{"id":37802229,"uuid":"178702143","full_name":"Automattic/newspack-blocks","owner":"Automattic","description":"Gutenberg blocks for the Newspack project.","archived":false,"fork":false,"pushed_at":"2024-10-29T15:52:31.000Z","size":34234,"stargazers_count":207,"open_issues_count":131,"forks_count":43,"subscribers_count":25,"default_branch":"trunk","last_synced_at":"2024-10-29T17:56:03.255Z","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/Automattic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-03-31T14:53:18.000Z","updated_at":"2024-10-29T15:52:35.000Z","dependencies_parsed_at":"2023-10-16T14:32:14.906Z","dependency_job_id":"dfc0b612-a29c-4c7e-bc9f-397d33f35f94","html_url":"https://github.com/Automattic/newspack-blocks","commit_stats":{"total_commits":1160,"total_committers":53,"mean_commits":21.88679245283019,"dds":0.8362068965517242,"last_synced_commit":"4376952c58e9b0a045d4afd72d77afd03f54b5d4"},"previous_names":[],"tags_count":524,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fnewspack-blocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fnewspack-blocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fnewspack-blocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fnewspack-blocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Automattic","download_url":"https://codeload.github.com/Automattic/newspack-blocks/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223075372,"owners_count":17083506,"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":"2024-08-01T13:02:15.050Z","updated_at":"2024-11-04T21:30:50.674Z","avatar_url":"https://github.com/Automattic.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Newspack Blocks\n\nThis plugin is meant to serve as a container for most Newspack Gutenberg blocks. There may be certain blocks that relate to specific functionality in other plugins, in which case they would live with the primary functionality, but besides this exception most will live in this one.\n\n## Setup\n\nTo get set up for block development, run `composer install \u0026\u0026 npm install`\n\n### Generating Builds\n\nTo generate a build of the current blocks, run `npm run build`.\n\nTo clean out the built blocks, run `npm run clean`.\n\n### Developing\n\nTo work on Block development and have Webpack watch your files for changes run: `npm start`.\n\n#### Linting\n\nis performed on changed files before commiting. In other words, is run during `pre-commit` git hook, but only on staged files. The hook is configured in `composer.json`.\n\n|              | PHP                                                   | JS                            | SCSS                               |\n| :----------- | :---------------------------------------------------- | :---------------------------- | :--------------------------------- |\n| tool         | [PHPCS](https://github.com/squizlabs/PHP_CodeSniffer) | [eslint](https://eslint.org/) | [stylelint](https://stylelint.io/) |\n| config       | `.phpcs.xml.dist`                                     | `.eslintrc.js`                | `.stylelintrc`                     |\n| run manually | `composer lint`                                       | `npm run lint:js`             | `npm run lint:scss`                |\n| autofix ✨   | `./vendor/bin/phpcbf \u003cfile\u003e`                          | `npm run lint:js -- --fix`    | `npm run lint:scss -- --fix`       |\n\n### Building New Blocks\n\nTo get started with a new block:\n\n- Duplicate one of the example block directories in `src/`\n- Rename the directory to the slug of your block.\n- At minimum edit `index.js` and change name and title definitions.\n- Add the block slug to the `production` array in `src/setup/blocks.json`\n- If the block requires server-side code add the slug to the `$newspack_blocks_blocks` array in `newspack-blocks.php`\n- Execute `npm run build`. If all went smoothly, you should see a Newspack category in the block picker, and your block should appear within it.\n\n### Usage\n\n[End-user documentation can be found here](https://help.newspack.com/publishing-and-appearance/blocks/homepage-posts).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAutomattic%2Fnewspack-blocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAutomattic%2Fnewspack-blocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAutomattic%2Fnewspack-blocks/lists"}