Skip to content

Commit 6cfecf0

Browse files
committed
update README
1 parent a2113da commit 6cfecf0

File tree

1 file changed

+14
-28
lines changed

1 file changed

+14
-28
lines changed

packages/extension-commerce-bm-seo/README.md

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,22 @@
1-
# SEO Extension
1+
# Commerce Business Manager SEO Extension
22

3-
A [PWA Kit](https://github.com/SalesforceCommerceCloud/pwa-kit) extension that adds SEO functionality to your application through the [Shopper SEO URL Mapping API](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-seo?meta=getUrlMapping). This extension provides features like:
3+
A [PWA Kit](https://github.com/SalesforceCommerceCloud/pwa-kit) extension that synchronizes Business Manager-managed routes with your PWA Kit application using the [Shopper SEO URL Mapping API](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-seo?meta=getUrlMapping). This extension provides the following capabilities:
44

55
- Integrate routes managed in Business Manager with the PWA Kit
6-
- Integration with SCAPI Shopper SEO URL Mapping API
7-
- Support for multiple resource types (products, categories)
6+
- Integration with the SCAPI Shopper SEO URL Mapping API
7+
- Support for multiple resource types including products, categories, and redirects
8+
9+
Note: Using this extension will impact performance as it requires API calls during navigation.
810

911
## Installation
1012

1113
```sh
1214
npm install @salesforce/extension-commerce-bm-seo
13-
14-
# Also:
15-
# - install the peer dependencies listed in the package.json
16-
# - see the Peer Dependancies section below for any other steps (e.g. make sure your app uses CommerceApiProvider component)
1715
```
1816

19-
## Peer Dependencies
20-
21-
PWA-Kit Application Extensions are NPM packages at their most simplest form, and as such you can define
22-
what peer dependencies are required when using it. Because this application extension provides
23-
Chakra UI via a page and components, it requires that the some peer dependencies are installed.
24-
25-
Depending on what features your application extensions provides it's recommended you include any third-party
26-
packages as peer dependencies so that your base application doesn't end up having multiple versions of a
27-
given package. See package.json for the full list of peer dependencies.
28-
2917
## Configuration
3018

31-
The SEO extension is configured via the `mobify.app.extensions` property in your config files or `package.json`:
19+
The SEO extension is configured via your config file (e.g. `app/config/default.json`) or the key `mobify.app.extensions` in your `package.json`:
3220

3321
```json
3422
{
@@ -53,7 +41,7 @@ The SEO extension is configured via the `mobify.app.extensions` property in your
5341
},
5442
"resourceTypeToComponentMap": {
5543
"category": "ProductList",
56-
"product": "ProductDetail",
44+
"product": "ProductDetail"
5745
}
5846
}
5947
]
@@ -75,17 +63,15 @@ The SEO extension is configured via the `mobify.app.extensions` property in your
7563
- `commerceAPIAuth`: Authentication configuration
7664
- `propertyNameInLocals`: Property name for storing auth in locals
7765
- `resourceTypeToComponentMap`: Maps resource types to component names
78-
- `category`: Component name for category pages
79-
- `product`: Component name for product pages
80-
- `content_asset`: Component name for content assets
66+
- `category`: Name of component for category pages
67+
- `product`: Name of component for product pages
68+
- `content_asset`: Name of component for content assets
8169

8270
## How It Works
8371

8472
The SEO extension works by:
8573

86-
1. Intercepting incoming requests
74+
1. Blocking navigation
8775
2. Querying the Shopper SEO API for URL mappings
88-
3. Dynamically routing to the appropriate component based on the resource type
89-
4. Passing the relevant props to the component
90-
91-
The extension uses the Commerce API's Shopper SEO URL Mapping endpoint to handle SEO-friendly URLs and ensure proper routing within your PWA Kit application.
76+
3. Routing to the appropriate component based on the resource type
77+
4. Passing relevant props to the component

0 commit comments

Comments
 (0)