{"id":27729919,"url":"https://github.com/clean-commit/decap-cms-widget-permalink","last_synced_at":"2025-04-28T05:01:59.909Z","repository":{"id":57701776,"uuid":"501278934","full_name":"clean-commit/decap-cms-widget-permalink","owner":"clean-commit","description":"Permalink widget for Netlify CMS","archived":false,"fork":false,"pushed_at":"2024-09-18T12:33:49.000Z","size":166,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T16:56:58.343Z","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-08T14:09:54.000Z","updated_at":"2025-02-22T18:11:00.000Z","dependencies_parsed_at":"2024-09-19T01:08:43.714Z","dependency_job_id":"9bc662f5-7741-4e4d-9bc9-8893a16e642a","html_url":"https://github.com/clean-commit/decap-cms-widget-permalink","commit_stats":null,"previous_names":["clean-commit/decap-cms-widget-permalink","clean-commit/netlify-cms-widget-permalink"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clean-commit%2Fdecap-cms-widget-permalink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clean-commit%2Fdecap-cms-widget-permalink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clean-commit%2Fdecap-cms-widget-permalink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clean-commit%2Fdecap-cms-widget-permalink/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-permalink/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251254262,"owners_count":21559791,"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:29.749Z","updated_at":"2025-04-28T05:01:59.814Z","avatar_url":"https://github.com/clean-commit.png","language":"JavaScript","funding_links":[],"categories":["Custom Widget"],"sub_categories":[],"readme":"# Decap CMS Permalink Widget\n\nDecap CMS Widget that allows you to create customizable permalinks easily.\n\nWidgets are inputs for the Netlify 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![Permalink widget](./assets/ezgif-5-f5c945ae99.gif)\n\n## Installation\n\n1. Install the widget\n\n```\nnpm install decap-cms-widget-permalink\nyarn add decap-cms-widget-permalink\n```\n\n2. Import the Permalink widget to your Netlify CMS setup file\n\n```\nimport { Widget as PermalinkWidget } from 'decap-cms-widget-permalink';\n```\n\n3. Register the widget for use\n\n```\nCMS.registerWidget(PermalinkWidget);\n```\n\n## Usage details\n\nInside the YML collecitons file you can use `permalink` 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: \"Permalink\",\n        name: \"permalink\",\n        widget: \"permalink\",\n        prefix: 'blog', // This allows to add a prefix to the correct url\n        url: 'http://example.com'\n```\n\nYou can also use it as a JS object using Netlify CMS [Manual Initialization](https://www.netlifycms.org/docs/beta-features/#manual-initialization)\n\nExample:\n\n```\n{\n  label: 'Permalink',\n  name: 'permalink',\n  widget: 'permalink',\n  required: true,\n  prefix: 'blog', // This allows to add a prefix to the correct url\n  url: 'http://localhost:8000',\n  hint: 'The post URL (do not include folder or file extension)',\n},\n```\n\nThis widget is using 2 custom items:\n`url` -\u003e is used to visualize and link to the page\n`prefix` -\u003e is used when you want to prefix some pages (i.e. `blog` will output -\u003e `/blog/your-slug/`)\n\n### Additional guides\n\n- [ID Widget for Decap CMS](https://github.com/clean-commit/decap-cms-widget-id)\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-permalink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclean-commit%2Fdecap-cms-widget-permalink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclean-commit%2Fdecap-cms-widget-permalink/lists"}