@customSearchContent global variable

Some of the Publii search plugins can generate search results as a separate area. In order to properly handle this feature you must implement two changes in your theme:

1. Add support for customSearch

Just add customSearch under your theme supportedFeatures section.

2. Implement @customSearchContent global variable

In the simplest for you must just add the following code in your theme to the search.hbs file:

{{{@customSearchContent}}}

Then plugins which uses this global variable, will output there search results.

The search field itself uses @customSearchInput.

Create your first website with Publii

Join thousands of creators who chose independence. Create content locally and publish lightning-fast, secure websites on your own terms.

Download Publii

Free and open source. Windows, macOS and Linux.

Read the getting started guide