{"id":26451244,"url":"https://github.com/daun/statamic-bard-mutators","last_synced_at":"2026-02-17T12:03:43.957Z","repository":{"id":282313818,"uuid":"948183056","full_name":"daun/statamic-bard-mutators","owner":"daun","description":"A collection of mutators for transforming Statamic Bard content","archived":false,"fork":false,"pushed_at":"2026-02-13T07:39:03.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-13T14:54:06.055Z","etag":null,"topics":["bard","plugins","statamic"],"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/daun.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,"publiccode":null,"codemeta":null}},"created_at":"2025-03-13T22:19:47.000Z","updated_at":"2026-02-13T07:39:07.000Z","dependencies_parsed_at":"2025-03-13T23:13:29.059Z","dependency_job_id":null,"html_url":"https://github.com/daun/statamic-bard-mutators","commit_stats":null,"previous_names":["daun/statamic-bard-mutators"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/daun/statamic-bard-mutators","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daun%2Fstatamic-bard-mutators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daun%2Fstatamic-bard-mutators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daun%2Fstatamic-bard-mutators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daun%2Fstatamic-bard-mutators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daun","download_url":"https://codeload.github.com/daun/statamic-bard-mutators/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daun%2Fstatamic-bard-mutators/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29543382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T08:11:05.436Z","status":"ssl_error","status_checked_at":"2026-02-17T08:09:38.860Z","response_time":100,"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":["bard","plugins","statamic"],"created_at":"2025-03-18T16:39:46.390Z","updated_at":"2026-02-17T12:03:43.951Z","avatar_url":"https://github.com/daun.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧱  Statamic Bard Mutators\n\nA collection of mutators for transforming [Statamic Bard](https://statamic.dev/fieldtypes/bard) content.\n\nAll mutators are implemented as plugins for the [Bard Mutator Addon](https://statamic.com/addons/jacksleight/bard-mutator).\n\n## Installation\n\nInstall the package via composer:\n\n```bash\ncomposer require daun/statamic-bard-mutators\n```\n\n## Registration\n\nRegister any mutators you want to use from the `Mutator` facade. Options can be passed as arguments\nto the constructor. You can read more about\n[class-based mutator plugins](https://jacksleight.dev/docs/bard-mutator/plugins#class-based-plugins)\nin the addon readme.\n\n```php\nuse JackSleight\\StatamicBardMutator\\Facades\\Mutator;\nuse Daun\\BardMutators\\MarkExternalLinks;\n\nMutator::plugin(new MarkExternalLinks());\n```\n\n## Mutators\n\n### Mark External Links\n\nMark external links with `target=\"_blank\"` and `rel=\"external\"`.\n\n```html\n\u003c!-- Before --\u003e\n\u003ca href=\"https://example.com\"\u003eExternal link\u003c/a\u003e\n\n\u003c!-- After --\u003e\n\u003ca href=\"https://example.com\" target=\"_blank\" rel=\"external\"\u003eExternal link\u003c/a\u003e\n```\n\n```php\nnew MarkExternalLinks();\n\n// Optionally customize the `target` and `rel` attributes\nnew MarkExternalLinks(\n    target: '_blank',\n    rel: 'noopener noreferrer'\n);\n```\n\n### Mark Asset Links\n\nMark links to assets with `download=\"filename.ext\"`.\n\n```html\n\u003c!-- Before --\u003e\n\u003ca href=\"/assets/video.mp4\"\u003eDownload video\u003c/a\u003e\n\n\u003c!-- After --\u003e\n\u003ca href=\"/assets/video.mp4\" download=\"video.mp4\"\u003eDownload video\u003c/a\u003e\n```\n\n```php\nnew MarkAssetLinks();\n```\n\n### Generate Heading IDs\n\nAdds an `id` attribute to headings based on their content.\n\n```html\n\u003c!-- Before --\u003e\n\u003ch2\u003eHeading\u003c/h2\u003e\n\n\u003c!-- After --\u003e\n\u003ch2 id=\"heading\"\u003eHeading\u003c/h2\u003e\n```\n\n```php\nnew GenerateHeadingIds();\n\n// Customize heading levels to generate IDs for and add a prefix to generated IDs\nnew GenerateHeadingIds(\n    levels: [2, 3],\n    prefix: 'section-'\n);\n```\n\n### Semantic Blockquotes\n\nWraps blockquotes in a `figure` element and moves the author/source into a `figcaption` element.\n\n```html\n\u003c!-- Before --\u003e\n\u003cblockquote\u003e\n    \u003cp\u003eQuote\u003c/p\u003e\n    \u003cp\u003e— Author\u003c/p\u003e\n\u003c/blockquote\u003e\n\n\u003c!-- After --\u003e\n\u003cfigure\u003e\n    \u003cblockquote\u003e\n        \u003cp\u003eQuote\u003c/p\u003e\n    \u003c/blockquote\u003e\n    \u003cfigcaption\u003e\n        Author\n    \u003c/figcaption\u003e\n\u003c/figure\u003e\n```\n\n```php\nnew SemanticBlockquotes();\n\n// Optionally add a class to the figure element\nnew SemanticBlockquotes(\n    class: 'quote'\n);\n```\n\n## Wrap Tables\n\nWraps tables in a `div` element to allow for horizontal scrolling on smaller screens.\n\n```html\n\u003c!-- Before --\u003e\n\u003ctable\u003e...\u003c/table\u003e\n\n\u003c!-- After --\u003e\n\u003cdiv class=\"table-wrapper\"\u003e\n    \u003ctable\u003e...\u003c/table\u003e\n\u003c/div\u003e\n```\n\n```php\nnew WrapTables();\n\n// Optionally use a custom tag or add a class to the wrapper element\nnew WrapTables(\n    tag: 'section',\n    class: 'table'\n);\n```\n\n## Remove List Item Paragraphs\n\nRemove the paragraphs that tiptap automatically adds inside list items.\n\n```html\n\u003c!-- Before --\u003e\n\u003cli\u003e\n    \u003cp\u003eList item\u003c/p\u003e\n\u003c/li\u003e\n\n\u003c!-- After --\u003e\n\u003cli\u003e\n    List item\n\u003c/li\u003e\n```\n\n```php\nnew RemoveListItemParagraphs();\n```\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaun%2Fstatamic-bard-mutators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaun%2Fstatamic-bard-mutators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaun%2Fstatamic-bard-mutators/lists"}