From e008814b2ae4d6be7d3f73d81618994c48827b1f Mon Sep 17 00:00:00 2001 From: Shreedhar Hegde Date: Mon, 25 Apr 2022 16:25:10 +0530 Subject: [PATCH] modified docusaurus admonitions to docs --- docs/content/add-plugins/minio.md | 2 +- docs/content/add-plugins/s3.md | 2 +- docs/content/add-plugins/spaces.md | 2 +- docs/content/add-plugins/strapi.md | 6 ++++-- .../backend/payment/frontend-payment-flow-in-checkout.md | 9 +++++---- docs/content/how-to/deploying-admin-on-netlify.md | 2 +- docs/content/how-to/deploying-on-digital-ocean.md | 4 ++-- docs/content/how-to/deploying-on-heroku.md | 4 ++-- docs/content/how-to/deploying-on-qovery.md | 2 +- .../making-your-store-more-powerful-with-contentful.md | 2 +- docs/content/how-to/notification-api.md | 2 +- docs/content/how-to/uploading-images-to-minio.md | 2 +- docs/content/how-to/uploading-images-to-s3.md | 2 +- docs/content/how-to/uploading-images-to-spaces.md | 2 +- docs/content/quickstart/quick-start.md | 2 +- .../troubleshooting/transaction-error-in-checkout.md | 7 +++---- 16 files changed, 27 insertions(+), 25 deletions(-) diff --git a/docs/content/add-plugins/minio.md b/docs/content/add-plugins/minio.md index f5ef62d4fe..3053b7f007 100644 --- a/docs/content/add-plugins/minio.md +++ b/docs/content/add-plugins/minio.md @@ -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. diff --git a/docs/content/add-plugins/s3.md b/docs/content/add-plugins/s3.md index a7891fdeee..0fdf04a4bf 100644 --- a/docs/content/add-plugins/s3.md +++ b/docs/content/add-plugins/s3.md @@ -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. diff --git a/docs/content/add-plugins/spaces.md b/docs/content/add-plugins/spaces.md index cabe719814..7119db049a 100644 --- a/docs/content/add-plugins/spaces.md +++ b/docs/content/add-plugins/spaces.md @@ -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. diff --git a/docs/content/add-plugins/strapi.md b/docs/content/add-plugins/strapi.md index 0071a859fa..91f6e6c92d 100644 --- a/docs/content/add-plugins/strapi.md +++ b/docs/content/add-plugins/strapi.md @@ -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. diff --git a/docs/content/advanced/backend/payment/frontend-payment-flow-in-checkout.md b/docs/content/advanced/backend/payment/frontend-payment-flow-in-checkout.md index 9ffb6751ea..74131196af 100644 --- a/docs/content/advanced/backend/payment/frontend-payment-flow-in-checkout.md +++ b/docs/content/advanced/backend/payment/frontend-payment-flow-in-checkout.md @@ -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. diff --git a/docs/content/how-to/deploying-admin-on-netlify.md b/docs/content/how-to/deploying-admin-on-netlify.md index 92dc026869..c956b08c65 100644 --- a/docs/content/how-to/deploying-admin-on-netlify.md +++ b/docs/content/how-to/deploying-admin-on-netlify.md @@ -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. diff --git a/docs/content/how-to/deploying-on-digital-ocean.md b/docs/content/how-to/deploying-on-digital-ocean.md index 5cb96ac5d8..ecfb8a120e 100644 --- a/docs/content/how-to/deploying-on-digital-ocean.md +++ b/docs/content/how-to/deploying-on-digital-ocean.md @@ -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 diff --git a/docs/content/how-to/deploying-on-heroku.md b/docs/content/how-to/deploying-on-heroku.md index 778f8c2cc5..7695b94217 100644 --- a/docs/content/how-to/deploying-on-heroku.md +++ b/docs/content/how-to/deploying-on-heroku.md @@ -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. diff --git a/docs/content/how-to/deploying-on-qovery.md b/docs/content/how-to/deploying-on-qovery.md index a13cdd5cbc..811691a983 100644 --- a/docs/content/how-to/deploying-on-qovery.md +++ b/docs/content/how-to/deploying-on-qovery.md @@ -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. diff --git a/docs/content/how-to/making-your-store-more-powerful-with-contentful.md b/docs/content/how-to/making-your-store-more-powerful-with-contentful.md index 3a84340544..afb3a9a346 100644 --- a/docs/content/how-to/making-your-store-more-powerful-with-contentful.md +++ b/docs/content/how-to/making-your-store-more-powerful-with-contentful.md @@ -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. diff --git a/docs/content/how-to/notification-api.md b/docs/content/how-to/notification-api.md index 97ed5c5f8b..636928b1ba 100644 --- a/docs/content/how-to/notification-api.md +++ b/docs/content/how-to/notification-api.md @@ -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")` diff --git a/docs/content/how-to/uploading-images-to-minio.md b/docs/content/how-to/uploading-images-to-minio.md index 99afd814f1..a1debe2340 100644 --- a/docs/content/how-to/uploading-images-to-minio.md +++ b/docs/content/how-to/uploading-images-to-minio.md @@ -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. diff --git a/docs/content/how-to/uploading-images-to-s3.md b/docs/content/how-to/uploading-images-to-s3.md index 45163a0c83..2688fb54af 100644 --- a/docs/content/how-to/uploading-images-to-s3.md +++ b/docs/content/how-to/uploading-images-to-s3.md @@ -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. diff --git a/docs/content/how-to/uploading-images-to-spaces.md b/docs/content/how-to/uploading-images-to-spaces.md index a8416a0b57..46ffcab614 100644 --- a/docs/content/how-to/uploading-images-to-spaces.md +++ b/docs/content/how-to/uploading-images-to-spaces.md @@ -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. diff --git a/docs/content/quickstart/quick-start.md b/docs/content/quickstart/quick-start.md index 494b36331c..75a6db3794 100644 --- a/docs/content/quickstart/quick-start.md +++ b/docs/content/quickstart/quick-start.md @@ -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`. diff --git a/docs/content/troubleshooting/transaction-error-in-checkout.md b/docs/content/troubleshooting/transaction-error-in-checkout.md index f9d83d5e50..7ff59fbf38 100644 --- a/docs/content/troubleshooting/transaction-error-in-checkout.md +++ b/docs/content/troubleshooting/transaction-error-in-checkout.md @@ -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 -```