{"id":16696576,"url":"https://github.com/karolis-sh/netlify-cms-widget-pathname","last_synced_at":"2025-04-10T02:41:36.487Z","repository":{"id":65456919,"uuid":"159946053","full_name":"karolis-sh/netlify-cms-widget-pathname","owner":"karolis-sh","description":"Pathname input widget for Netlify CMS","archived":false,"fork":false,"pushed_at":"2020-10-14T21:29:38.000Z","size":1983,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T08:46:11.044Z","etag":null,"topics":["cms","gatsby","netlify","netlify-cms","pathname","react","url","widget"],"latest_commit_sha":null,"homepage":"https://netlify-cms-widget-pathname.netlify.com","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/karolis-sh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-01T13:13:10.000Z","updated_at":"2021-05-24T02:41:02.000Z","dependencies_parsed_at":"2023-01-24T12:01:05.444Z","dependency_job_id":null,"html_url":"https://github.com/karolis-sh/netlify-cms-widget-pathname","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karolis-sh%2Fnetlify-cms-widget-pathname","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karolis-sh%2Fnetlify-cms-widget-pathname/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karolis-sh%2Fnetlify-cms-widget-pathname/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karolis-sh%2Fnetlify-cms-widget-pathname/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karolis-sh","download_url":"https://codeload.github.com/karolis-sh/netlify-cms-widget-pathname/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248144940,"owners_count":21055010,"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":["cms","gatsby","netlify","netlify-cms","pathname","react","url","widget"],"created_at":"2024-10-12T17:44:09.925Z","updated_at":"2025-04-10T02:41:36.454Z","avatar_url":"https://github.com/karolis-sh.png","language":"JavaScript","funding_links":[],"categories":["Custom Widget"],"sub_categories":[],"readme":"# netlify-cms-widget-pathname\n\n[![npm version][version-badge]][version]\n![Node.js CI](https://github.com/karolis-sh/netlify-cms-widget-pathname/workflows/Node.js%20CI/badge.svg)\n[![License: MIT][license-badge]][license]\n[![code style: prettier][code-style-badge]][code-style]\n\nThis widget provides pathname validation and URL preview. This might be handy if\nyou construct URL's based on input field. Check out [the demo](https://netlify-cms-widget-pathname.netlify.com/demo)!\n\n![preview](docs/preview.png)\n\n## Install\n\n```shell\nnpm i netlify-cms-widget-pathname\n```\n\nor\n\n```shell\nyarn add netlify-cms-widget-pathname\n```\n\n## Setup\n\n```js\nimport { PathnameControl, PathnamePreview } from 'netlify-cms-widget-pathname';\n\nCMS.registerWidget('pathname', PathnameControl, PathnamePreview);\n```\n\n## How to use\n\nAdd to your Netlify CMS configuration:\n\n```yaml\nfields:\n  - name: pathname\n    label: Page pathname\n    widget: pathname\n```\n\n## Configuration\n\nYou can customize the preview of the URL with these options:\n\n- `url_prefix` - add a prefix for the pathname\n\n```yaml\nfields:\n  - name: pathname\n    label: Page pathname\n    widget: pathname\n    url_prefix: /blog\n```\n\n- `url_origin` - customize the URL's origin (default is `window.location.origin`)\n\n```yaml\nfields:\n  - name: pathname\n    label: Page pathname\n    widget: pathname\n    url_origin: https://github.com\n```\n\n[version-badge]: https://badge.fury.io/js/netlify-cms-widget-pathname.svg\n[version]: https://www.npmjs.com/package/netlify-cms-widget-pathname\n[license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg\n[license]: https://opensource.org/licenses/MIT\n[code-style-badge]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg\n[code-style]: https://github.com/prettier/prettier\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarolis-sh%2Fnetlify-cms-widget-pathname","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarolis-sh%2Fnetlify-cms-widget-pathname","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarolis-sh%2Fnetlify-cms-widget-pathname/lists"}