fix: remove search from postbuild
This commit is contained in:
parent
a23ba55396
commit
67e7801462
@ -1,8 +1,7 @@
|
||||
import rss from './rss.mjs'
|
||||
import search from './search.mjs'
|
||||
|
||||
async function postbuild() {
|
||||
await Promise.all([rss(), search()])
|
||||
await rss()
|
||||
}
|
||||
|
||||
postbuild()
|
||||
|
@ -1,15 +0,0 @@
|
||||
import { writeFileSync } from 'fs'
|
||||
import { allCoreContent } from 'pliny/utils/contentlayer.js'
|
||||
import { allBlogs } from '../.contentlayer/generated/index.mjs'
|
||||
import siteMetadata from '../data/siteMetadata.js'
|
||||
|
||||
const search = () => {
|
||||
if (siteMetadata?.search?.kbarConfig?.searchDocumentsPath) {
|
||||
writeFileSync(
|
||||
`public/${siteMetadata.search.kbarConfig.searchDocumentsPath}`,
|
||||
JSON.stringify(allCoreContent(allBlogs))
|
||||
)
|
||||
console.log('Local search index generated...')
|
||||
}
|
||||
}
|
||||
export default search
|
Loading…
x
Reference in New Issue
Block a user