{"id":32612915,"url":"https://github.com/rubix-studios-pty-ltd/payload-dub","last_synced_at":"2026-04-08T08:01:14.287Z","repository":{"id":319261329,"uuid":"1078131883","full_name":"rubix-studios-pty-ltd/payload-dub","owner":"rubix-studios-pty-ltd","description":"A Payload CMS plugin that uses Dub to auto-create and manage shortlinks for published documents.","archived":false,"fork":false,"pushed_at":"2026-04-06T00:50:36.000Z","size":1155,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-06T02:32:04.860Z","etag":null,"topics":["dub","payload","payload-plugin","payloadcms","payloadcms-3","payloadcms-v3","plugin","shortlink","shortlinks","typescript"],"latest_commit_sha":null,"homepage":"https://rubixstudios.com.au/","language":"TypeScript","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/rubix-studios-pty-ltd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"rubixvi","buy_me_a_coffee":"rubixstudios"}},"created_at":"2025-10-17T08:57:27.000Z","updated_at":"2026-03-29T05:12:34.000Z","dependencies_parsed_at":"2025-10-18T16:36:44.835Z","dependency_job_id":null,"html_url":"https://github.com/rubix-studios-pty-ltd/payload-dub","commit_stats":null,"previous_names":["rubix-studios-pty-ltd/payload-dub"],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/rubix-studios-pty-ltd/payload-dub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubix-studios-pty-ltd%2Fpayload-dub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubix-studios-pty-ltd%2Fpayload-dub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubix-studios-pty-ltd%2Fpayload-dub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubix-studios-pty-ltd%2Fpayload-dub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubix-studios-pty-ltd","download_url":"https://codeload.github.com/rubix-studios-pty-ltd/payload-dub/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubix-studios-pty-ltd%2Fpayload-dub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31545906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["dub","payload","payload-plugin","payloadcms","payloadcms-3","payloadcms-v3","plugin","shortlink","shortlinks","typescript"],"created_at":"2025-10-30T14:58:23.543Z","updated_at":"2026-04-08T08:01:14.281Z","avatar_url":"https://github.com/rubix-studios-pty-ltd.png","language":"TypeScript","funding_links":["https://github.com/sponsors/rubixvi","https://buymeacoffee.com/rubixstudios"],"categories":[],"sub_categories":[],"readme":"# PayloadCMS + Dub Plugin\n\nA Payload CMS plugin that integrates with Dub to automatically create and manage shortlinks for your content.\nThis plugin synchronizes your Payload collections with Dub.co, ensuring that every published document gets a corresponding shortlink, tag, and color configuration.\n\n[![npm version](https://img.shields.io/npm/v/@rubixstudios/payload-dub.svg)](https://www.npmjs.com/package/@rubixstudios/payload-dub)\n![Release](https://github.com/rubix-studios-pty-ltd/payload-dub/actions/workflows/release.yml/badge.svg)\n\nDub is the modern, open-source link attribution platform for short links, conversion tracking, and affiliate programs.\n\nCreate a free Dub account: [Dub](https://refer.dub.co/rubixstudios)\n\n## Installation\n\n```sh\npnpm add @rubixstudios/payload-dub\n```\n\n```typescript\n// payload.config.ts\nimport { buildConfig } from 'payload/config'\nimport { payloadDub } from '@rubixstudios/payload-dub'\n\nexport default buildConfig({\n  plugins: [\n    payloadDub({\n      collections: [\n        { docs: 'posts', slugOverride: 'post' }, // Custom slug used for folder and shortlinks\n        { docs: 'insights', slugOverride: 'insight' }, // Custom slug only\n        { docs: 'news' }, // Default behavior\n      ],\n      dubApiKey: process.env.DUB_API_KEY!,\n      siteUrl: process.env.NEXT_PUBLIC_SITE_URL!,\n      domain: 'mycustomdomain.com', // Optional: assign a custom domain\n      tenantId: '12345', // Optional: tenant identifier for workspace\n      isPro: false, // Optional: pro flag to enable/disable pro features\n\n      // Optional: overrides of dubCollection\n      dubCollection: {\n        overrides: {\n          access: {\n            read: ({ req }) =\u003e !!req.user,\n            create: ({ req }) =\u003e !!req.user,\n          },\n          admin: {\n            group: 'Marketing',\n            defaultColumns: ['shortLink', 'externalId'],\n          },\n        },\n      },\n      dubTagCollection: {\n        overrides: {\n          access: {\n            read: ({ req }) =\u003e !!req.user,\n          },\n          admin: {\n            group: 'Marketing',\n            defaultColumns: ['name', 'color'],\n          },\n        },\n      },\n    }),\n  ],\n})\n```\n\n## Notes\n\nIf you do not provide optional overrides, the plugin defaults to:\n\n- Links readable by all\n- Tags are readable, editable, and deletable by all logged in users\n\n## Features\n\n- **Automation**: Generates and updates shortlinks when documents are published or slugs change.\n- **Folders**: Collections are organised in folders (Pro).\n- **Tags**: Tags can be created and removed directly in Payload.\n- **Sync**: Keeps Payload and Dub data consistent with minimal overhead.\n- **Configurable**: Supports per-collection overrides for color, slug, and URL base.\n- **Access Control**: Access, field and admin overrides for complete CMS control.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\nFor support or inquiries:\n\n- LinkedIn: [rubixvi](https://www.linkedin.com/in/rubixvi/)\n- Website: [Rubix Studios](https://rubixstudios.com.au)\n\n## Author\n\nRubix Studios Pty. Ltd.  \n[https://rubixstudios.com.au](https://rubixstudios.com.au)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubix-studios-pty-ltd%2Fpayload-dub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubix-studios-pty-ltd%2Fpayload-dub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubix-studios-pty-ltd%2Fpayload-dub/lists"}