1.2.5 • Published 4 years ago

netlify-cms-widget-pathname v1.2.5

Weekly downloads
26
License
MIT
Repository
github
Last release
4 years ago

netlify-cms-widget-pathname

npm version Node.js CI License: MIT code style: prettier

This widget provides pathname validation and URL preview. This might be handy if you construct URL's based on input field. Check out the demo!

preview

Install

npm i netlify-cms-widget-pathname

or

yarn add netlify-cms-widget-pathname

Setup

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
1.2.5

4 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago