vanilla-jet 1.2.0 → 1.2.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/framework/dipper.js +1 -1
- package/framework/functions.js +10 -2
- package/package.json +1 -1
package/framework/dipper.js
CHANGED
|
@@ -67,7 +67,7 @@ Dipper.prototype.getFbAppId = function() {
|
|
|
67
67
|
return obj.fbAppId;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
Dipper.prototype.addMeta = function(name, content, attribute) {
|
|
70
|
+
Dipper.prototype.addMeta = function({name, content, attribute}) {
|
|
71
71
|
|
|
72
72
|
let obj = this;
|
|
73
73
|
attribute = attribute || 'name';
|
package/framework/functions.js
CHANGED
|
@@ -90,7 +90,11 @@ class Functions {
|
|
|
90
90
|
{ name: 'theme-color', content: '#ffffff' }
|
|
91
91
|
];
|
|
92
92
|
basicMeta.forEach(meta => {
|
|
93
|
-
dipper.addMeta(
|
|
93
|
+
dipper.addMeta({
|
|
94
|
+
name: meta.name,
|
|
95
|
+
content: meta.content || null,
|
|
96
|
+
attribute: meta.attribute || null
|
|
97
|
+
});
|
|
94
98
|
});
|
|
95
99
|
|
|
96
100
|
// Add Open Graph meta tags
|
|
@@ -104,7 +108,11 @@ class Functions {
|
|
|
104
108
|
'og:locale': 'es_MX',
|
|
105
109
|
};
|
|
106
110
|
Object.entries(openGraphMeta).forEach(([key, value]) => {
|
|
107
|
-
dipper.addMeta(
|
|
111
|
+
dipper.addMeta({
|
|
112
|
+
name: key,
|
|
113
|
+
content: value,
|
|
114
|
+
attribute: 'property'
|
|
115
|
+
});
|
|
108
116
|
});
|
|
109
117
|
}
|
|
110
118
|
}
|