sitemap.xml works with articles
This commit is contained in:
1 parent
f2d26a510d
commit
96c966e427
66 files changed
+3
-1836
No files matched your search
+3
-17
@@ -13,8 +13,7 @@ export default function () {
|
||||
getPageUrls(),
|
||||
getGalleryUrls(),
|
||||
getTeacherUrls(),
|
||||
getEventsUrls(),
|
||||
getNewsUrls()
|
||||
getArticleUrls(),
|
||||
]);
|
||||
urls = urls.reduce((urls, i) => urls.concat(i));
|
||||
|
||||
@@ -72,8 +71,8 @@ async function getTeacherUrls() {
|
||||
});
|
||||
}
|
||||
|
||||
async function getEventsUrls() {
|
||||
let docs = await c('events')
|
||||
async function getArticleUrls() {
|
||||
let docs = await c('articles')
|
||||
.find({})
|
||||
.toArray();
|
||||
|
||||
@@ -84,16 +83,3 @@ async function getEventsUrls() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function getNewsUrls() {
|
||||
let docs = await c('timeline')
|
||||
.find({type: 'post'})
|
||||
.toArray();
|
||||
|
||||
return docs.map(i => {
|
||||
return {
|
||||
url: `/article/${i.id}`,
|
||||
changefreq: 'monthly'
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user