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:

Search result for App Store

We have located the search box on the top right of the main navigation menu to allow visitors to search from any page.

Search box

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.

Понравилась статья? Расскажите о ней на: TwitterFacebookEmail


Talha Mansoor is the creator and lead developer of Elegant theme
Jack De Winter ever evolving, ever learning

Что почитать


Дата

Категория

Advanced Features

Тэги

Будьте с нами