@adobe/helix-md2jcr 1.0.12 → 1.0.14
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,3 +1,17 @@
|
|
|
1
|
+
## [1.0.14](https://github.com/adobe/helix-md2jcr/compare/v1.0.13...v1.0.14) (2025-02-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **sites-24827:** parse and map page properties ([#57](https://github.com/adobe/helix-md2jcr/issues/57)) ([93448a0](https://github.com/adobe/helix-md2jcr/commit/93448a0fb3da7694fc01513d598a16ae0f10eefb))
|
|
7
|
+
|
|
8
|
+
## [1.0.13](https://github.com/adobe/helix-md2jcr/compare/v1.0.12...v1.0.13) (2025-02-18)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **sites-29333:** update image block to use image not fileReference ([#56](https://github.com/adobe/helix-md2jcr/issues/56)) ([8b9cf28](https://github.com/adobe/helix-md2jcr/commit/8b9cf28063986ba3591bdea0b8a1144073b89a85))
|
|
14
|
+
|
|
1
15
|
## [1.0.12](https://github.com/adobe/helix-md2jcr/compare/v1.0.11...v1.0.12) (2025-02-11)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-md2jcr",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "Helix Service that converts markdown to JCR content structure",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@adobe/eslint-config-helix": "2.0.9",
|
|
58
|
-
"@adobe/helix-mediahandler": "2.6.
|
|
58
|
+
"@adobe/helix-mediahandler": "2.6.3",
|
|
59
59
|
"@commitlint/cli": "^19.6.1",
|
|
60
60
|
"@commitlint/config-conventional": "^19.6.0",
|
|
61
61
|
"@semantic-release/changelog": "6.0.3",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"mocha": "10.8.2",
|
|
74
74
|
"mocha-multi-reporters": "1.5.1",
|
|
75
75
|
"nock": "13.5.6",
|
|
76
|
-
"semantic-release": "24.2.
|
|
76
|
+
"semantic-release": "24.2.3",
|
|
77
77
|
"unist-util-inspect": "8.1.0",
|
|
78
78
|
"yauzl": "3.2.0"
|
|
79
79
|
},
|
|
@@ -39,7 +39,14 @@ function buildPageMetadata(table, models) {
|
|
|
39
39
|
const key = toString(cells[0]);
|
|
40
40
|
|
|
41
41
|
// if the model has the field, then add it to the metadata
|
|
42
|
-
|
|
42
|
+
let field;
|
|
43
|
+
if (Object.keys(aemMapping).includes(key.toLowerCase())) {
|
|
44
|
+
const aemValue = aemMapping[key.toLowerCase()];
|
|
45
|
+
field = getField(model, aemValue);
|
|
46
|
+
} else {
|
|
47
|
+
field = getField(model, key);
|
|
48
|
+
}
|
|
49
|
+
|
|
43
50
|
if (field) {
|
|
44
51
|
// if the field is an image then we need to dig into the row to find the image
|
|
45
52
|
if (find(row.children[1], { type: 'image' })) {
|
|
@@ -59,13 +66,9 @@ function buildPageMetadata(table, models) {
|
|
|
59
66
|
}
|
|
60
67
|
});
|
|
61
68
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const mappedKey = aemMapping[key] || key;
|
|
66
|
-
mappedMetadata[mappedKey] = value;
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
+
const mappedMetadata = { ...metadata };
|
|
70
|
+
// we need to add a property called modelFields for the Universal Editor
|
|
71
|
+
// that has all the fields for the model
|
|
69
72
|
if (model) {
|
|
70
73
|
const fields = getModelFields(model);
|
|
71
74
|
mappedMetadata.modelFields = `[${fields}]`;
|
|
@@ -18,7 +18,7 @@ function image(context) {
|
|
|
18
18
|
|
|
19
19
|
const encoded = encodeHtml(url);
|
|
20
20
|
return `<image${uniqueName} sling:resourceType="core/franklin/components/image/v1/image"
|
|
21
|
-
jcr:primaryType="nt:unstructured"
|
|
21
|
+
jcr:primaryType="nt:unstructured" image="${encoded}" alt="${alt}"/>\n`;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export default image;
|