docs: improved SEO of documentation (#3117)

* docs: added description to documentation pages

* docs: added more descriptions

* docs: finished improving meta description

* docs: added searchbox structured data

* docs: added breadcrumbs structured data

* docs: added how to structured data

* docs: improved 404 page

* docs: added how-to frontmatter option
This commit is contained in:
Shahed Nasser
2023-01-26 15:58:33 +02:00
committed by GitHub
parent 4e82ec0734
commit 589cb18f98
158 changed files with 699 additions and 48 deletions
@@ -1,3 +1,8 @@
---
description: 'Learn how to bulk-import prices into Medusa using the Admin REST APIs. The steps include uploading a CSV file, creating a batch job for the import, and confirming the batch job.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -1,3 +1,8 @@
---
description: 'Learn how to import products into Medusa using the Admin REST APIs. The steps include uploading a CSV file, creating a batch job for the import, and confirming the batch job.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -1,3 +1,8 @@
---
description: 'Learn how to implement customer-related functionalities for admins using the REST APIs. This includes how to list customers, add a new customer and edit the details of a customer.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -1,3 +1,8 @@
---
description: 'Learn how to implement discount functionalities for admins in Medusa using the REST APIs. This includes creating, updating, and deleting discounts, and managing conditions of discounts.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -1,3 +1,8 @@
---
description: 'Learn how to implement gift card functionalities for admins using the REST APIs. This includes how to create, update, and delete gift cards, as well as custom gift cards.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -1,7 +1,12 @@
---
description: 'Learn how to implement publishable API key functionalities for admins in Medusa using the REST APIs. This includes how to list, create, update, and delete a publishable API key.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Manage Publishable API Keys
# How to Manage Publishable API Keys
In this document, youll learn how to manage the publishable API keys using the admin APIs.
@@ -1,3 +1,8 @@
---
description: 'Learn how to implement region-related functionalities for admins using the REST APIs. This includes how to list regions, and create, update, and delete regions.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -1,3 +1,8 @@
---
description: 'Learn how to implement order-editing features for admins using the REST APIs. This guide includes how to create an order edit and move order edit to request state, and more.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -1,3 +1,8 @@
---
description: 'Learn how to implement customer group functionalities for admins using the REST APIs. This includes listing customer groups, creating a customer group, managing customers in the group, and more.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -1,3 +1,8 @@
---
description: 'Learn how to create a batch job strategy in the Medusa server. This guide also includes how to test your batch job strategy.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -1,4 +1,9 @@
# Customize Import Strategy
---
description: 'Learn how to customize the import strategy in Medusa. The import strategy can be used to import entities such as products, prices in a price list, orders, or other entities.'
addHowToData: true
---
# How to Customize Import Strategy
In this document, youll learn how to create a custom product import strategy either by overwriting the default strategy or creating your own.
@@ -30,7 +35,7 @@ If you use SQLite during your development, its highly recommended that you us
The steps required for overwriting a batch job strategy are essentially the same steps required to create a batch job strategy with a minor difference. For that reason, this documentation does not cover the basics of a batch job strategy.
If youre interested to learn more about batch job strategies and how they work, please check out the [Create Batch Job Strategy documentation](./create.md).
If youre interested to learn more about batch job strategies and how they work, please check out the [Create Batch Job Strategy documentation](./create.mdx).
### 1. Create a File
@@ -69,7 +74,7 @@ export default MyImportStrategy
:::note
This is the base implementation of a batch job strategy. You can learn about all the different methods and properties in [this documentation](./create.md#3-define-required-properties).
This is the base implementation of a batch job strategy. You can learn about all the different methods and properties in [this documentation](./create.mdx#3-define-required-properties).
:::
@@ -92,7 +97,7 @@ class MyImportStrategy extends AbstractBatchJobStrategy {
You can now define your custom functionality in your batch job strategy. For example, you can create custom import logic to import products.
Refer to the [Create a Batch Job documentation](./create.md#3-define-required-properties) to understand what properties and methods are required in your batch job strategy and how you can use them to implement your custom functionality.
Refer to the [Create a Batch Job documentation](./create.mdx#3-define-required-properties) to understand what properties and methods are required in your batch job strategy and how you can use them to implement your custom functionality.
### 5. Run Build Command
@@ -104,7 +109,7 @@ npm run build
### 6. Test your Functionality
Since you didnt create a new batch job type and overwrote the functionality of the strategy, you can test out your functionality using the [same steps used with the default strategy](./create.md#test-your-batch-job-strategy).
Since you didnt create a new batch job type and overwrote the functionality of the strategy, you can test out your functionality using the [same steps used with the default strategy](./create.mdx#test-your-batch-job-strategy).
Specifically, since you create batch jobs using the [Create Batch Job](https://docs.medusajs.com/api/admin/#tag/Batch-Job/operation/PostBatchJobs) endpoint which accepts the batch job type as a body parameter, you just need to send the same type you used for this field. In the example of this documentation, the `type` would be `product-import`.
@@ -116,7 +121,7 @@ If you overwrote the import functionality, you can follow [these steps to learn
If you dont want to overwrite Medusas batch job strategy, you can create a custom batch job strategy with a different `batchType` value. Then, use that type when you send a request to [Create a Batch Job](https://docs.medusajs.com/api/admin/#tag/Batch-Job).
For more details on creating custom batch job strategies, please check out the [Create Batch Job Strategy documentation](create.md).
For more details on creating custom batch job strategies, please check out the [Create Batch Job Strategy documentation](create.mdx).
---
@@ -1,3 +1,7 @@
---
description: 'Learn what batch jobs in the Medusa server are and their flow. Batch jobs are tasks that can be performed asynchronously and iteratively in the Medusa server.'
---
# Batch Jobs
In this document, youll learn what Batch Jobs are and how they work in Medusa.
@@ -1,3 +1,7 @@
---
description: 'Learn what Customer Groups are and how they can be used in the Medusa server. Customer Groups allow to combine customers with similar attributes into a single group.'
---
# Customer Groups
In this document, youll learn about Customer Groups and how they can be used in Medusa.
@@ -1,3 +1,7 @@
---
description: 'Learn about what Customers are in Medusa and how they are implemented. Customers are individuals that make purchases in your store.'
---
# Customers
In this document, youll learn about Customers and their relation to other entities in Medusa.
@@ -1,3 +1,7 @@
---
description: 'Learn what the dependency container is and how to use it in Medusa. Learn also what dependency injection is, and what the resources regsitered and their names are.'
---
# Dependency Container
In this document, youll learn what the dependency container is and how you can use it in Medusa.
@@ -1,3 +1,7 @@
---
description: 'Learn about the discount architecture in the Medusa server. Discounts are used to offer promotions to the user for marketing purposes.'
---
# Discounts Architecture
In this document, youll learn about Discounts architecture and how it works.
@@ -1,3 +1,8 @@
---
description: 'Learn how to add a middleware in Medusa. A middleware is a function that has access to the request and response objects and can be used to perform actions around an endpoint.'
addHowToData: true
---
# How to Add a Middleware
In this document, youll learn how to add a middleware to an existing or custom route in Medusa.
@@ -1,3 +1,8 @@
---
description: 'Learn how to create endpoints in the Medusa server. This guide also includes how to add CORS configurations, creating multiple endpoints, adding protected routes, and more.'
addHowToData: true
---
# How to Create Endpoints
In this document, youll learn how to create endpoints in your Medusa server.
@@ -1,3 +1,8 @@
---
description: 'Learn how to create an entity in the Medusa server. This guide also explains how to create a repository and access and delete the entity.'
addHowToData: true
---
# Create an Entity
In this document, youll learn how you can create an [Entity](overview.md).
@@ -1,3 +1,7 @@
---
description: 'Learn what entities are in the Medusa server. There are entities in the Medusa server, and developers can create custom entities.'
---
# Entities
In this document, you'll learn what Entities are in Medusa.
@@ -1,3 +1,7 @@
---
description: 'Learn how the events system is implemented in Medusa. It is built on a publish-subscribe architecture. The Medusa core publishes events when certain actions take place.'
---
# Events Architecture
In this document, you'll learn how the events system is implemented in Medusa.
@@ -1,4 +1,9 @@
# Toggle Feature Flags
---
description: 'Learn how to toggle feature flags in the Medusa server. This guide explains the steps required to toggle a feature flag.'
addHowToData: true
---
# How to Toggle Feature Flags
In this document, youll learn about what feature flags are and how to toggle them.
@@ -1,3 +1,7 @@
---
description: 'Learn what gift cards are and how they work in the Medusa server. Learn about the relations between Gift Cards and other entities.'
---
# Gift Cards
In this document, youll learn about Gift Cards and how they work in Medusa.
@@ -1,3 +1,8 @@
---
description: 'Learn how to create a migration in the Medusa server. This guide explains how to write and run migrations.'
addHowToData: true
---
# How to Create Migrations
In this document, youll learn how to create a [Migration](overview.md) using [Typeorm](https://typeorm.io) on your Medusa server.
@@ -1,3 +1,7 @@
---
description: 'Learn what Migrations are in the Medusa server and how to run them. Migrations are used to make changes to the database schema the Medusa server is linked to.'
---
# Migrations
In this document, you'll learn what Migrations are in Medusa.
@@ -1,3 +1,8 @@
---
description: 'Learn how to create a notification provider in the Medusa server. This guide explains the different methods available in a Notification provider.'
addHowToData: true
---
# How to Create a Notification Provider
In this document, youll learn how to add a Notification Provider to your Medusa server.
@@ -1,3 +1,7 @@
---
description: 'Learn about the Notificaiton architecture in Medusa and the automation flow. The Notification Architecture is made up of the Notification Provider and Notification.'
---
# Notification Architecture Overview
This document gives an overview of the notification architecture and how it works.
@@ -1,3 +1,8 @@
---
description: 'Learn how to create a payment provider in the Medusa server. This guide explains the different methods available in a fulfillment provider.'
addHowToData: true
---
# How to Create a Payment Provider
In this document, youll learn how to add a Payment Provider to your Medusa server. If youre unfamiliar with the Payment architecture in Medusa, make sure to check out the [overview](./overview.md) first.
@@ -1,3 +1,7 @@
---
description: 'Learn about the payment architecture in the Medusa server. The payment architecture refers to all operations in the ecommerce store related to processing payments.'
---
# Payment Architecture Overview
In this document, youll learn about the payment architecture in Medusa, specifically its 3 main components and the idempotency key.
@@ -1,4 +1,9 @@
# Create a Plugin
---
description: 'Learn how to create a plugin in Medusa. This guide explains how to develop, configure, test, and publish the plugins.'
addHowToData: true
---
# How to Create a Plugin
In this document, youll learn how to create a plugin and publish it. If youre interested to learn more about what plugins are and where to find available official and community plugins, check out the [overview document](overview.md).
@@ -1,3 +1,7 @@
---
description: 'Learn what Plugins are and how they are used in Medusa. Plugins are re-usable customizations that can be added to a Medusa server.'
---
# Plugins
In this document, youll get an overview of plugins in Medusa, where to find them, and how to install them. If you want to learn how to create a plugin, check out [this guide](create.md) instead.
@@ -1,3 +1,7 @@
---
description: 'Learn what price lists are and how they work in a Medusa server. Price Lists can be used to override product prices based on different conditions.'
---
# Price Lists
In this document, youll learn what price lists are and how they work.
@@ -1,7 +1,12 @@
---
description: 'Learn how to implement price list functionalities for admins using the REST APIs. This includes how to create a price list, retriving price list details, managing prices in the price list, and more.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# How to Use PriceList APIs
# How to Manage PriceLists
In this document, youll learn how to use the PriceList Admin APIs to create, update, and manage prices in a price list.
@@ -1,3 +1,7 @@
---
description: 'Learn what the price selection strategy is in the Medusa server. The price selection strategy retrieves the best price for a product variant for a specific context.'
---
# Price Selection Strategy
In this document, youll learn what a price selection strategy is.
@@ -1,4 +1,9 @@
# Override Price Selection Strategy
---
description: 'Learn how to override the price selection strategy. The price selection strategy is used to determine the best price based on a specific context.'
addHowToData: true
---
# How to Override Price Selection Strategy
In this document, youll learn how to override Medusas price selection strategy to create a custom pricing strategy.
@@ -1,3 +1,7 @@
---
description: 'Learn what publishable API keys are and how they can be used in the Medusa server. Publishable API keys can be used to scope API calls with an API key.'
---
# Publishable API Keys Overview
In this document, youll learn about Publishable API Keys and their usage.
@@ -1,3 +1,7 @@
---
description: 'Learn about what Regions are and how they are used in a Medusa server. Regions represent at least one country on the Medusa server.'
---
# Regions Overview
In this document, youll learn about Regions and their importance in your Medusa server.
@@ -1,3 +1,7 @@
---
description: 'Learn what Sales Channels are and how they can be used in Medusa. Sales Channels allow merchants to separate between the different channels products are sold in.'
---
# Sales Channels
In this document, youll learn about Sales Channels and how they can be used in Medusa.
@@ -1,3 +1,8 @@
---
description: 'Learn how to implement sales channels features for admins in Medusa using the REST APIs. This includes how to list sales channels, and create, retrieve, update and delete a sales channel. This also includes how to manage products in a sales channel.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -1,3 +1,8 @@
---
description: 'Learn how to create a scheduled job in the Medusa server. The scheduled job in this example will simply change the status of draft products to published.'
addHowToData: true
---
# How to Create a Scheduled Job
In this document, youll learn how to create a scheduled job in Medusa.
@@ -1,3 +1,8 @@
---
description: 'Learn how to create a service in Medusa. This guide also includes how to use services in other services, subscribers, and endpoints.'
addHowToData: true
---
# Create a Service
In this document, youll learn how you can create a [Service](./overview.md) and use it across your Medusa server just like any of the core services.
@@ -1,3 +1,7 @@
---
description: 'Learn what Services are in the Medusa server. Services represent bundled helper methods that you want to use across the server.'
---
# Services
In this document, you'll learn about what Services are in Medusa.
@@ -1,3 +1,8 @@
---
description: 'Learn how to create a fulfillment provider in the Medusa server. This guide explains the different methods in the fulfillment provider.'
addHowToData: true
---
# How to Add a Fulfillment Provider
In this document, youll learn how to add a fulfillment provider to a Medusa server. If youre unfamiliar with the Shipping architecture in Medusa, make sure to [check out the overview first](overview.md).
@@ -1,3 +1,7 @@
---
description: 'Learn how the shipping architecture is implemented in the Medusa server. This includes an overview of what the Fulfillment Provider, Shipping Profile, Shipping Option, and Shipping Methods.'
---
# Shipping Architecture Overview
This document gives an overview of the shipping architecture and its four most important components.
@@ -1,4 +1,9 @@
# Create a Subscriber
---
description: 'Learn how to create a subscriber in the Medusa server. You can use subscribers to implement functionalities like sending an order confirmation email.'
addHowToData: true
---
# How to Create a Subscriber
In this document, youll learn how to create a [Subscriber](overview.md) in your Medusa server that listens to events to perform an action.
@@ -1,3 +1,7 @@
---
description: 'Learn about the available events and their data payloads in Medusa. Events can be used to perform an action when the events are triggered.'
---
# Events Reference
This document details all events in Medusa, when they are triggered, and what data your handler method will receive when the event is triggered.
@@ -1,3 +1,7 @@
---
description: 'Learn what subscribers are in the Medusa server. Subscribers are used to listen to triggered events to perform an action.'
---
# Subscribers
In this document, you'll learn what Subscribers are in Medusa.
@@ -1,3 +1,7 @@
---
description: 'Learn what tax-inclusive pricing is and how it works in Medusa. Tax-inclusive pricing allows merchants to set the final prices for products and shipping options regardless of what tax rate is applicable for the customer.'
---
# Tax Inclusive Pricing
In this document, youll learn how tax-inclusive pricing works in Medusa.
@@ -1,3 +1,8 @@
---
description: 'Learn how to manually calculate taxes during checkout in the Medusa server. There are different methods including using endpoints or services.'
addHowToData: true
---
# Calculate Taxes Manually in Checkout
In this document, youll learn how to manually calculate taxes during checkout if you have automatic tax calculation disabled in a region.
@@ -1,5 +1,6 @@
---
hide_table_of_contents: true
description: 'Upgrade guides on how to update the Medusa server along with other Medusa components to the latest version.'
---
import DocCardList from '@theme/DocCardList';
@@ -1,3 +1,8 @@
---
description: 'Learn how to handle the order claim event in the Medusa server. When the event is triggered, you can send an email to the customer to inform them about it.'
addHowToData: true
---
# How to Handle Order Claim Event
In this document, youll learn how to handle the order claim event and send a confirmation email when the event is triggered.
@@ -1,4 +1,9 @@
# Send Gift Card Code to Customer
---
description: 'Learn how to send a gift card code to the customer. Once the customer purchases a gift card, an email can be sent with the code so that they can redeem the gift card.'
addHowToData: true
---
# How to Send Gift Card Code to Customer
In this document, youll learn how to send a customer the gift card code they purchased.
@@ -1,3 +1,8 @@
---
description: 'Learn how to implement customer account functionalities in your storefront using the REST APIs. This includes implementing customer registration, login, edit profile, and more.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -1,7 +1,12 @@
---
description: 'Learn how to implement order-edit related features in the storefront using REST APIs. This includes showing the customer order-edit requests, authorizing additional payments, and confirming or declining order edits.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# How to Handle an Order Edit
# How to Handle an Order Edit in Storefront
In this document, youll learn how to allow a customer to confirm or decline an Order Edit.
@@ -1,3 +1,8 @@
---
description: 'Learn how to implement the checkout flow in your storefront using the REST APIs. This includes adding steps related to shipping and payment, then placing the order.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -1,7 +1,12 @@
---
description: 'Learn how to implement the order-claim flow in the storefront. This includes allowing customers to claim their orders, and verify a claim to an order.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# How to Implement Claim Order Flow
# How to Implement Claim Order Flow in Storefront
In this document, youll learn how to implement the claim order flow in a storefront to allow customers to claim their orders.
@@ -1,3 +1,8 @@
---
description: 'Learn how to implement discount functionalities in your storefront using the REST APIs. This includes adding a discount to the cart, showing the discount details, and removing the discount from the cart.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -1,3 +1,8 @@
---
description: 'Learn how to implement gift-card related functionalities in your storefront using the REST APIs. This includes showing the gift card to customers and redeeming the gift card during checkout.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -1,3 +1,8 @@
---
description: 'Learn how to implement region-related functionalities on your storefront using the REST APIs. This includes showing the customer available regions, showing product prices, and setting the region of a cart.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
@@ -1,3 +1,8 @@
---
description: 'Learn how to implement sales channel functionalities in the storefront using REST APIs. This includes filtering products by Sales Channel and associating a cart with a sales channel.'
addHowToData: true
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';