feat: speed up builds; minimize things a bit

This commit is contained in:
Cory Dransfeldt 2024-06-03 17:11:18 -07:00
parent 67017151d1
commit f057962309
No known key found for this signature in database
13 changed files with 17 additions and 164 deletions

View file

@ -91,20 +91,7 @@ export default {
},
// links
findPost: (url, posts) => {
if (!url || !posts || !posts[url]?.toots?.[0]?.includes('https')) return null;
const BASE_URL = 'https://social.lol/users/cory/statuses/'
const STATUS_URL = 'https://social.lol/@cory/'
return posts[url]?.toots?.[0]?.replace(BASE_URL, STATUS_URL) || null;
},
absoluteUrl: (url) => {
try {
return (new URL(url, BASE_URL)).toString()
} catch(e) {
console.error('Error generating absoluteUrl.')
}
return url;
},
absoluteUrl: (url) => (new URL(url, BASE_URL)).toString(),
// feeds
normalizeEntries: (entries) => {