sfc-utils 1.4.81 → 1.4.83

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.
@@ -135,6 +135,14 @@ const LayoutHelmet = ({
135
135
  "description": "${DESCRIPTION}"
136
136
  }`;
137
137
 
138
+ // Format the date for WCM, cut off at the period
139
+ let formattedPubDate = "";
140
+ try {
141
+ formattedPubDate = ISO_PUBDATE.split(".")[0].replace("T", " ");
142
+ } catch (err) {
143
+ // It's ok
144
+ }
145
+
138
146
  return (
139
147
  <Helmet>
140
148
  <title>{TITLE}</title>
@@ -171,6 +179,7 @@ const LayoutHelmet = ({
171
179
  />
172
180
  <meta property="og:image" content={IMAGE} />
173
181
  <meta property="og:description" content={DESCRIPTION} />
182
+ <meta property="og:datePublished" content={formattedPubDate} />
174
183
 
175
184
  <script
176
185
  data-schema={schemaOverride.type || "NewsArticle"}
package/index.js CHANGED
@@ -71,14 +71,18 @@ let blendHDN = function (meta) {
71
71
  let pubdate = "";
72
72
  let pubTime = "";
73
73
  if (ISO_PUBDATE) {
74
- pubdate = ISO_PUBDATE.toString().split("T")[0]; // + " 00:00:00";
74
+ pubdate = ISO_PUBDATE.toString().split("T")[0] + " 00:00:00";
75
75
  const pubdateTime = pubdate + "T" + "00:00:00";
76
76
  pubTime = new Date(pubdateTime).getTime();
77
+ } else {
78
+ // If we don't have a pubdate, use today
79
+ pubdate = new Date().toISOString().split("T")[0] + " 00:00:00";
80
+ pubTime = new Date().getTime();
77
81
  }
78
82
  let moddate = "";
79
83
  let modTime = "";
80
84
  if (ISO_MODDATE) {
81
- moddate = ISO_MODDATE.toString().split("T")[0]; // + " 00:00:00";
85
+ moddate = ISO_MODDATE.toString().split("T")[0] + " 00:00:00";
82
86
  const moddateTime = moddate + "T" + "00:00:00";
83
87
  modTime = new Date(moddateTime).getTime();
84
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sfc-utils",
3
- "version": "1.4.81",
3
+ "version": "1.4.83",
4
4
  "author": "ewagstaff <evanjwagstaff@gmail.com>",
5
5
  "dependencies": {
6
6
  "archieml": "^0.4.2",