diff --git a/docs/content/advanced/backend/payment/overview.md b/docs/content/advanced/backend/payment/overview.md index c65119176a..a34c19e4e3 100644 --- a/docs/content/advanced/backend/payment/overview.md +++ b/docs/content/advanced/backend/payment/overview.md @@ -127,4 +127,4 @@ This prevents any payment issues from occurring with the customers and allows fo ## What’s Next 🚀 - [Check out how the checkout flow is implemented on the frontend.](./frontend-payment-flow-in-checkout.md) -- Check out payment plugins like [Stripe](../../../add-plugins/stripe.md), [Paypal](../../../add-plugins/paypal.md), and [Klarna](../../../add-plugins/klarna.md). +- Check out payment plugins like [Stripe](../../../add-plugins/stripe.md), [Paypal](/add-plugins/paypal), and [Klarna](../../../add-plugins/klarna.md). diff --git a/packages/medusa-file-minio/README.md b/packages/medusa-file-minio/README.md index 3ce9cae6c0..e2fb95f7fc 100644 --- a/packages/medusa-file-minio/README.md +++ b/packages/medusa-file-minio/README.md @@ -2,13 +2,15 @@ Upload files to a MinIO server. +Learn more about how you can use this plugin in the [documentation](https://docs.medusajs.com/add-plugins/minio). + ## Options -``` - endpoint: [endpoint of your MinIO server], - bucket: [name of your bucket], - access_key_id: [access-key], - secret_access_key: [secret-access-key], -``` - -Follow [this guide](https://docs.medusa-commerce.com/how-to/uploading-images-to-minio) to configure the plugin. +```js +{ + endpoint: "minio.server.com", + bucket: "test", + access_key_id: "YOUR-ACCESS-KEY", + secret_access_key: "YOUR-SECRET-KEY", +} +``` \ No newline at end of file diff --git a/packages/medusa-file-s3/README.md b/packages/medusa-file-s3/README.md index d7b22d3355..7308e66145 100644 --- a/packages/medusa-file-s3/README.md +++ b/packages/medusa-file-s3/README.md @@ -2,14 +2,16 @@ Upload files to an AWS S3 bucket. +Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/s3). + ## Options +```js +{ + s3_url: "https://s3-guide-test.s3.eu-west-1.amazonaws.com", + bucket: "test", + region: "eu-west-1" + access_key_id: "YOUR-ACCESS-KEY", + secret_access_key: "YOUR-SECRET-KEY", +} ``` - s3_url: [url of your s3 bucket], - access_key_id: [access-key], - secret_access_key: [secret-access-key], - bucket: [name of your bucket], - region: [region of your bucket], -``` - -Follow [this guide](https://docs.medusajs.com/how-to/uploading-images-to-s3) to configure the plugin. diff --git a/packages/medusa-file-spaces/README.md b/packages/medusa-file-spaces/README.md index ea1a72e246..9cf6ef2059 100644 --- a/packages/medusa-file-spaces/README.md +++ b/packages/medusa-file-spaces/README.md @@ -2,14 +2,16 @@ Upload files to a DigitalOcean Space. +Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/spaces). + ## Options +```js +{ + spaces_url: "https://test.fra1.digitaloceanspaces.com", + bucket: "test", + endpoint: "fra1.digitaloceanspaces.com", + access_key_id: "YOUR-ACCESS-KEY", + secret_access_key: "YOUR-SECRET-KEY", +} ``` - spaces_url: [url of your DigitalOcean space], - access_key_id: [access-key], - secret_access_key: [secret-access-key], - bucket: [name of your bucket], - endpoint: [endpoint of you DigitalOcean space], -``` - -Follow [this guide](https://docs.medusajs.com/how-to/uploading-images-to-spaces) to configure the plugin. diff --git a/packages/medusa-payment-paypal/README.md b/packages/medusa-payment-paypal/README.md index 777be3ed58..6cc1d6753f 100644 --- a/packages/medusa-payment-paypal/README.md +++ b/packages/medusa-payment-paypal/README.md @@ -1,11 +1,16 @@ # medusa-payment-paypal +Add PayPal as a Payment Provider. + +Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/paypal). + ## Options +```js +{ + sandbox: true, //default false + client_id: "CLIENT_ID", // REQUIRED + client_secret: "CLIENT_SECRET", // REQUIRED + auth_webhook_id: "WEBHOOK_ID" //REQUIRED for webhook to work +} ``` -sandbox: [default: false], -client_id: "CLIENT_ID", REQUIRED -client_secret: "CLIENT_SECRET", REQUIRED -auth_webhook_id: REQUIRED for webhook to work -``` - diff --git a/packages/medusa-payment-stripe/README.md b/packages/medusa-payment-stripe/README.md new file mode 100644 index 0000000000..78b2ed7ee0 --- /dev/null +++ b/packages/medusa-payment-stripe/README.md @@ -0,0 +1,14 @@ +# medusa-payment-stripe + +Add Stripe as a Payment Provider. + +Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/stripe). + +## Options + +```js +{ + api_key: "STRIPE_API_KEY", + webhook_secret: "STRIPE_WEBHOOK_SECRET", +} +``` diff --git a/packages/medusa-plugin-algolia/README.md b/packages/medusa-plugin-algolia/README.md index 741b0b5fbc..5d726623ec 100644 --- a/packages/medusa-plugin-algolia/README.md +++ b/packages/medusa-plugin-algolia/README.md @@ -1,10 +1,12 @@ # medusa-plugin-algolia -algolia Plugin for Medusa to search for products. +Algolia Plugin for Medusa to search for products. -## Plugin Options +Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/algolia). -``` +## Options + +```js { application_id: "someId", admin_api_key: "someApiKey", diff --git a/packages/medusa-plugin-contentful/README.md b/packages/medusa-plugin-contentful/README.md new file mode 100644 index 0000000000..aace02037c --- /dev/null +++ b/packages/medusa-plugin-contentful/README.md @@ -0,0 +1,15 @@ +# medusa-payment-contentful + +Integrate Contentful with Medusa for rich CMS functionalities. + +Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/contentful). + +## Options + +```js +{ + space_id: "CONTENTFUL_SPACE_ID", + access_token: "CONTENTFUL_ACCESS_TOKEN", + environment: "CONTENTFUL_ENV", +} +``` diff --git a/packages/medusa-plugin-mailchimp/README.md b/packages/medusa-plugin-mailchimp/README.md index ff000529f3..7dbb50e162 100644 --- a/packages/medusa-plugin-mailchimp/README.md +++ b/packages/medusa-plugin-mailchimp/README.md @@ -2,12 +2,14 @@ Mailchimp plugin for Medusa that supports newsletter subscriptions. -## Plugin Options +Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/mailchimp). -``` +## Options + +```js { - api_key: [your mailchimp api key] (required), - newsletter_list_id: ["123456789"] (required) + api_key: "MAILCHIMP_API_KEY", + newsletter_list_id: ["123456789"] } ``` diff --git a/packages/medusa-plugin-meilisearch/README.md b/packages/medusa-plugin-meilisearch/README.md index b4055107f5..a2f81bfbff 100644 --- a/packages/medusa-plugin-meilisearch/README.md +++ b/packages/medusa-plugin-meilisearch/README.md @@ -2,15 +2,17 @@ Meilisearch Plugin for Medusa to search for products. -## Plugin Options +Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/meilisearch). -``` +## Options + +```js { config: { - host: [your meilisearch host], + host: "[your meilisearch host]", }, settings: { - [indexName]: [meilisearch settings passed to meilisearch's `updateSettings()` method] + "[indexName]": "[meilisearch settings passed to meilisearch's `updateSettings()` method]" // example products: { searchableAttributes: ["title", "description", "variant_sku", "type_value"], diff --git a/packages/medusa-plugin-sendgrid/README.md b/packages/medusa-plugin-sendgrid/README.md index a6aa8d808f..0c21577410 100644 --- a/packages/medusa-plugin-sendgrid/README.md +++ b/packages/medusa-plugin-sendgrid/README.md @@ -2,30 +2,32 @@ Sendgrid Plugin for Medusa to send transactional emails. +Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/sendgrid). + +## Options If no values are defined for a given option, the plugin will not try to send an email for that event. -## Plugin Options -``` +```js { - api_key: [your sendgrid api key] (required), - from: [the from field, i.e. ACME ] (required), - gift_card_created_template: [used on gift_card.created], - order_placed_template: [used on order.placed], - order_canceled_template: [used on order.canceled], - order_shipped_template: [used on order.shipment_created], - order_completed_template: [used on order.completed], - user_password_reset_template: [used on user.password_reset], - customer_password_reset_template: [used on customer.password_reset], + api_key: "SENDGRID_API_KEY", //required + from: "[the from field, i.e. ACME ]", //required + gift_card_created_template: "[used on gift_card.created]", + order_placed_template: "[used on order.placed]", + order_canceled_template: "[used on order.canceled]", + order_shipped_template: "[used on order.shipment_created]", + order_completed_template: "[used on order.completed]", + user_password_reset_template: "[used on user.password_reset]", + customer_password_reset_template: "[used on customer.password_reset]", localization: { "de-DE": { // locale key - gift_card_created_template: [used on gift_card.created], - order_placed_template: [used on order.placed], - order_canceled_template: [used on order.canceled], - order_shipped_template: [used on order.shipment_created], - order_completed_template: [used on order.completed], - user_password_reset_template: [used on user.password_reset], - customer_password_reset_template: [used on customer.password_reset], + gift_card_created_template: "[used on gift_card.created]", + order_placed_template: "[used on order.placed]", + order_canceled_template: "[used on order.canceled]", + order_shipped_template: "[used on order.shipment_created]", + order_completed_template: "[used on order.completed]", + user_password_reset_template: "[used on user.password_reset]", + customer_password_reset_template: "[used on customer.password_reset]", } } } diff --git a/packages/medusa-plugin-slack-notification/README.md b/packages/medusa-plugin-slack-notification/README.md new file mode 100644 index 0000000000..49f824085e --- /dev/null +++ b/packages/medusa-plugin-slack-notification/README.md @@ -0,0 +1,15 @@ +# medusa-plugin-slack-notification + +Slack Integration to receive new order notifications on Slack. + +Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/slack). + +## Options + +```js +{ + show_discount_code: false, + slack_url: ``, + admin_orders_url: `http://localhost:7001/a/orders` +} +``` diff --git a/packages/medusa-plugin-twilio-sms/README.md b/packages/medusa-plugin-twilio-sms/README.md index 6fbdab56f4..eddbb828f8 100644 --- a/packages/medusa-plugin-twilio-sms/README.md +++ b/packages/medusa-plugin-twilio-sms/README.md @@ -2,13 +2,15 @@ Twilio SMS / Messaging plugin. -## Plugin Options +Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/twilio-sms). -``` +## Options + +```js { - account_sid: [twilio messaging account sid] (required), - auth_token: [twilio massaging authentication token] (required), - from_number: [the number used as sender SMS], + account_sid: "[twilio messaging account sid]", // required + auth_token: "[twilio massaging authentication token]", // required + from_number: "[the number used as sender SMS]", } ``` diff --git a/www/docs/docusaurus.config.js b/www/docs/docusaurus.config.js index 8944b88e84..9f38d26f56 100644 --- a/www/docs/docusaurus.config.js +++ b/www/docs/docusaurus.config.js @@ -127,7 +127,7 @@ module.exports = { { docs: { sidebarPath: require.resolve("./sidebars.js"), - editUrl: "https://github.com/medusajs/medusa/edit/master/www/", + editUrl: "https://github.com/medusajs/medusa/edit/master/docs/content", path: docsPath, routeBasePath: "/", remarkPlugins: [ diff --git a/www/reference/src/components/ColorModeToggler/index.js b/www/reference/src/components/ColorModeToggler/index.js index 7b990bc539..67aa6fd83e 100644 --- a/www/reference/src/components/ColorModeToggler/index.js +++ b/www/reference/src/components/ColorModeToggler/index.js @@ -8,19 +8,40 @@ import { useColorMode } from 'theme-ui' export default function ColorModeToggler () { const [, setColorMode] = useColorMode() + + function checkLocalStorage (currentTheme, toggleTheme) { + //check that theme local storage values are set correctly + let themeUiColorMode = window.localStorage.getItem('theme-ui-color-mode'); + let theme = window.localStorage.getItem('theme') + if (!themeUiColorMode) { + themeUiColorMode = theme || currentTheme + window.localStorage.setItem('theme-ui-color-mode', themeUiColorMode); + setColorMode(themeUiColorMode); + } + if (!theme) { + theme = themeUiColorMode || currentTheme + window.localStorage.setItem('theme', theme); + toggleTheme(theme) + } + + return theme || themeUiColorMode || currentTheme; + } return ( - {({ theme, toggleTheme }) => ( - - )} + {({ theme, toggleTheme }) => { + const currentTheme = checkLocalStorage(theme, toggleTheme); + return ( + + ); + }} ) } \ No newline at end of file