Skip to content

Commit

Permalink
docs: migrated images to cloudinary
Browse files Browse the repository at this point in the history
  • Loading branch information
shahednasser committed Nov 9, 2022
1 parent 0a31ea9 commit 402cf15
Show file tree
Hide file tree
Showing 56 changed files with 326 additions and 328 deletions.
20 changes: 10 additions & 10 deletions docs/content/add-plugins/algolia.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,27 @@ The first step is to create an Algolia app for your Medusa server. To create one

On the Applications page, click on the New application button at the top right.

![Click on New application button at the top right](https://i.imgur.com/WxckgS2.png)
![Click on New application button at the top right](https://res.cloudinary.com/dza7lstvk/image/upload/v1667999820/Medusa%20Docs/Algolia/WxckgS2_eygl8l.png)

In the new page that opens, optionally enter a name for the application and choose a subscription plan. You can choose the Free plan for now, but it’s recommended to switch to the Pay-as-you-go plan as your business grows.

![Optionally enter a name for the application and choose a subscription plan](https://i.imgur.com/jpM2EBU.png)
![Optionally enter a name for the application and choose a subscription plan](https://res.cloudinary.com/dza7lstvk/image/upload/v1667999980/Medusa%20Docs/Algolia/jpM2EBU_fui1lg.png)

Once you’re done, click on the Next Step button. If you picked Pay as you go service, you’ll need to enter billing details before you proceed.

Then, you’ll be asked to pick a region for your application. Once you’re done, click on Review Application Details.

![Select a region then click on Review Application Details at the bottom right](https://i.imgur.com/fahf2J2.png)
![Select a region then click on Review Application Details at the bottom right](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000005/Medusa%20Docs/Algolia/fahf2J2_qgm7sa.png)

In the last step, you’ll see a summary of your order. If all looks good, check the checkboxes at the end of the form to indicate that you agree to the terms and conditions. Then, click on the Create Application button.

![Summary of your application's order with the terms and agreement checkboxes checked](https://i.imgur.com/PTI2Swq.png)
![Summary of your application's order with the terms and agreement checkboxes checked](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000019/Medusa%20Docs/Algolia/PTI2Swq_a1qbi5.png)

## Retrieve API Keys

To retrieve the API keys that you’ll use in the next sections, go to Settings, then choose API Keys in the Team and Access section.

![Click on API Keys in the Team and Access section of your settings](https://i.imgur.com/gnORibC.png)
![Click on API Keys in the Team and Access section of your settings](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000028/Medusa%20Docs/Algolia/gnORibC_msuur5.png)

On this page, you’ll find the Application ID, Search-Only API Key, and Admin API Key. You’ll need the Application ID and Admin API Key for the Medusa server. As for the storefront, you’ll need the Application ID and Search-Only API Key.

Expand All @@ -64,7 +64,7 @@ If you have more than one application in your Algolia account, make sure you’r

:::

![Application ID, Search-Only API Key, and Admin API Key can be found in the API Keys page](https://i.imgur.com/i50Irki.png)
![Application ID, Search-Only API Key, and Admin API Key can be found in the API Keys page](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000037/Medusa%20Docs/Algolia/i50Irki_jmtyk6.png)

## Install the Algolia Plugin

Expand Down Expand Up @@ -128,7 +128,7 @@ npm run start

The quickest way to test that the integration is working is by sending a `POST` request to `/store/products/search`. This endpoint accepts a `q` body parameter of the query to search for and returns in the result the products that match this query.

![Postman request send to the search endpoint that retrieves products using Algolia](https://i.imgur.com/IHeTsi7.png)
![Postman request send to the search endpoint that retrieves products using Algolia](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000054/Medusa%20Docs/Algolia/IHeTsi7_ymhb2p.png)

You can also check that the products are properly indexed by opening your Algolia dashboard and choosing Search from the left sidebar. You’ll find your products that are on your Medusa server added there.

Expand All @@ -138,7 +138,7 @@ If you have more than one application on your Algolia account, make sure you’r

:::

![Products from the Medusa server can be seen on the Algolia dashboard](https://i.imgur.com/wkXzUH0.png)
![Products from the Medusa server can be seen on the Algolia dashboard](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000071/Medusa%20Docs/Algolia/wkXzUH0_dowyxj.png)

### Add or Update Products

Expand Down Expand Up @@ -211,7 +211,7 @@ To make sure the Next.js storefront properly displays the products in the search

:::

![Search pop up in the Next.js storefront](https://i.imgur.com/1f9qqK6.png)
![Search pop up in the Next.js storefront](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000082/Medusa%20Docs/Algolia/1f9qqK6_c0z8zi.png)

## Add to Gatsby and React-Based Storefronts

Expand Down Expand Up @@ -325,7 +325,7 @@ And add the `Search` component in the returned JSX before `RegionPopover`:

If you run your Gatsby storefront while the Medusa server is running, you should find a search bar in the header of the page. Try entering a query to search through the products in your store.

![Search bar in the Gatsby storefront](https://i.imgur.com/INtlcIo.png)
![Search bar in the Gatsby storefront](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000097/Medusa%20Docs/Algolia/INtlcIo_jlh16x.png)

## What’s Next

Expand Down
18 changes: 9 additions & 9 deletions docs/content/add-plugins/contentful/customize-contentful.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,31 +118,31 @@ This runs the Contentful migration in that file and makes the necessary changes

To check if the above migration worked, in your Contentful Space dashboard go to Content Models from the navigation bar. You should see the new content model Rich Text.

![Rich Text can be found among content models](https://i.imgur.com/W5WzcTG.png)
![Rich Text can be found among content models](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001241/Medusa%20Docs/Contentful/W5WzcTG_vau6c9.png)

The above migration also allows you to add Rich Text content to pages. To test this out, go to Content from the navigation bar and choose Page in the select field next to the search bar. This shows the available pages in your Contentful Space.

![Filter content to only show pages by choosing Page in the Content Type select field](https://i.imgur.com/ht87z4e.png)
![Filter content to only show pages by choosing Page in the Content Type select field](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001251/Medusa%20Docs/Contentful/ht87z4e_gmbk6c.png)

Choose one of the pages. For example, the About page. Then, scroll down to the Add content button. If you click on it, you should be able to choose Rich Text under New Content.

![Click on add content and choose from the dropdown Rich Text](https://i.imgur.com/pJ5yM0m.png)
![Click on add content and choose from the dropdown Rich Text](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001261/Medusa%20Docs/Contentful/pJ5yM0m_dfb7vp.png)

Click on Rich Text and a new form will open to create new Rich Text content. It has the same fields that you defined in the migration file.

![The Rich Text form is filled with data](https://i.imgur.com/lAglhc9.png)
![The Rich Text form is filled with data](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001271/Medusa%20Docs/Contentful/lAglhc9_ejfs2i.png)

After adding the content you want, click on the Publish button on the right then go back to the About page editor.

![Click on the Publish button at the right](https://i.imgur.com/oYpQKsc.png)
![Click on the Publish button at the right](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001281/Medusa%20Docs/Contentful/oYpQKsc_piobfk.png)

Similarly, in the About page editor, click on the Publish Changes button on the right to view these changes later in the storefront.

![Click on the Publish changes button at the right](https://i.imgur.com/DIMo3hd.png)
![Click on the Publish changes button at the right](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001296/Medusa%20Docs/Contentful/DIMo3hd_ylxkr3.png)

Similarly, you can add Rich Text content to any product page.

![A rich text content is added to a product](https://i.imgur.com/wgI8mEB.png)
![A rich text content is added to a product](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001305/Medusa%20Docs/Contentful/wgI8mEB_wbukpd.png)

## Render New Content Models in the Storefront

Expand Down Expand Up @@ -238,7 +238,7 @@ npm run start

This runs the Gatsby storefront on `localhost:8000`. Go to the storefront in your browser and open the About page. You should see the Rich Text content you added.

![Rich Text content you added to the about page should be visible now](https://i.imgur.com/aQAY9Vz.png)
![Rich Text content you added to the about page should be visible now](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001320/Medusa%20Docs/Contentful/aQAY9Vz_yw4eop.png)

### Render Component in a Product Page

Expand Down Expand Up @@ -306,7 +306,7 @@ This loops over `contentModules` and if the type of the content is Rich Text, it
Restart the Gatsby storefront then open a product that you added Rich Text content to. You should see the Rich Text component at the end of the page.
![Rich Text content you added to the product should be visible at the end of the page](https://i.imgur.com/LGiVMxx.png)
![Rich Text content you added to the product should be visible at the end of the page](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001342/Medusa%20Docs/Contentful/LGiVMxx_rqsr2l.png)
## What’s Next
Expand Down
30 changes: 15 additions & 15 deletions docs/content/add-plugins/contentful/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,27 @@ Set the value for `CONTENTFUL_ENV` to `master`.

To retrieve the value of `CONTENTFUL_SPACE_ID`, go to your [Contentful Space dashboard](https://app.contentful.com/). Then, choose Settings in the navigation bar and select API keys from the dropdown.

![Click on Settings then select API keys from the dropdown](https://i.imgur.com/hvp6zo5.png)
![Click on Settings then select API keys from the dropdown](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001360/Medusa%20Docs/Contentful/hvp6zo5_uaqtmi.png)

On the APIs page, click Add API Key.

![Click on the Add API Key button](https://i.imgur.com/KlH2BDg.png)
![Click on the Add API Key button](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001375/Medusa%20Docs/Contentful/KlH2BDg_fiqd80.png)

In the form, enter a name for the API key and click Save.

![A form with the name of API key entered](https://i.imgur.com/hOG1RqM.png)
![A form with the name of API key entered](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001385/Medusa%20Docs/Contentful/hOG1RqM_tmctae.png)

Then, copy the value of Space ID and set it as the value of `CONTENTFUL_SPACE_ID`.

#### Value of CONTENTFUL_ACCESS_TOKEN

Go back to the API Keys page and click on the Content management tokens tab.

![API Keys page with Content management tokens tab opened](https://i.imgur.com/7nWx1xk.png)
![API Keys page with Content management tokens tab opened](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001394/Medusa%20Docs/Contentful/7nWx1xk_co8ykw.png)

Click on Generate personal token. A pop-up will open where you have to enter a name for the token.

![Pop up model for Personal Access Token with token name entered](https://i.imgur.com/y6R81pH.png)
![Pop up model for Personal Access Token with token name entered](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001403/Medusa%20Docs/Contentful/y6R81pH_yhbg1u.png)

Once you click Generate, a personal access token will be generated. Use it to set the value of `CONTENTFUL_ACCESS_TOKEN`.

Expand Down Expand Up @@ -141,7 +141,7 @@ npm run migrate:contentful

Once this command finishes executing, in your Contentful Space dashboard click on Content Model in the navigation bar. You should see a list of new content models added.

![Content Model page filled with new content models](https://i.imgur.com/ZDJPNkr.png)
![Content Model page filled with new content models](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001419/Medusa%20Docs/Contentful/ZDJPNkr_avr7gy.png)

### Seed Content to Contentful

Expand All @@ -155,7 +155,7 @@ npm run seed:contentful

After this command finishes running, in your Contentful Space dashboard click on Content in the navigation bar. You should see a list of new content added.

![Content page filled with new content](https://i.imgur.com/bfgFxPg.png)
![Content page filled with new content](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001429/Medusa%20Docs/Contentful/bfgFxPg_jb4zok.png)

### (Optional) Seed Medusa Database

Expand All @@ -177,7 +177,7 @@ npm run start

If you seeded the database with demo data, you should see that events related to the products are triggered.

![Seed the database](https://i.imgur.com/ci4accp.png)
![Seed the database](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001440/Medusa%20Docs/Contentful/ci4accp_okaro3.png)

The Contentful integration ensures a two-way sync between the Medusa server and Contentful. So, when new products are added to Medusa, these products will be added to your Contentful Space as well.

Expand All @@ -195,27 +195,27 @@ To do that, open your Contentful Space Dashboard and click on Content in the Nav

Click on the checkbox at the top of the table to select all products then click Publish to publish these products.

![Select all products' checkboxes and click the publish button](https://i.imgur.com/3NrH5tJ.png)
![Select all products' checkboxes and click the publish button](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001452/Medusa%20Docs/Contentful/3NrH5tJ_f16iym.png)

### Added Featured Products

On the homepage of the storefront, there’s a featured products tile that shows a set of products. Before running the storefront, you must add at least one product to the list.

To do that, open your Contentful Space Dashboard and click on Content in the Navigation bar. Make sure the select field next to the search bar is set to Any and search for Featured Products. You should find one content of the type Tile Section.

![Search for the featured products tile section](https://i.imgur.com/2gS0ozY.png)
![Search for the featured products tile section](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001462/Medusa%20Docs/Contentful/2gS0ozY_b2tpsb.png)

Click on it. You should find on the page an empty Tiles section where you can add tiles and products.

![On the content's page find the empty tiles section](https://i.imgur.com/inuN1OB.png)
![On the content's page find the empty tiles section](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001472/Medusa%20Docs/Contentful/inuN1OB_ipiszl.png)

Click on Add content then on Add existing content and pick some of the products you want to show on the homepage.

![Add at least 1 product as a tile](https://i.imgur.com/N5m4LbF.png)
![Add at least 1 product as a tile](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001500/Medusa%20Docs/Contentful/N5m4LbF_fb97tm.png)

Once you’re done adding products, click on Publish changes in the right sidebar.

![Click on the publish changes button on the right](https://i.imgur.com/URNpkXq.png)
![Click on the publish changes button on the right](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001508/Medusa%20Docs/Contentful/URNpkXq_cb5ppp.png)

## Setup Gatsby Storefront

Expand Down Expand Up @@ -250,7 +250,7 @@ To retrieve the value of `CONTENTFUL_ACCESS_TOKEN`, on your Contentful Space das

You should find the field "Content Delivery API - access token”. Copy its value and set it as the value of `CONTENTFUL_ACCESS_TOKEN`.

![Copy the value of the Content Delivery API access token](https://i.imgur.com/a7dl7DI.png)
![Copy the value of the Content Delivery API access token](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001522/Medusa%20Docs/Contentful/a7dl7DI_mziogm.png)

### Start Storefront

Expand All @@ -262,7 +262,7 @@ npm run start

This starts the storefront at `localhost:8000`. Open it in your browser and you should see on the homepage the Featured Product section with the products you chose on Contentful.

![The storefront with the featured products section](https://i.imgur.com/f6xwYbS.png)
![The storefront with the featured products section](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001537/Medusa%20Docs/Contentful/f6xwYbS_w1v993.png)

## Make Changes to Content

Expand Down
6 changes: 3 additions & 3 deletions docs/content/add-plugins/mailchimp.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ Try sending a `POST` request to `/mailchimp/subscribe` with the following JSON b

If the subscription is successful, a `200` response code will be returned with `OK` message.

![Postman](https://i.imgur.com/tpr7uCF.png)
![Postman](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000185/Medusa%20Docs/Mailchimp/tpr7uCF_g4rymn.png)

If you check your Mailchimp dashboard, you should find the email added to your Audience list.

![Email Added](https://i.imgur.com/ALz6WUq.png)
![Email Added](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000199/Medusa%20Docs/Mailchimp/ALz6WUq_e4mkcs.png)

### With Additional Data

Expand Down Expand Up @@ -173,7 +173,7 @@ export default function NewsletterForm() {

This will result in a subscription form similar to the following:

![Subscription Form](https://i.imgur.com/JHIFEwe.png)
![Subscription Form](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000210/Medusa%20Docs/Mailchimp/JHIFEwe_fu4rkv.png)

If you try entering an email and clicking Subscribe, the email will be subscribed to your Mailchimp newsletter successfully.

Expand Down
8 changes: 4 additions & 4 deletions docs/content/add-plugins/meilisearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ npm run start

The quickest way to test that the integration is working is by sending a `POST` request to `/store/products/search`. This endpoint accepts a `q` body parameter of the query to search for and returns in the result the products that match this query.

![Postman request to search endpoint that shows results returned from the search engine](https://i.imgur.com/RCGquxU.png)
![Postman request to search endpoint that shows results returned from the search engine](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000265/Medusa%20Docs/MeiliSearch/RCGquxU_um3dvn.png)

You can also check that the products are properly indexed by opening the MeiliSearch host URL in your browser, which is `http://127.0.0.1:7700/` by default. You’ll find your products that are on your Medusa server added there.

![MeiliSearch dashboard showing products from the Medusa server indexed](https://i.imgur.com/5sk3jyP.png)
![MeiliSearch dashboard showing products from the Medusa server indexed](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000277/Medusa%20Docs/MeiliSearch/5sk3jyP_i3swkn.png)

### Add or Update Products

Expand Down Expand Up @@ -170,7 +170,7 @@ To make sure the Next.js storefront properly displays the products in the search

:::

![Search Result on Next.js storefront](https://i.imgur.com/gQVWvH2.png)
![Search Result on Next.js storefront](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000298/Medusa%20Docs/MeiliSearch/gQVWvH2_datei5.png)

### Add to Gatsby and React-Based Storefronts

Expand Down Expand Up @@ -284,7 +284,7 @@ And add the `Search` component in the returned JSX before `RegionPopover`:

If you run your Gatsby storefront while the Medusa server and the MeiliSearch instance are running, you should find a search bar in the header of the page. Try entering a query to search through the products in your store.

![Search box in the header of the storefront](https://i.imgur.com/ZkRgF2h.png)
![Search box in the header of the storefront](https://res.cloudinary.com/dza7lstvk/image/upload/v1668000317/Medusa%20Docs/MeiliSearch/ZkRgF2h_ytnpv9.png)

## What’s Next

Expand Down
Loading

0 comments on commit 402cf15

Please sign in to comment.