getgrav / grav-plugin-simplesearch

Grav SimpleSearch Plugin
https://getgrav.org
MIT License
44 stars 55 forks source link

Default vs. custom simplesearch.md #186

Closed petira closed 4 years ago

petira commented 4 years ago

Made code modifications to create a custom page without having to include a simplesearch section in the header. If the custom page contains a template variable in the header, it takes precedence over the setting in the config file. When using the default page, the opposite behavior occurs, where the settings in the config file are preferred, which overrides the settings in the page header, assuming that the default page now contains the template variable directly from the plugin authors.

This fixes some of the issues described in https://github.com/getgrav/grav-plugin-simplesearch/issues/173 and https://github.com/getgrav/grav-plugin-simplesearch/issues/43 (maybe others too).

I will send other separate improvements in the next Pull request.