diff --git a/docs/index.html b/docs/index.html
index a671f85e..cba19a49 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -31,7 +31,7 @@
-
+
diff --git a/docs/ja-JP/index.html b/docs/ja-JP/index.html
index 546f686b..cf759e48 100644
--- a/docs/ja-JP/index.html
+++ b/docs/ja-JP/index.html
@@ -33,7 +33,7 @@
-
+
diff --git a/docs/news/2020-09-18.html b/docs/news/2020-09-18.html
index 44ebccdb..65f4ed9d 100644
--- a/docs/news/2020-09-18.html
+++ b/docs/news/2020-09-18.html
@@ -26,8 +26,8 @@
-
-
+
+
diff --git a/docs/news/index.html b/docs/news/index.html
index 3852e14c..2d026af1 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -26,7 +26,7 @@
-
+
diff --git a/docs/news/rss.xml b/docs/news/rss.xml
index 1dd93a6a..83450466 100644
--- a/docs/news/rss.xml
+++ b/docs/news/rss.xml
@@ -6,7 +6,7 @@
News updates for the primer on Bézier Curves by Pomax
en-GB
- Tue Sep 22 2020 20:51:04 GMT-0700 (Pacific Daylight Time)
+ Wed Sep 23 2020 17:48:27 +00:00
https://pomax.github.io/bezierinfo/images/og-image.png
A Primer on Bézier Curves
@@ -61,7 +61,7 @@
<p>See you in the next post!</p>
<p>— Pomax</p>
- 2020-09-18
+ Thu Sep 17 2020 17:00:00 +00:00
2020-09-18.html
diff --git a/docs/zh-CN/index.html b/docs/zh-CN/index.html
index 2bd78cde..a39514bb 100644
--- a/docs/zh-CN/index.html
+++ b/docs/zh-CN/index.html
@@ -33,7 +33,7 @@
-
+
diff --git a/src/build/create-news-pages.js b/src/build/create-news-pages.js
index e34155f5..118af164 100644
--- a/src/build/create-news-pages.js
+++ b/src/build/create-news-pages.js
@@ -60,7 +60,9 @@ async function generatePost(file, localeStrings) {
const title = post.substring(post.indexOf(``) + 4, post.indexOf(`
`));
post = post.replace(`${title}
`, ``);
-
+ const postDateTime = new Date(postDate).toString();
+ const pubDate = `${postDateTime.substring(0, postDateTime.indexOf(`GMT`) - 1)} +00:00`;
+ const now = new Date().toString();
const renderContext = {
base,
post,
@@ -70,12 +72,12 @@ async function generatePost(file, localeStrings) {
filename,
locale,
dateString,
- publishTime: `${postDate}T12:00:00+00:00`,
- currentTime: new Date().toISOString().substring(0, 19) + "+00:00",
+ publishTime: pubDate,
+ currentTime: `${now.substring(0, now.indexOf("GMT") - 1)} +00:00`,
};
const newspage = nunjucks.render(`post.template.html`, renderContext);
fs.writeFileSync(path.join(paths.news, filename), newspage, `utf8`);
- return { filename, postDate, title, post, dateString };
+ return { filename, pubDate, title, post, dateString };
}
/**
@@ -96,9 +98,10 @@ function generateNewsIndex(details) {
* ...docs go here...
*/
function generateRSSFeed(details) {
+ const now = new Date().toString();
const renderContext = {
items: details,
- buildDate: new Date(),
+ buildDate: `${now.substring(0, now.indexOf(`GMT`) - 1)} +00:00`,
};
const index = nunjucks.render(`rss.template.xml`, renderContext);
fs.writeFileSync(path.join(paths.news, `rss.xml`), index, `utf8`);
diff --git a/src/html/rss.template.xml b/src/html/rss.template.xml
index 2ab267a9..f8c2f22e 100644
--- a/src/html/rss.template.xml
+++ b/src/html/rss.template.xml
@@ -18,7 +18,7 @@
{{ item.title }}
https://pomax.github.io/bezierinfo/news/{{ item.filename }}
{{ item.post | escape }}
- {{ item.postDate }}
+ {{ item.pubDate }}
{{ item.filename }}
{% endfor %}