@adobe/helix-html-pipeline 6.25.4 → 6.26.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 +14 -0
- package/package.json +5 -5
- package/src/steps/extract-metadata.js +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [6.26.0](https://github.com/adobe/helix-html-pipeline/compare/v6.25.5...v6.26.0) (2025-06-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add support for canonical and title suffix ([7f07e29](https://github.com/adobe/helix-html-pipeline/commit/7f07e29f2b922a318c2eee4a33729980e085e84a)), closes [#895](https://github.com/adobe/helix-html-pipeline/issues/895)
|
|
7
|
+
|
|
8
|
+
## [6.25.5](https://github.com/adobe/helix-html-pipeline/compare/v6.25.4...v6.25.5) (2025-06-18)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update dependency @adobe/remark-gridtables to v3.0.14 ([#889](https://github.com/adobe/helix-html-pipeline/issues/889)) ([7107b8f](https://github.com/adobe/helix-html-pipeline/commit/7107b8f8e053bdca7cb9e3a917990ab4bcbe64c3))
|
|
14
|
+
|
|
1
15
|
## [6.25.4](https://github.com/adobe/helix-html-pipeline/compare/v6.25.3...v6.25.4) (2025-06-17)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-html-pipeline",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.26.0",
|
|
4
4
|
"description": "Helix HTML Pipeline",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@adobe/helix-markdown-support": "7.1.12",
|
|
46
46
|
"@adobe/helix-shared-utils": "3.0.2",
|
|
47
47
|
"@adobe/mdast-util-gridtables": "4.0.13",
|
|
48
|
-
"@adobe/remark-gridtables": "3.0.
|
|
48
|
+
"@adobe/remark-gridtables": "3.0.14",
|
|
49
49
|
"github-slugger": "2.0.0",
|
|
50
50
|
"hast-util-raw": "9.1.0",
|
|
51
51
|
"hast-util-select": "6.0.4",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"unist-util-visit-parents": "6.0.1"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@adobe/eslint-config-helix": "3.0.
|
|
73
|
+
"@adobe/eslint-config-helix": "3.0.5",
|
|
74
74
|
"@eslint/config-helpers": "0.2.3",
|
|
75
75
|
"@markedjs/html-differ": "5.0.2",
|
|
76
76
|
"@semantic-release/changelog": "6.0.3",
|
|
@@ -80,14 +80,14 @@
|
|
|
80
80
|
"eslint": "9.4.0",
|
|
81
81
|
"eslint-import-resolver-exports": "1.0.0-beta.5",
|
|
82
82
|
"eslint-plugin-header": "3.1.1",
|
|
83
|
-
"eslint-plugin-import": "2.
|
|
83
|
+
"eslint-plugin-import": "2.32.0",
|
|
84
84
|
"esmock": "2.7.0",
|
|
85
85
|
"husky": "9.1.7",
|
|
86
86
|
"js-yaml": "4.1.0",
|
|
87
87
|
"jsdom": "26.1.0",
|
|
88
88
|
"junit-report-builder": "5.1.1",
|
|
89
89
|
"lint-staged": "16.1.2",
|
|
90
|
-
"mocha": "11.
|
|
90
|
+
"mocha": "11.7.0",
|
|
91
91
|
"mocha-multi-reporters": "1.5.1",
|
|
92
92
|
"mocha-suppress-logs": "0.5.1",
|
|
93
93
|
"semantic-release": "24.2.5"
|
|
@@ -233,12 +233,27 @@ export default function extractMetaData(state, req) {
|
|
|
233
233
|
}
|
|
234
234
|
meta.title = content.title;
|
|
235
235
|
}
|
|
236
|
+
// append the title suffix
|
|
237
|
+
const titleSuffix = metaConfig['title:suffix'];
|
|
238
|
+
delete metaConfig['title:suffix'];
|
|
239
|
+
if (meta.title && titleSuffix && titleSuffix !== '""') {
|
|
240
|
+
meta.title += titleSuffix;
|
|
241
|
+
}
|
|
242
|
+
|
|
236
243
|
if (!('description' in meta)) {
|
|
237
244
|
meta.description = extractDescription(hast) || undefined;
|
|
238
245
|
}
|
|
239
246
|
|
|
240
247
|
// use the req.url and not the state.info.path in case of folder mapping
|
|
241
248
|
meta.url = makeCanonicalHtmlUrl(getAbsoluteUrl(state, req.url.pathname));
|
|
249
|
+
|
|
250
|
+
// append canonical extension
|
|
251
|
+
const canonicalExt = metaConfig['canonical:extension'];
|
|
252
|
+
delete metaConfig['canonical:extension'];
|
|
253
|
+
if (canonicalExt && !meta.url.endsWith('/')) {
|
|
254
|
+
meta.url = `${meta.url}.${canonicalExt}`;
|
|
255
|
+
}
|
|
256
|
+
|
|
242
257
|
if (!('canonical' in meta)) {
|
|
243
258
|
meta.canonical = meta.url;
|
|
244
259
|
}
|