fix: missing type prevented markup from being parsed properly for all feed

This commit is contained in:
Cory Dransfeldt 2024-08-22 17:53:10 -07:00
parent 51dd4db062
commit 4e49d0faae
No known key found for this signature in database
4 changed files with 6 additions and 7 deletions

View file

@ -98,7 +98,8 @@ export const processContent = (collection) => {
const content = {
url: `${BASE_URL}${item['url']}`,
title: `${icon}: ${getTitle(item)}${attribution ? ' via ' + attribution : ''}${hashTags}`
title: `${icon}: ${getTitle(item)}${attribution ? ' via ' + attribution : ''}${hashTags}`,
type: item['type']
}
// set url for link posts

View file

@ -3,7 +3,7 @@ import { URL } from 'url'
import markdownIt from 'markdown-it'
import markdownItAnchor from 'markdown-it-anchor'
import markdownItFootnote from 'markdown-it-footnote'
import sanitizeHtml from 'sanitize-html';
import sanitizeHtml from 'sanitize-html'
import { shuffleArray, sanitizeMediaString } from '../utilities/index.js'
@ -143,9 +143,7 @@ export default {
if (entry?.['slug'] && entry['content']) excerpt = sanitizeHtml(`${md.render(entry['content'])}${feedNote}`, {
disallowedTagsMode: 'completelyDiscard'
})
if (entry['backdrop']) image = entry['backdrop']
if (entry) posts.push({
title: title.trim(),
url,