fix errors with missing descriptions
This commit is contained in:
parent
4ed28e7e6d
commit
9b9d25504e
9
lib.js
9
lib.js
@ -210,7 +210,7 @@ export const createPosts = async (channel, source, fromDate, reducerCallback) =>
|
|||||||
|
|
||||||
export const createPost = (item, source) => {
|
export const createPost = (item, source) => {
|
||||||
let description = item.querySelector('description')
|
let description = item.querySelector('description')
|
||||||
description = description === null ? '' : new JSDOM(description.textContent).window.document
|
description = new JSDOM(description === null ? '' : description.textContent).window.document
|
||||||
|
|
||||||
let date = readPubDate(item.querySelector('pubDate'))
|
let date = readPubDate(item.querySelector('pubDate'))
|
||||||
let link = item.querySelector('link')?.textContent
|
let link = item.querySelector('link')?.textContent
|
||||||
@ -424,12 +424,14 @@ export const imageExtensions = {
|
|||||||
'image/avif': '.avif',
|
'image/avif': '.avif',
|
||||||
'image/bmp': '.bmp',
|
'image/bmp': '.bmp',
|
||||||
'image/gif': '.gif',
|
'image/gif': '.gif',
|
||||||
|
'image/gifv': '.gifv',
|
||||||
'image/vnd.microsoft.icon': '.icon',
|
'image/vnd.microsoft.icon': '.icon',
|
||||||
'image/jpeg': '.jpg',
|
'image/jpeg': '.jpg',
|
||||||
'image/png': '.png',
|
'image/png': '.png',
|
||||||
'image/svg+xml': '.xml',
|
'image/svg+xml': '.xml',
|
||||||
'image/tiff': '.tif',
|
'image/tiff': '.tif',
|
||||||
'image/webp': '.webp'
|
'image/webp': '.webp',
|
||||||
|
'image/webm': '.gifv'
|
||||||
}
|
}
|
||||||
|
|
||||||
export const pullImages = async (post, view, discardPostIfNoImages = false, getPostId = getPostIdFromPathname) => {
|
export const pullImages = async (post, view, discardPostIfNoImages = false, getPostId = getPostIdFromPathname) => {
|
||||||
@ -550,6 +552,7 @@ export const writeView = (sources, feeds, view) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(let page of pages) {
|
for(let page of pages) {
|
||||||
|
console.log('Writing page', page)
|
||||||
writePage(page, view)
|
writePage(page, view)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -596,6 +599,8 @@ export const createPages = (list, view) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(list)
|
||||||
|
|
||||||
return pages
|
return pages
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user