-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from microcmsio/docs/self-hosting
ファイルの利用方法の案内の整備
- Loading branch information
Showing
1 changed file
with
21 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,9 @@ It helps you to use microCMS from JavaScript and Node.js applications. | |
|
||
### Install | ||
|
||
Install npm package. | ||
#### Node.js | ||
|
||
> [!IMPORTANT] | ||
> v3.0.0 or later requires Node.js **v18 or higher**. | ||
Install npm package. | ||
|
||
```bash | ||
$ npm install microcms-js-sdk | ||
|
@@ -21,17 +20,32 @@ or | |
$ yarn add microcms-js-sdk | ||
``` | ||
|
||
> [!WARNING] | ||
> The hosting service (unpkg.com) is not related to microCMS. For production use, we recommend self-hosting on your own server. | ||
> [!IMPORTANT] | ||
> v3.0.0 or later requires Node.js **v18 or higher**. | ||
#### Browser(Self-hosting) | ||
|
||
Download and unzip `microcms-js-sdk-x.y.z.tgz` from the [releases page](https://github.com/microcmsio/microcms-js-sdk/releases). Then, host it on any server of your choice and use it. The target file is `./dist/umd/microcms-js-sdk.js`. | ||
|
||
```html | ||
<script src="https://unpkg.com/[email protected]/dist/umd/microcms-js-sdk.js"></script> | ||
<script src="./microcms-js-sdk.js"></script> | ||
``` | ||
|
||
#### Browser(CDN) | ||
|
||
Please load and use the URL provided by an external provider. | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/microcms-js-sdk.min.js"></script> | ||
|
||
or | ||
|
||
<script src="https://unpkg.com/microcms-js-sdk@latest/dist/umd/microcms-js-sdk.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/microcms-js-sdk/dist/umd/microcms-js-sdk.min.js"></script> | ||
``` | ||
|
||
> [!WARNING] | ||
> The hosting service (unpkg.com) is not related to microCMS. For production use, we recommend self-hosting on your own server. | ||
### How to use | ||
|
||
First, create a client. | ||
|