Get unlimited public & private packages + team-based management with npm Teams.Learn more »

netlify-cms-widget-pathname

1.2.4 • Public • Published

netlify-cms-widget-pathname

Check out the demo!

This widget provides pathname validation and url preview. This might be handy if you construct url's based on input field.

npm version Build Status module formats: cjs License: MIT

semantic-release code style: prettier

preview

Install

As an npm package:

npm install --save netlify-cms-widget-pathname
import { PathnameControl, PathnamePreview } from 'netlify-cms-widget-pathname';
 
CMS.registerWidget('pathname', PathnameControl, PathnamePreview);

How to use

Add to your Netlify CMS configuration:

fields:
  name: pathname
    label: Page pathname
    widget: pathname

Configuration

You can customize the preview of the url with these options:

  • url_prefix - add a prefix for the pathname
fields:
  name: pathname
    label: Page pathname
    widget: pathname
    url_prefix: /blog
  • url_origin - customize the url's origin (default is window.location.origin)
fields:
  name: pathname
    label: Page pathname
    widget: pathname
    url_origin: https://github.com

License

MIT

Support

For help with this widget, open an issue or ask the Netlify CMS community in Gitter.

Install

npm i netlify-cms-widget-pathname

DownloadsWeekly Downloads

98

Version

1.2.4

License

MIT

Unpacked Size

21.8 kB

Total Files

9

Last publish

Collaborators

  • avatar