feat: direct artist + album links

This commit is contained in:
Cory Dransfeldt 2023-07-16 09:07:58 -07:00
parent af001512fe
commit df32b17b43
No known key found for this signature in database
4 changed files with 8 additions and 5 deletions

View file

@ -11,6 +11,7 @@ module.exports = {
mdToHtml: (content) => {
return marked.parse(content)
},
dashLower: (string) => string.replace(/\s+/g, '-').toLowerCase(),
getPostImage: (image) => {
if (image && image !== '') return image
return '/assets/img/social-card.webp'
@ -40,7 +41,8 @@ module.exports = {
}
const filtered =
webmentions.filter((entry) => entry['wm-target'] === `https://coryd.dev${url}`)
webmentions
.filter((entry) => entry['wm-target'] === `https://coryd.dev${url}`)
.filter((entry) => allowedTypes.includes(entry['wm-property'])) || []
filtered.forEach((m) => {