feat: movie tags
This commit is contained in:
parent
4132c92186
commit
5bc0c97537
6 changed files with 21 additions and 7 deletions
|
@ -51,6 +51,7 @@ export const tagMap = (collection) => {
|
|||
const posts = collectionData.data.collections.posts
|
||||
const links = collectionData.data.collections.links
|
||||
const books = collectionData.data.books
|
||||
const movies = collectionData.data.movies
|
||||
|
||||
if (posts) {
|
||||
posts.forEach((post) => {
|
||||
|
@ -81,6 +82,15 @@ export const tagMap = (collection) => {
|
|||
})
|
||||
}
|
||||
|
||||
if (movies) {
|
||||
movies.forEach((movie) => {
|
||||
const tagString = movie['tags']?.map((tag) => tagAliases[tag.toLowerCase()])
|
||||
.join(' ')
|
||||
.trim()
|
||||
if (tagString) tags[movie.url] = tagString.replace(/\s+/g,' ')
|
||||
})
|
||||
}
|
||||
|
||||
return tags
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue