diff --git a/config/filters/index.js b/config/filters/index.js
index 43e4a3e0..a24b1cd8 100644
--- a/config/filters/index.js
+++ b/config/filters/index.js
@@ -3,6 +3,7 @@ import markdownIt from 'markdown-it'
import { URL } from 'url'
import { createRequire } from 'module'
import sanitizeHtml from 'sanitize-html';
+import authors from '../json/author-map.js'
const require = createRequire(import.meta.url)
const metaData = require('../../src/_data/json/meta.json')
@@ -61,7 +62,12 @@ export default {
},
// authors
- authorLookup: (url, authorMap) => authorMap[url] || '',
+ authorLookup: (url) => {
+ if (!url) return null
+ const urlObject = new URL(url)
+ const baseUrl = urlObject.origin
+ return authors?.[baseUrl] || null
+ },
// dates
readableDate: (date) => {
diff --git a/src/_data/json/author-map.js b/config/json/author-map.js
similarity index 100%
rename from src/_data/json/author-map.js
rename to config/json/author-map.js
diff --git a/package.json b/package.json
index 392b6826..f1b2ce02 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "coryd.dev",
- "version": "12.1.9",
+ "version": "12.2.9",
"description": "The source for my personal site. Built using 11ty.",
"type": "module",
"scripts": {
diff --git a/src/_includes/partials/feeds/rss.liquid b/src/_includes/partials/feeds/rss.liquid
index e24f2b74..fc07eb78 100644
--- a/src/_includes/partials/feeds/rss.liquid
+++ b/src/_includes/partials/feeds/rss.liquid
@@ -15,8 +15,9 @@
144
{% for entry in entries limit: 20 -%}
+ {% assign author = entry.url | stripUtm | authorLookup %}
-
- {{ entry.title | escape }}
+ {{ entry.title | escape }}{% if author %} via {{ author }}{% endif %}
{{ entry.url | stripUtm | encodeAmp }}
{{ entry.date | stringToRFC822Date }}
{{ entry.url | stripUtm | encodeAmp }}
diff --git a/src/links.html b/src/links.html
index 8f99f496..3c860b69 100644
--- a/src/links.html
+++ b/src/links.html
@@ -7,10 +7,12 @@ pagination:
---