docs: added dividers + see also section (#2899)

This commit is contained in:
Shahed Nasser
2022-12-26 15:52:08 +02:00
committed by GitHub
parent b0e5769e27
commit b0ebfd6bcf
100 changed files with 1047 additions and 291 deletions
+17 -3
View File
@@ -14,6 +14,8 @@ To manage images in Medusa, you need a file service plugin responsible for hosti
Medusa provides three different options to handle your file storage. This document focuses on using [Spaces](https://www.digitalocean.com/products/spaces) to store your Medusa servers images.
---
## Prerequisites
### Medusa Server
@@ -24,6 +26,8 @@ A Medusa server is required to be set up before following along with this docume
You need to [create a DigitalOcean account](https://cloud.digitalocean.com/registrations/new) to follow along with this documentation. A credit card is required during registration.
---
## Create DigitalOcean Space
In your DigitalOcean account, click on the Create button at the top right, then choose Spaces from the dropdown.
@@ -40,6 +44,8 @@ In the Finalize and Create section, enter a name for the field “Choose a uniqu
Once youre done, click on the Create a Space button. This creates the Space and redirects you to the Spaces page.
---
## Create Space Access Keys
Choose API from the bottom of the sidebar.
@@ -62,6 +68,8 @@ The secret access key will not be shown again after you leave the page. Make sur
:::
---
## Install the Spaces Plugin
In the directory of your Medusa server, run the following command to install the Spaces plugin:
@@ -117,6 +125,8 @@ If you have multiple storage plugins configured, the last plugin declared in the
:::
---
## Test the Space Plugin
Run your Medusa server with the following command:
@@ -135,6 +145,8 @@ You can also check that the image was uploaded on the Spaces page.
![Image can be seen on the Space's page on DigitalOcean](https://res.cloudinary.com/dza7lstvk/image/upload/v1668001050/Medusa%20Docs/Spaces/BexmRkg_gimk1d.png)
---
## Next.js Storefront Configuration
If youre using a [Next.js](../starters/nextjs-medusa-starter.mdx) storefront, you need to add an additional configuration that adds the Spaces domain name into the configured images domain names. This is because all URLs of product images will be from the Space.
@@ -161,8 +173,10 @@ module.exports = withStoreConfig({
Where `<YOUR_SPACE_DOMAIN>` is the domain name for your Space which can be retrieved from the Space URL. For example, `medusa-server.fra1.digitaloceanspaces.com`.
## Whats Next
---
## See Also
- Check out [more plugins](https://github.com/medusajs/medusa/tree/master/packages) you can add to your store.
- Learn how to [deploy the Medusa server on DigitalOcean](../deployments/server/deploying-on-digital-ocean.md).
- Learn about the [Next.js](../starters/nextjs-medusa-starter.mdx) and [Gatsby](../starters/gatsby-medusa-starter.mdx) storefronts.
- [Seploy the Medusa server on DigitalOcean](../deployments/server/deploying-on-digital-ocean.md).
- Install the [Next.js](../starters/nextjs-medusa-starter.mdx) or [Gatsby](../starters/gatsby-medusa-starter.mdx) storefront.