From 4e49d0faaeb7d4ce38466e820b6eb1405f949bc4 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Thu, 22 Aug 2024 17:53:10 -0700 Subject: [PATCH] fix: missing type prevented markup from being parsed properly for all feed --- config/collections/index.js | 3 ++- config/filters/index.js | 4 +--- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/config/collections/index.js b/config/collections/index.js index 47b71d1a..813fcd36 100644 --- a/config/collections/index.js +++ b/config/collections/index.js @@ -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 diff --git a/config/filters/index.js b/config/filters/index.js index 5e16ce1e..9b6301bd 100644 --- a/config/filters/index.js +++ b/config/filters/index.js @@ -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, diff --git a/package-lock.json b/package-lock.json index 44871501..de7ad7a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "22.5.1", + "version": "22.5.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "22.5.1", + "version": "22.5.2", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.5.0", diff --git a/package.json b/package.json index 6baa5233..dcccbd46 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "22.5.1", + "version": "22.5.2", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "scripts": {