Skip to content

Commit 55d11e2

Browse files
committed
refactor(rss): remove workaround for incorrect parse dates
1 parent 98917f7 commit 55d11e2

7 files changed

Lines changed: 105 additions & 64 deletions

File tree

content/blog/2020-03-19-news.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: News
33
description: 'News description'
4-
publishedAt: '2020-03-25T10:12:00.000Z'
5-
updatedAt: '2020-03-25T10:12:00.000Z'
4+
publishedAt: 2020-03-25T10:12:00.000Z
5+
updatedAt: 2020-03-25T10:12:00.000Z
66
published: false
77
tags:
88
- fouc

content/blog/2020-03-20-blog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: Blog
33
description: blog description
4-
publishedAt: '2020-03-25T10:12:00.000Z'
5-
updatedAt: '2020-03-25T10:12:00.000Z'
4+
publishedAt: 2020-03-25T10:12:00.000Z
5+
updatedAt: 2020-03-25T10:12:00.000Z
66
published: true
77
tags: [rss]
88
authors:

content/blog/2020-03-21-food.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: Food
33
description: Food description
4-
publishedAt: '2020-03-25T10:12:00.000Z'
5-
updatedAt: '2020-03-25T10:12:00.000Z'
4+
publishedAt: 2020-03-25T10:12:00.000Z
5+
updatedAt: 2020-03-25T10:12:00.000Z
66
published: true
77
tags: [lazy-images]
88
authors:

package-lock.json

Lines changed: 95 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@angular/router": "11.0.2",
2828
"@scullyio/init": "1.0.1",
2929
"@scullyio/ng-lib": "1.0.0",
30-
"@scullyio/scully": "1.0.4",
30+
"@scullyio/scully": "1.0.5",
3131
"rxjs": "6.6.0",
3232
"tslib": "2.0.0",
3333
"zone.js": "0.10.3"

plugins/rss/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
},
3838
"dependencies": {
3939
"feed": "^4.2.1",
40-
"showdown": "^1.9.1",
41-
"dayjs": "^1.9.6"
40+
"showdown": "^1.9.1"
4241
}
4342
}

plugins/rss/src/rss.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const dayjs = require('dayjs');
21
const Feed = require('feed').Feed;
32
const showdown = require('showdown');
43
const { writeFileSync, readFileSync } = require('fs');
@@ -85,8 +84,8 @@ const createFeedItemFromRoute = (route) => {
8584
}))
8685
: [],
8786
date: route.data.updatedAt
88-
? dayjs(route.data.updatedAt).toDate()
89-
: dayjs(route.data.publishedAt).toDate(),
87+
? route.data.updatedAt
88+
: route.data.publishedAt,
9089
image: route.data.twitterBanner,
9190
};
9291
}

0 commit comments

Comments
 (0)