@@ -129,7 +129,7 @@ In 'output' mode, all HTML files generated as a result of the build are subject
129129
130130``` js
131131// astro.config.mjs
132- fuse ({
132+ fuse ([ ' content ' , ' frontmatter.title ' ], {
133133 filter : (path ) => / ^ \/ post\/ [^ /] + \/ $ / .test (path),
134134})
135135```
@@ -140,7 +140,7 @@ In 'source' mode, all markdown files in the `/src/content` folder are subject to
140140
141141``` js
142142// astro.config.mjs
143- fuse ({
143+ fuse ([ ' content ' , ' frontmatter.title ' ], {
144144 filter : (path ) => path .startsWith (' /src/content/post/' ),
145145})
146146```
@@ -152,10 +152,13 @@ Setting the `basedOn` option to `'output'` will now generate the index file base
152152``` js
153153// astro.config.mjs
154154// ...
155- fuse ({
156- extractContentFromHTML: ' article' // index text inner <article> element.
157- extractContentFromHTML : $ => $ (' div#content' ) // or. you can use cheerio instance.
158- })
155+ fuse (
156+ [' content' , ' frontmatter.title' ],
157+ {
158+ extractContentFromHTML: ' article' // index text inner <article> element.
159+ extractContentFromHTML : $ => $ (' div#content' ) // or. you can use cheerio instance.
160+ }
161+ )
159162```
160163
161164#### extractFrontmatterFromHTML (only for ` output ` mode)
@@ -175,8 +178,7 @@ In this situation, the `extractFrontmatterFromHTML` option can be helpful. If yo
175178``` js
176179// astro.config.mjs
177180
178- fuse ({
179- keys: [' content' , ' frontmatter.title' ],
181+ fuse ([' content' , ' frontmatter.title' ], {
180182 extractFrontmatterFromHTML : ($ ) => {
181183 // read that element value. $ is cheerio instance.
182184 const el = $ (' [data-frontmatter]' )
0 commit comments