travis-r6s / gridsome-plugin-flexsearch

Add lightning fast search to Gridsome with FlexSearch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Help/Feature Request] search static file/component based pages

renepardon opened this issue · comments

Is there a way to also search file based pages? Would be nice if the HTML/Text contents can be parsed and searched without a collection

I developed a custom solution for https://acv-container.de/uebersicht/ in the top bar. Within gridsome.server.js I use the collection api to create a new collection, search with "glob" for all *.vue files within the src/pages/ directory, and add a node for every found page to the collection by parsing the .vue files with @vuese/parser. This collection is then searchable with gridsome-plugin-flexsearch <3