Skip to content

Commit

Permalink
docs: improve docs about beforeSync in searchPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanJablo committed Oct 30, 2024
1 parent 8970c6b commit 3f5f528
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/plugins/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ Before creating or updating a search record, the `beforeSync` function runs. Thi
searchPlugin({
beforeSync: ({ originalDoc, searchDoc }) => ({
...searchDoc,
// Modify your docs in any way here, this can be async
// - Modify your docs in any way here, this can be async
// - You also need to add the `excerpt` field in the `searchOverrides` config
excerpt: originalDoc?.excerpt || 'This is a fallback excerpt',
}),
}),
Expand Down

0 comments on commit 3f5f528

Please sign in to comment.