@graphcommerce/docs 6.0.0-canary.28 → 6.0.0-canary.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 6.0.0-canary.30
4
+
5
+ ## 6.0.0-canary.29
6
+
7
+ ### Minor Changes
8
+
9
+ - [#1828](https://github.com/graphcommerce-org/graphcommerce/pull/1828) [`3df85faf1`](https://github.com/graphcommerce-org/graphcommerce/commit/3df85faf189b95e2c7d9c3fc756474fcafb1c8b4) - Added new `productRoute` configuration to create freedom in the actual product route used (default: /p/). Simplified redirects from legacy product routes to new routes by creating redirects. ([@paales](https://github.com/paales))
10
+
3
11
  ## 6.0.0-canary.28
4
12
 
5
13
  ### Patch Changes
@@ -47,6 +47,10 @@ Examples:
47
47
  - `debug.pluginStatus` -> `GC_DEBUG_PLUGIN_STATUS="1"`
48
48
 
49
49
 
50
+ ## Exporting current configuration to environment variables
51
+
52
+ You can export configuration by running `yarn graphcommerce export-config`
53
+
50
54
  ## Extending the configuration in your project
51
55
 
52
56
  Create a graphql/Config.graphqls file in your project and extend the GraphCommerceConfig, GraphCommerceI18nConfig inputs to add configuration.
@@ -151,6 +155,8 @@ On older versions of GraphCommerce products would use a product type specific ro
151
155
 
152
156
  This should only be set to true if you use the /product/[url] AND /product/configurable/[url] routes.
153
157
 
158
+ @deprecated Will be removed in a future version. [migration](../upgrading/graphcommerce-5-to-6.md#product-routing-changes)
159
+
154
160
  #### `limitSsg: Boolean`
155
161
 
156
162
  Limit the static generation of SSG when building
@@ -165,6 +171,13 @@ Product filters with better UI for mobile and desktop.
165
171
 
166
172
  @experimental This is an experimental feature and may change in the future.
167
173
 
174
+ #### `productRoute: String`
175
+
176
+ By default we route products to /p/[url] but you can change this to /product/[url] if you wish.
177
+
178
+ Default: '/p/'
179
+ Example: '/product/'
180
+
168
181
  #### `robotsAllow: Boolean`
169
182
 
170
183
  Allow the site to be indexed by search engines.
@@ -10,7 +10,8 @@ better performance.
10
10
  ## How are routes handled?
11
11
 
12
12
  - Products have a different URL structure: `/p/[url]`. e.g.
13
- `/p/my-product-url-key`.
13
+ `/p/my-product-url-key` (different route can be configured with
14
+ [productRoute config](../framework/config.md#productroute-string))
14
15
  - Categories use same URL structure: `/[...url]`. e.g. `/my/category/path`.
15
16
  - GraphCommerce does not use any URL suffixes. e.g. `.html`.
16
17
 
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "name": "@graphcommerce/docs",
3
3
  "homepage": "https://www.graphcommerce.org/docs",
4
4
  "repository": "github:graphcommerce-org/graphcommerce/docs",
5
- "version": "6.0.0-canary.28",
5
+ "version": "6.0.0-canary.30",
6
6
  "sideEffects": true,
7
7
  "devDependencies": {
8
- "@graphcommerce/prettier-config-pwa": "6.0.0-canary.28"
8
+ "@graphcommerce/prettier-config-pwa": "6.0.0-canary.30"
9
9
  },
10
10
  "prettier": "@graphcommerce/prettier-config-pwa"
11
11
  }
@@ -32,6 +32,19 @@ function MyComponent() {
32
32
  }
33
33
  ```
34
34
 
35
+ ### Product routing changes
36
+
37
+ The route for the product has changed from `/product/[url]`,
38
+ `/product/configurable/[url]`, etc. to `/p/[url]` by default. This is a
39
+ singlular product page for all product types.
40
+
41
+ You can opt in to use the
42
+ [legacyProductRoute](../framework/config.md#legacyproductroute-boolean) to keep
43
+ the old behavior. This legacy routing will be removed in a future version.
44
+
45
+ You can also change the product route from `/p/[url]` to something else by
46
+ configuring [productRoute](../framework/config.md#productroute-string)
47
+
35
48
  ### Upgrading a Link that uses next/link props
36
49
 
37
50
  ```tsx