From 7dd77a913ecf60994ecd949724929abc03b28d80 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Sat, 29 Jun 2024 12:41:07 -0700 Subject: [PATCH] fix: full text feed parsing --- config/filters/index.js | 10 ++++++++++ package-lock.json | 18 +++++++++--------- package.json | 2 +- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/config/filters/index.js b/config/filters/index.js index d2317026..593022a3 100644 --- a/config/filters/index.js +++ b/config/filters/index.js @@ -1,6 +1,8 @@ import { DateTime } from 'luxon' 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 { shuffleArray, sanitizeMediaString } from '../utilities/index.js' @@ -87,6 +89,14 @@ export default { let title = entry.title const feedNote = '

This is a full text feed, but not all content can be rendered perfectly within the feed. If something looks off, feel free to visit my site for the original post.

' + md.use(markdownItAnchor, { + level: [1, 2], + permalink: markdownItAnchor.permalink.headerLink({ + safariReaderFix: true, + }), + }) + md.use(markdownItFootnote) + // set the entry url if (entry.url?.includes('http')) url = entry.url if (!entry.url?.includes('http')) url = new URL(entry.url, BASE_URL).toString() diff --git a/package-lock.json b/package-lock.json index d09b84a6..0c899f4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "19.6.18", + "version": "19.6.19", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "19.6.18", + "version": "19.6.19", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.4.0", @@ -1157,9 +1157,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.4.814", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.814.tgz", - "integrity": "sha512-GVulpHjFu1Y9ZvikvbArHmAhZXtm3wHlpjTMcXNGKl4IQ4jMQjlnz8yMQYYqdLHKi/jEL2+CBC2akWVCoIGUdw==", + "version": "1.4.815", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.815.tgz", + "integrity": "sha512-OvpTT2ItpOXJL7IGcYakRjHCt8L5GrrN/wHCQsRB4PQa1X9fe+X9oen245mIId7s14xvArCGSTIq644yPUKKLg==", "dev": true, "license": "ISC" }, @@ -2748,9 +2748,9 @@ } }, "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "version": "8.4.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", + "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", "dev": true, "funding": [ { @@ -2769,7 +2769,7 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.0", + "picocolors": "^1.0.1", "source-map-js": "^1.2.0" }, "engines": { diff --git a/package.json b/package.json index aab36ed6..f4fdc58f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "19.6.18", + "version": "19.6.19", "description": "The source for my personal site. Built using 11ty.", "type": "module", "scripts": {