Project: Nikola Flexsearch Plugin
FlexSearch is a plugin I developed for Nikola SSG that adds full-text search functionality to static sites. It works entirely on the client-side without requiring any server-side processing or external services once the site is built.
Latest Articles About This Project
- 2025-03-22 FlexSearch Plugin for Nikola: New Version 0.2 Released 4 min read.
- 2024-07-18 Introducing the FlexSearch Plugin for Nikola 2 min read.
Key Features
- Full-text search across your site content (configurable)
- Client-side only - no external dependencies or APIs
- Fast and lightweight - uses the efficient FlexSearch JS library
- Configurable - index posts, pages, or both
- Simple integration - easy to install and configure (IMO)
Why I Created This
I use this site as a personal knowledge repository and frequently need to find specific information I've written about. Browser search works for individual pages, but I wanted a way to search across all content (posts and pages). Since Nikola didn't have a built-in search solution that met my needs, I created this plugin using the excellent FlexSearch Library.
Getting Started
To install the plugin:
nikola plugin -i flexsearch_plugin
After installation, simply follow the instructions in the README.md, add the HTML Code Snippet in your template, update your conf.py and rebuild your site. I think I have explained the process in the README and in code well enough.
After that you'll have search functionality available similar to the one I have on this site.
Source Code
The source code is available in the Nikola Plugins repository.
You can also find the plugin in the official Nikola Website.
Feel free to contribute or suggest improvements!