Static sites usually do not offer search, as they are normally considered a dynamic task. Elegant uses the open-source LunrJS JavaScript library, to offer search for your static site.
Here is an example of what the search result may look like:
We have located the search box on the top right of the main navigation menu to allow visitors to search from any page.
Configuration
To enable search, you need to enable the tipue_search
plugin and add search
to
DIRECT_TEMPLATES
in your pelican configuration.
PLUGINS = ['tipue_search']
DIRECT_TEMPLATES = ['search']
Note that these values must be added to any existing values present for the PLUGINS
and
DIRECT_TEMPLATES
configuration variables.