{"id":27729910,"url":"https://github.com/clean-commit/decap-cms-widget-id","last_synced_at":"2025-04-28T05:01:53.748Z","repository":{"id":105137975,"uuid":"501807508","full_name":"clean-commit/decap-cms-widget-id","owner":"clean-commit","description":"Netlify CMS ID widget for creating unique IDs for content","archived":false,"fork":false,"pushed_at":"2024-09-18T11:06:42.000Z","size":100,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T15:48:07.232Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/clean-commit.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-06-09T21:02:23.000Z","updated_at":"2025-01-15T05:29:30.000Z","dependencies_parsed_at":"2023-03-13T14:48:36.867Z","dependency_job_id":null,"html_url":"https://github.com/clean-commit/decap-cms-widget-id","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clean-commit%2Fdecap-cms-widget-id","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clean-commit%2Fdecap-cms-widget-id/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clean-commit%2Fdecap-cms-widget-id/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clean-commit%2Fdecap-cms-widget-id/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clean-commit","download_url":"https://codeload.github.com/clean-commit/decap-cms-widget-id/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251230556,"owners_count":21556114,"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-04-28T05:01:28.988Z","updated_at":"2025-04-28T05:01:53.632Z","avatar_url":"https://github.com/clean-commit.png","language":"JavaScript","funding_links":[],"categories":["Custom Widget"],"sub_categories":[],"readme":"# Decap CMS ID Widget\n\nDecap CMS Widget that allows you to create permanent IDs for your content.\n\nWidgets are inputs for the Decap CMS editor interface. It's a React component that receives user input and outputs a serialized value.\n\nThis widget allows you to create custom permalinks that can be used to generate pathnames for Decap CMS based websites. The widget mimics the behaviour of WordPress permalink input field automatically outputting correct slugs.\n\n![ID widget](./assets/netlify-cms-widget-id.png)\n\n## Installation\n\n1. Install the widget\n\n```\nnpm install decap-cms-widget-id\nyarn add decap-cms-widget-id\n```\n\n2. Import the Permalink widget to your Netlify CMS setup file\n\n```\nimport { Widget as IdWidget } from 'decap-cms-widget-id';\n```\n\n3. Register the widget for use\n\n```\nCMS.registerWidget(IdWidget);\n```\n\n## Usage details\n\nInside the YML collecitons file you should `uuid` as new widget\n\n```\ncollections:\n  - name: \"example\"\n    label: \"Example\"\n    folder: \"/path/to/your/folder\"\n    create: true\n    slug: \"{{slug}}\"\n    fields:\n      - label: \"ID\",\n        name: \"id\",\n        widget: \"uuid\",\n        prefix: 'post', // This allows to add a prefix to the ID\n```\n\nYou can also use it as a JS object using Netlify CMS [Manual Initialization](https://decapcms.org/docs/manual-initialization/)\n\nExample:\n\n```\n{\n  label: 'ID',\n  name: 'id',\n  widget: 'uuid'\n  prefix: 'post', // This allows to add a prefix to the ID\n},\n```\n\nThis widget fields:\n\n- `prefix` -\u003e is used when you want to prefix IDs within the collection\n\n### Additional guides\n\n- [Permalink widget for Decap CMS](https://github.com/clean-commit/decap-cms-widget-permalink)\n- [Efficient Netlify CMS config with Manual Initialization](https://mrkaluzny.com/blog/dry-decap-cms-config-with-manual-initialization/?utm_source=GitHub\u0026utm_medium=henlo-gatsby)\n- [How to optimize SEO with Gatsby \u0026 Netlify CMS](https://mrkaluzny.com/blog/how-to-optimize-seo-with-gatsby-netlify?utm_source=GitHub\u0026utm_medium=henlo-gatsby)\n- [Full text search with Gatsby \u0026 Decap CMS](https://mrkaluzny.com/blog/full-text-search-with-gatsby-and-decap-cms?utm_source=GitHub\u0026utm_medium=henlo-gatsby)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclean-commit%2Fdecap-cms-widget-id","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclean-commit%2Fdecap-cms-widget-id","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclean-commit%2Fdecap-cms-widget-id/lists"}