upstream #1
| @@ -20,7 +20,7 @@ import rehypeCitation from 'rehype-citation' | ||||
| import rehypePrismPlus from 'rehype-prism-plus' | ||||
| import rehypePresetMinify from 'rehype-preset-minify' | ||||
| import siteMetadata from './data/siteMetadata' | ||||
| import { allCoreContent } from 'pliny/utils/contentlayer.js' | ||||
| import { allCoreContent, sortPosts } from 'pliny/utils/contentlayer.js' | ||||
|  | ||||
| const root = process.cwd() | ||||
|  | ||||
| @@ -68,7 +68,7 @@ function createSearchIndex(allBlogs) { | ||||
|   ) { | ||||
|     writeFileSync( | ||||
|       `public/${siteMetadata.search.kbarConfig.searchDocumentsPath}`, | ||||
|       JSON.stringify(allCoreContent(allBlogs)) | ||||
|       JSON.stringify(allCoreContent(sortPosts(allBlogs))) | ||||
|     ) | ||||
|     console.log('Local search index generated...') | ||||
|   } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user