@tryghost/mg-medium-export 0.16.3 → 0.17.1
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/lib/process-content.js +7 -3
- package/package.json +6 -6
package/lib/process-content.js
CHANGED
|
@@ -101,14 +101,18 @@ export default ({content, post}) => {
|
|
|
101
101
|
let href = $(el).find('.markup--anchor').attr('href');
|
|
102
102
|
cardOpts.payload.url = href;
|
|
103
103
|
|
|
104
|
-
let src = $(el).find('.js-mixtapeImage').css('background-image').replace(/url\((.*?)\)/, (m, p) => p);
|
|
105
104
|
cardOpts.payload.metadata = {
|
|
106
105
|
url: href,
|
|
107
106
|
title: $(el).find('.markup--strong').text(),
|
|
108
|
-
description: $(el).find('.markup--em').text()
|
|
109
|
-
thumbnail: src
|
|
107
|
+
description: $(el).find('.markup--em').text()
|
|
110
108
|
};
|
|
111
109
|
|
|
110
|
+
const bngImage = $(el).find('.js-mixtapeImage').css('background-image');
|
|
111
|
+
if (bngImage) {
|
|
112
|
+
let src = bngImage.replace(/url\((.*?)\)/, (m, p) => p);
|
|
113
|
+
cardOpts.payload.metadata.thumbnail = src;
|
|
114
|
+
}
|
|
115
|
+
|
|
112
116
|
const bookmarkHtml = serializer.serialize(bookmarkCard.render(cardOpts));
|
|
113
117
|
|
|
114
118
|
$(el).replaceWith(`<!--kg-card-begin: html-->\n${bookmarkHtml}\n<!--kg-card-end: html-->`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryghost/mg-medium-export",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "tbc",
|
|
5
5
|
"repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-medium-export",
|
|
6
6
|
"author": "Ghost Foundation",
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"eslint": "8.
|
|
24
|
+
"eslint": "8.56.0",
|
|
25
25
|
"jest": "29.7.0",
|
|
26
26
|
"jest-extended": "4.0.2"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@tryghost/debug": "0.1.
|
|
29
|
+
"@tryghost/debug": "0.1.27",
|
|
30
30
|
"@tryghost/kg-default-cards": "9.1.9",
|
|
31
|
-
"@tryghost/mg-fs-utils": "^0.12.
|
|
32
|
-
"@tryghost/string": "0.2.
|
|
31
|
+
"@tryghost/mg-fs-utils": "^0.12.22",
|
|
32
|
+
"@tryghost/string": "0.2.11",
|
|
33
33
|
"cheerio": "1.0.0-rc.12",
|
|
34
34
|
"date-fns": "2.30.0",
|
|
35
35
|
"simple-dom": "1.4.0"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "eff0d7d7ba1a0ce1d89dd15a0671b23ea4ef9307"
|
|
38
38
|
}
|