chore: masto username filter

This commit is contained in:
Cory Dransfeldt 2024-07-04 13:37:33 -07:00
parent f24c985757
commit 5a7beeae3f
No known key found for this signature in database
3 changed files with 9 additions and 3 deletions

View file

@ -78,6 +78,12 @@ export default {
// links
absoluteUrl: (url) => (new URL(url, BASE_URL)).toString(),
// mastodon
mastoUsername: (url) => {
const url = new URL(post.author.mastodon)
return `${url.pathname.replace('/', '')}@${url.host}`
},
// feeds
normalizeEntries: (entries) => {
const posts = []