Skip to content

Commit

Permalink
feat(lib): filter test posts on getRawTagListFromPosts
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusfg7 committed May 20, 2023
1 parent 367572f commit 21813e0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/lib/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import { allPosts } from 'contentlayer/generated'
import { removeRepeatedValuesFromArray, slug } from './utils'

const getRawTagListFromPosts = (): string[] => {
const listOfTagList = allPosts.map(post => {
return post.tags.split(',')
})
const listOfTagList = allPosts
.filter(post => !post.test)
.map(post => {
return post.tags.split(',')
})

let completeRawTagList: string[] = []

Expand Down

0 comments on commit 21813e0

Please sign in to comment.