This repository was archived by the owner on Aug 25, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrss.config.js
More file actions
39 lines (32 loc) · 1.11 KB
/
rss.config.js
File metadata and controls
39 lines (32 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const path = require('path');
module.exports = {
outputDir: path.resolve('dist'),
channel: {
title: 'Websanova',
url: process.env.VUE_APP_APP_URL,
description: 'Websanova Starter Kit Blog'
},
meta: [],
dynamicMeta: [{
url: process.env.VUE_APP_API_URL + '/articles/published?limit=500',
cb: (res) => {
let i, ii;
let meta = [];
for (i = 0, ii = res.data.items.length; i < ii; i++) {
(function () {
var item = res.data.items[i];
meta.push({
url: process.env.VUE_APP_APP_URL + '/articles/' + item.slug,
title: 'Websanova - ' + item.title,
keywords: item.keywords || item.title.toLowerCase().split(' ').join(', '),
description: item.body_short,
image: item.image,
published: item.release_at,
guid: item.guid
});
})(i);
}
return meta;
}
}]
};