File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import siteMetadata from './data/siteMetadata'
2323import { allCoreContent , sortPosts } from 'pliny/utils/contentlayer.js'
2424
2525const root = process . cwd ( )
26+ const isProduction = process . env . NODE_ENV === 'production'
2627
2728const computedFields : ComputedFields = {
2829 readingTime : { type : 'json' , resolve : ( doc ) => readingTime ( doc . body . raw ) } ,
@@ -47,7 +48,7 @@ const computedFields: ComputedFields = {
4748function createTagCount ( allBlogs ) {
4849 const tagCount : Record < string , number > = { }
4950 allBlogs . forEach ( ( file ) => {
50- if ( file . tags && file . draft !== true ) {
51+ if ( file . tags && ( ! isProduction || file . draft !== true ) ) {
5152 file . tags . forEach ( ( tag ) => {
5253 const formattedTag = GithubSlugger . slug ( tag )
5354 if ( formattedTag in tagCount ) {
You can’t perform that action at this time.
0 commit comments