chore: simplify ogi

This commit is contained in:
Cory Dransfeldt 2024-03-13 16:35:41 -07:00
parent 7bffc62335
commit 69e1b950e7
No known key found for this signature in database
26 changed files with 6 additions and 18 deletions

View file

@ -38,10 +38,8 @@ export default {
if (!string) return
return string.replace(utmPattern, '')
},
getPostImage: (image) => {
if (image && image !== '') return image
return `${BASE_URL}/assets/img/ogi/default.jpg`
},
// analytics
getPopularPosts: (posts, analytics) => {
return posts
.filter((post) => {
@ -52,6 +50,8 @@ export default {
return visitors(b) - visitors(a)
})
},
// tags
tagLookup: (url, tagMap) => {
if (!url) return
if (url.includes('thestorygraph.com')) return '#Books #NowReading #TheStoryGraph'