added docusaurus admonitions to docs

This commit is contained in:
Shreedhar Hegde
2022-04-22 20:01:57 +05:30
parent eee780f110
commit 01114b42a4
25 changed files with 242 additions and 60 deletions
+5 -1
View File
@@ -46,7 +46,11 @@ Then configure your `medusa-config.js` to include the plugin alongside the requi
The two access keys in the options are the ones created in the previous section.
> Make sure to use an environment variable for the secret key in a live environment.
:::note
Make sure to use an environment variable for the secret key in a live environment.
:::
### Try it out
+5 -1
View File
@@ -78,7 +78,11 @@ https://[bucket].s3.[region].amazonaws.com
The two access keys in the options are the ones created in the previous section.
> Make sure to use an environment variable for the secret key in a live environment.
:::note
Make sure to use an environment variable for the secret key in a live environment.
:::
### Try it out
+5 -1
View File
@@ -21,7 +21,11 @@ Common integration use cases that can be implemented with Segment include:
## Adding Segment to your Medusa store
> Note: you should create a [Node.js source in Segment](https://segment.com/docs/connections/sources/catalog/libraries/server/node/quickstart/) in order to obtain the write key that will be provided in the plugin options.
:::note
You should create a [Node.js source in Segment](https://segment.com/docs/connections/sources/catalog/libraries/server/node/quickstart/) in order to obtain the write key that will be provided in the plugin options.
:::
Plugins in Medusa's ecosystem come as separate npm packages, that can be installed from the npm registry.
+5 -1
View File
@@ -47,7 +47,11 @@ Then configure your `medusa-config.js` to include the plugin alongside the requi
In the above options, a `spaces_url` is included. This can be found in your Space overview. The `bucket` should point to the name you gave your Space. The `endpoint` identifies the region in which you created the Space. And finally the two keys are the ones created in the previous section.
> Make sure to use an environment variable for the secret key in a live environment.
:::note
Make sure to use an environment variable for the secret key in a live environment.
:::
### Try it out!
+21 -5
View File
@@ -37,7 +37,11 @@ Alternatively, using Yarn:
yarn create medusa-app
```
> When choosing `npx` you are shown different store engine options as part of the setup. For this Strapi tutorial, you should choose `medusa-starter-default`. Optionally, pick a storefront.
:::note
When choosing `npx` you are shown different store engine options as part of the setup. For this Strapi tutorial, you should choose `medusa-starter-default`. Optionally, pick a storefront.
:::
**Use `medusa-cli`**
`@medusajs/medusa-cli` is our Command Line Tool for creating the Medusa store engine (alongside many other powerful commands). First, install it:
@@ -116,13 +120,19 @@ Alternatively, using Yarn:
yarn global add create-strapi-app@3.6.8
create-strapi-app strapi-medusa --template https://github.com/Deathwish98/strapi-medusa-template.git
```
:::note
> Note: The plugin expects node version to be '>= 10.16.0 and <=14.x.x', otherwise it will throw an error.
The plugin expects node version to be '>= 10.16.0 and <=14.x.x', otherwise it will throw an error.
:::
After running the command, you have a full Strapi project configured to synchronize with Medusa. Upon the initial start of the Strapi server, all the required models will be created. They will correlate with models from Medusa to allow for two-way synchronization.
> Note: The Strapi template starter uses SQLite as the default database. There is a known bug related to `knex.js` that comes from multiple write connections. Restarting the Strapi server should make the error disappear.
:::note
The Strapi template starter uses SQLite as the default database. There is a known bug related to `knex.js` that comes from multiple write connections. Restarting the Strapi server should make the error disappear.
:::
**Synchronization**
@@ -134,7 +144,11 @@ When products are created in Medusa, the two-way communication ensures that data
**Variants**: title
**Region**: name
> Further down the road, the support for synchronizing more entities is expected to be introduced
:::note
Further down the road, the support for synchronizing more entities is expected to be introduced
:::
**Using Postgres in Medusa (optional)**
@@ -158,7 +172,9 @@ projectConfig: {
},
```
> Note: the `DATABASE_URL` variable should use the Postgres database created in the previous step
:::note
The `DATABASE_URL` variable should use the Postgres database created in the previous step
## Summary and next steps