@scayle/storefront-product-listing 2.1.3 → 2.2.0
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,14 @@
|
|
|
1
1
|
# @scayle/storefront-product-listing
|
|
2
2
|
|
|
3
|
+
## 2.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Improved SEO handling for paginated product listing pages by setting the `noindex` robots meta tag for pages greater than 1.
|
|
8
|
+
|
|
9
|
+
Previously, all paginated PLPs (e.g., `/category?page=2`, `/category?page=3`) were set to `index, follow`, which causes index bloat by presenting thousands of structurally similar pages to search engines.
|
|
10
|
+
This change ensures only the first page of each listing is indexed, following SEO best practices.
|
|
11
|
+
|
|
3
12
|
## 2.1.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, addImportsDir } from '@nuxt/kit';
|
|
2
2
|
|
|
3
3
|
const PACKAGE_NAME = "@scayle/storefront-product-listing";
|
|
4
|
-
const PACKAGE_VERSION = "2.
|
|
4
|
+
const PACKAGE_VERSION = "2.2.0";
|
|
5
5
|
const module = defineNuxtModule({
|
|
6
6
|
meta: {
|
|
7
7
|
name: PACKAGE_NAME,
|
|
@@ -7,7 +7,8 @@ import { useAppliedFilters } from "./useAppliedFilters.js";
|
|
|
7
7
|
export function useProductListingSeoData(breadcrumbs, route, { baseUrl, fullPath }, isDefaultSortSelected) {
|
|
8
8
|
const { areFiltersApplied } = useAppliedFilters(route);
|
|
9
9
|
const robots = computed(() => {
|
|
10
|
-
|
|
10
|
+
const pageNumber = Number(route.query.page) || 1;
|
|
11
|
+
return !areFiltersApplied.value && toValue(isDefaultSortSelected) && pageNumber === 1 ? "index,follow" : "noindex,follow";
|
|
11
12
|
});
|
|
12
13
|
const canonicalLink = computed(
|
|
13
14
|
() => robots.value.includes("noindex") ? [] : [{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-product-listing",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Collection of essential composables and utilities to work with product listing",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@arethetypeswrong/cli": "0.18.2",
|
|
44
|
-
"@nuxt/kit": "3.
|
|
44
|
+
"@nuxt/kit": "3.20.0",
|
|
45
45
|
"@nuxt/module-builder": "1.0.2",
|
|
46
|
-
"@nuxt/schema": "3.
|
|
46
|
+
"@nuxt/schema": "3.20.0",
|
|
47
47
|
"@nuxt/test-utils": "3.20.1",
|
|
48
48
|
"@types/node": "22.18.13",
|
|
49
49
|
"@vitest/coverage-v8": "3.2.4",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"eslint-formatter-gitlab": "6.0.1",
|
|
53
53
|
"eslint": "9.38.0",
|
|
54
54
|
"fishery": "2.3.1",
|
|
55
|
-
"happy-dom": "20.0.
|
|
56
|
-
"nuxt": "3.
|
|
55
|
+
"happy-dom": "20.0.10",
|
|
56
|
+
"nuxt": "3.20.0",
|
|
57
57
|
"publint": "0.3.15",
|
|
58
58
|
"schema-dts": "1.1.5",
|
|
59
59
|
"typescript": "5.9.3",
|