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,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).
---