{"id":20990847,"url":"https://github.com/broskees/gutenberg-tailwind-safelist","last_synced_at":"2025-05-14T20:31:59.189Z","repository":{"id":172021963,"uuid":"611126633","full_name":"broskees/gutenberg-tailwind-safelist","owner":"broskees","description":"Creates a safelist in your Tailwind config for all the Tailwind classes used in the Wordpress/Gutenberg editor.","archived":false,"fork":false,"pushed_at":"2024-04-08T15:14:28.000Z","size":36,"stargazers_count":10,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T22:22:48.878Z","etag":null,"topics":["acorn","blocks","gutenberg","roots-io","sage-theme","sage10","wordpress"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"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/broskees.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"publiccode":null,"codemeta":null},"funding":{"github":"broskees"}},"created_at":"2023-03-08T07:00:37.000Z","updated_at":"2025-03-05T09:42:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6e35f91-02d6-4b43-972e-f0f5b3a0611b","html_url":"https://github.com/broskees/gutenberg-tailwind-safelist","commit_stats":null,"previous_names":["broskees/gutenberg-tailwind-safelist"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broskees%2Fgutenberg-tailwind-safelist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broskees%2Fgutenberg-tailwind-safelist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broskees%2Fgutenberg-tailwind-safelist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broskees%2Fgutenberg-tailwind-safelist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/broskees","download_url":"https://codeload.github.com/broskees/gutenberg-tailwind-safelist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254222307,"owners_count":22034863,"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":["acorn","blocks","gutenberg","roots-io","sage-theme","sage10","wordpress"],"created_at":"2024-11-19T06:35:42.866Z","updated_at":"2025-05-14T20:31:59.184Z","avatar_url":"https://github.com/broskees.png","language":"PHP","funding_links":["https://github.com/sponsors/broskees"],"categories":[],"sub_categories":[],"readme":"# Gutenberg Tailwind Safelist\n\nCreates a safelist in your Tailwind config for all the Tailwind classes used in the Wordpress/Gutenberg editor. For use with [Sage 10](https://roots.io/sage).\n\n## Requirements\n- [Sage](https://github.com/roots/sage) \u003e= 10.0\n\n## Installation\n\nAdd this to the `repositories` section of your composer.json file:\n```json\n{\n  \"type\": \"vcs\",\n  \"url\": \"https://github.com/broskees/gutenberg-tailwind-safelist.git\"\n}\n```\n\nInstall via Composer:\n\n```bash\n$ composer require broskees/gutenberg-tailwind-safelist\n```\n\n## Usage\n\n### Getting Started\nStart by publishing the `config/tailwind.php` configuration file using Acorn.\n```bash\n$ wp acorn vendor:publish --provider=\"Broskees\\GutenbergTwSafelist\\GutenbergTwSafelistServiceProvider\"\n```\n\nNext, create the database table:\n\n```bash\n$ wp acorn updatetwdb\n```\n\nFinally add this code to your `tailwind.config.cjs` file:\n\nOn top:\n```js\nconst\n  fs = require('fs'),\n  path = require('path'),\n  Buffer = require('buffer').Buffer,\n  classesString = fs.readFileSync(path.resolve(__dirname, 'gutenberg-classes.txt'), 'utf8') ?? '',\n  classesBuffer = Buffer.from(classesString, 'base64') ?? false,\n  classes = classesBuffer ? classesBuffer.toString().split(' ') : []\n```\n\nAfter `content`:\n```js\n  safelist: classes,\n```\n\n**That's It!**\n\nYour gutenberg tailwind classes will automatically be added to the `tailwind.config.cjs` file and `yarn build:prod` will be executed everytime a post is executed (if new classes are found).\n\n## Todo\n- Create packagist package\n- Classes should be filtered for only tailwind classes with Regex, so only tailwind classes are added to the safelist (Help Wanted)\n- Different filtering will eventually be put in place for different versions of Tailwind (Help Wanted)\n\n## Bug Reports\n\nIf you discover a bug in Gutenberg Tailwind Safelist, please open an issue.\n\n## Contributing\n\nContributing whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated.\n\n## License\n\nGutenberg Tailwind Safelist is provided under the [MIT License](./LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbroskees%2Fgutenberg-tailwind-safelist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbroskees%2Fgutenberg-tailwind-safelist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbroskees%2Fgutenberg-tailwind-safelist/lists"}