Update CDN docs
This commit is contained in:
parent
9f70481064
commit
49bed27aa8
@ -49,7 +49,7 @@ In this example, we pull the `admin/index.html` file from a public CDN.
|
||||
</head>
|
||||
<body>
|
||||
<!-- Include the script that builds the page and powers Static CMS -->
|
||||
<script src="https://unpkg.com/@staticcms/core@%5E1.0.0/dist/static-cms-core.js"></script>
|
||||
<script src="https://unpkg.com/@staticcms/app@%5E1.0.0/dist/static-cms-app.js"></script>
|
||||
<script>
|
||||
window.CMS.init();
|
||||
</script>
|
||||
@ -57,7 +57,7 @@ In this example, we pull the `admin/index.html` file from a public CDN.
|
||||
</html>
|
||||
```
|
||||
|
||||
In the code above the `script` is loaded from the `unpkg` CDN. Should there be any issue, `jsDelivr` can be used as an alternative source. Simply set the `src` to `https://cdn.jsdelivr.net/npm/@staticcms/core@%5E1.0.0/dist/static-cms-core.js`
|
||||
In the code above the `script` is loaded from the `unpkg` CDN. Should there be any issue, `jsDelivr` can be used as an alternative source. Simply set the `src` to `https://cdn.jsdelivr.net/npm/@staticcms/app@%5E1.0.0/dist/static-cms-app.js`
|
||||
|
||||
## Configuration
|
||||
|
||||
|
@ -35,7 +35,7 @@ The following parameters will be passed to your `react_component` during render:
|
||||
### Example
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/@staticcms/core@%5E1.0.0/dist/static-cms-core.js"></script>
|
||||
<script src="https://unpkg.com/@staticcms/app@%5E1.0.0/dist/static-cms-app.js"></script>
|
||||
<script>
|
||||
const PostPreview = ({ widgetFor, getAsset, entry }) => {
|
||||
const [imageUrl, setImageUrl] = useState('');
|
||||
|
@ -123,7 +123,7 @@ Register widget takes an optional object of options. These options include:
|
||||
`admin/index.html`
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/@staticcms/core@%5E1.0.0/dist/static-cms-core.js"></script>
|
||||
<script src="https://unpkg.com/@staticcms/app@%5E1.0.0/dist/static-cms-app.js"></script>
|
||||
<script>
|
||||
const CategoriesControl = ({ label, value, field, onChange }) => {
|
||||
const separator = useMemo(() => field.separator ?? ', ', [field.separator]);
|
||||
|
@ -130,7 +130,7 @@ Your website is now deployed. Netlify provides you with a randomly generated dom
|
||||
</head>
|
||||
<body>
|
||||
<!-- Include the script that builds the page and powers Static CMS -->
|
||||
<script src="https://unpkg.com/@staticcms/core@%5E1.0.0/dist/static-cms-core.js"></script>
|
||||
<script src="https://unpkg.com/@staticcms/app@%5E1.0.0/dist/static-cms-app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
@ -77,7 +77,7 @@ In Hugo, static files that don't need to be processed by the build commands live
|
||||
</head>
|
||||
<body>
|
||||
<!-- Include the script that builds the page and powers Static CMS -->
|
||||
<script src="https://unpkg.com/@staticcms/core@%5E1.0.0/dist/static-cms-core.js"></script>
|
||||
<script src="https://unpkg.com/@staticcms/app@%5E1.0.0/dist/static-cms-app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
@ -37,7 +37,7 @@ Create a file `admin/index.html` in the root of your repo - it should look like
|
||||
</head>
|
||||
<body>
|
||||
<!-- Include the script that builds the page and powers Static CMS -->
|
||||
<script src="https://unpkg.com/@staticcms/core@%5E1.0.0/dist/static-cms-core.js"></script>
|
||||
<script src="https://unpkg.com/@staticcms/app@%5E1.0.0/dist/static-cms-app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
@ -118,7 +118,7 @@ In the newly created `index.html` we add scripts for Static CMS and the Netlify
|
||||
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script src="https://unpkg.com/@staticcms/core@%5E1.0.0/dist/static-cms-core.js" type="text/javascript"></script>
|
||||
<script src="https://unpkg.com/@staticcms/app@%5E1.0.0/dist/static-cms-app.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -158,7 +158,7 @@ Paste HTML for Static CMS into your `public/admin/index.html` file (check out th
|
||||
</head>
|
||||
<body>
|
||||
<!-- Include the script that builds the page and powers Static CMS -->
|
||||
<script src="https://unpkg.com/@staticcms/core@%5E1.0.0/dist/static-cms-core.js"></script>
|
||||
<script src="https://unpkg.com/@staticcms/app@%5E1.0.0/dist/static-cms-app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
@ -36,7 +36,7 @@ In the `static/` directory, create a new directory `admin/`. Inside that directo
|
||||
</head>
|
||||
<body>
|
||||
<!-- Include the script that builds the page and powers Static CMS -->
|
||||
<script src="https://unpkg.com/@staticcms/core@%5E1.0.0/dist/static-cms-core.js"></script>
|
||||
<script src="https://unpkg.com/@staticcms/app@%5E1.0.0/dist/static-cms-app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user