Skip to content

Commit daeec83

Browse files
authored
Add a short section for url customisation in README (#281)
* add url customisation feature to readme
1 parent 339a49f commit daeec83

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

packages/pwa/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,27 @@ Now that the development server is running, you can open a browser and preview y
2929

3030
See the [Localization README.md](./app/translations/README.md) for important setup instructions for localization.
3131

32+
## Url Customisation
33+
34+
The Retail React App allows you to customize certain aspects of the url. Currently, you can choose where the current
35+
locale is displayed, whether it is in the urls path, query parameters, or not displayed.
36+
Below are the details of the possible configuration values.
37+
38+
- `path`: the locale will be a part of url path. e.g /en-US/women/dress
39+
- `query_param`: the locale will be a url query param. e.g /women/dress?locale=en-US
40+
- `none`: the locale won't be showing in the url at all. e.g /women/dress
41+
42+
By default, we set up the locale to be an url path.
43+
44+
```json
45+
// pwa-kit.config.json
46+
{
47+
"url": {
48+
"locale": "path|query_param|none"
49+
}
50+
}
51+
```
52+
3253
## Documentation
3354

3455
The full documentation for PWA Kit is hosted on the [Commerce Cloud Developer Center](https://developer.commercecloud.com/s/article/PWA-Kit).

0 commit comments

Comments
 (0)