modified docusaurus admonitions to docs

This commit is contained in:
Shreedhar Hegde
2022-04-25 16:25:10 +05:30
parent 1241fb7b2c
commit e008814b2a
16 changed files with 27 additions and 25 deletions

View File

@@ -46,7 +46,7 @@ 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.
:::note
:::tip
Make sure to use an environment variable for the secret key in a live environment.

View File

@@ -78,7 +78,7 @@ https://[bucket].s3.[region].amazonaws.com
The two access keys in the options are the ones created in the previous section.
:::note
:::tip
Make sure to use an environment variable for the secret key in a live environment.

View File

@@ -47,7 +47,7 @@ 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.
:::note
:::tip
Make sure to use an environment variable for the secret key in a live environment.

View File

@@ -128,7 +128,7 @@ The plugin expects node version to be '>= 10.16.0 and <=14.x.x', otherwise it wi
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
:::caution
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.
@@ -172,10 +172,12 @@ projectConfig: {
},
```
:::note
:::tip
The `DATABASE_URL` variable should use the Postgres database created in the previous step
:::
## Summary and next steps
You are now provided with the toolbox for creating amazing digital commerce experiences on top of a highly extendable CMS system and ecommerce platform.

View File

@@ -3,16 +3,17 @@
## Introduction
The purpose of this guide is to describe a checkout flow in Medusa. It is assumed that you've completed our [Quickstart](https://docs.medusajs.com/quickstart/quick-start) or [Tutorial](https://docs.medusajs.com/tutorial/set-up-your-development-environment) and are familiar with the technologies we use in our stack. Additionally, having an understanding of the [core API](https://docs.medusajs.com/api/store/auth) would serve as a great foundation for this walkthrough.
```bash npm2yarn
npm install @medusajs/medusa-js
```
:::note
All code snippets in the following guide, use the JS SDK distributed through **npm**. To install it, run:
:::
```bash npm2yarn
npm install @medusajs/medusa-js
```
## Glossary
- **Cart**: The Cart contains all the information needed for customers to complete an Order. In the Cart customers gather the items they wish to purchase, they add shipping and billing details and complete payment information.
- **LineItem**: Line Items represent an expense added to a Cart. Typically this will be a Product Variant and a certain quantity of the same variant. Line Items hold descriptive fields that help communicate its contents and price.

View File

@@ -66,7 +66,7 @@ git push origin main
Within a couple of minutes, your Medusa Admin is live and running on Netlify.
:::note
:::tip
If you experience CORS issues in your new setup, you might need to add your admin url as part of the ADMIN_CORS environment variable in your server setup.

View File

@@ -87,7 +87,7 @@ Navigate to the top-right dropdown **Create** and select **Apps**.
Choose **GitHub** or **GitLab** and select the repository that holds your Medusa project. Check **Autodeploy code changes**, if you want DigitalOcean to deploy on every push to your repository.
:::note
:::tip
It's important, that DigitalOcean is pointing to the directory holding the Medusa store engine as it is only this which that will be deployed (If you followed the quickstart guide this will simply be the created project, and if you used the npx command this will be the backend folder inside of the newly created project).
@@ -108,7 +108,7 @@ JWT_SECRET=your-jwt-secret
COOKIE_SECRET=your-cookie-secret
```
:::note
:::tip
Make sure to use actual secrets in a production environment

View File

@@ -68,7 +68,7 @@ heroku git:remote -a medusa-test-app
Medusa requires a Postgres database and a Redis instance to work. These are added through the Heroku CLI using the following commands.
:::note
:::tip
In this below example, we initialize the resources on free plans. This is not a valid configuration for a production environment.
@@ -110,7 +110,7 @@ heroku config:set JWT_SECRET=your-super-secret
heroku config:set COOKIE_SECRET=your-super-secret-pt2
heroku config:set NPM_CONFIG_PRODUCTION=false
```
:::note
:::tip
Make sure to use actual secrets in a production environment.

View File

@@ -87,7 +87,7 @@ JTW_SECRET=something_secret_jwt
COOKIE_SECRET=something_secret_cookie
```
:::note
:::tip
Make sure to use actual secrets in a production environment.

View File

@@ -76,7 +76,7 @@ npm run migrate:contentful --file contentful-migrations/update-page-module-valid
To use your new Rich Text module **Content > Page > About**, and click **Add Content > Page**. You will now make use of the new Rich Text module to add some more details about your store. You can write your own text or use the text provided below if you just want to copy/paste.
:::note About Medusa
:::info About Medusa
Medusa is an open-source headless commerce engine for fast-growing businesses. Getting started with Medusa is very easy and you will be able to start selling online with a basic setup in no time, however, the real power of Medusa starts showing up when you add custom functionality and extend your core to fit your needs.

View File

@@ -77,7 +77,7 @@ class MyService extends NotificationService {
export default MyService;
```
:::note Note
:::note
A notification service must have a static property called `identifier` this is used to determine which classes are called when subscribing to different events. In this case the service identifier is `my-service` so to subscribe to notifications you must use:
`notificationService.subscribe([eventname], "my-service")`

View File

@@ -46,7 +46,7 @@ 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.
:::note
:::tip
Make sure to use an environment variable for the secret key in a live environment.

View File

@@ -78,7 +78,7 @@ https://[bucket].s3.[region].amazonaws.com
The two access keys in the options are the ones created in the previous section.
:::note
:::tip
Make sure to use an environment variable for the secret key in a live environment.

View File

@@ -41,7 +41,7 @@ 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.
:::note
:::tip
Make sure to use an environment variable for the secret key in a live environment.

View File

@@ -50,7 +50,7 @@ We have created two starters for you that can help you lay a foundation for your
- [Nextjs Starter](https://github.com/medusajs/nextjs-starter-medusa)
- [Gatsby Starter](https://github.com/medusajs/gatsby-starter-medusa)
:::note
:::tip
Medusa runs on port 9000 by default and the storefront starters are both configured to run on port 8000. If you wish to run your storefront starter on another port you should update your CORS settings in your project's `medusa-config.js`.

View File

@@ -34,12 +34,11 @@ module.exports = {
}
```
```bash npm2yarn
npm run seed
```
:::note
When changing from SQLite to Postgres, you should seed the database again using:
:::
```bash npm2yarn
npm run seed
```