Previously the import itself would init and start loading assets, which meant the options() call could not affect this by changing the basePath or language.
Now, Pagefind will initialize when init() is called, or when any call to search or filters is made. As such, this change won't break any existing implementations, but may delay the loading of Pagefind until a search is made.
Addresses #129
Adds a new step to the flow of initializing Pagefind via the JavaScript API:
Previously the import itself would init and start loading assets, which meant the
options()
call could not affect this by changing thebasePath
orlanguage
.Now, Pagefind will initialize when
init()
is called, or when any call to search or filters is made. As such, this change won't break any existing implementations, but may delay the loading of Pagefind until a search is made.