If you followed the previous walkthrough then you've already found pelican-bootstrap3. There are a lot of useful tweaks you can use out of the box but the main one I'd like to focus on is search. Static file search is implemented using the handy Tipue Search Plugin and this theme makes turning it on simple.

Check out the plugins repository and copy the plugins to your site

Similar to the themes, I found it useful to copy the plugins I wanted directly into my site repository so I don't have to worry about whether or not the plugins repository is available when I'm updating the site from my iPad or GitLab CI.

1
2
3
mkdir ~/pelican-site/plugins
git clone https://github.com/getpelican/pelican-plugins.git ~/pelican-plugins
cp ~/pelican-plugins/tipue-search ~/pelican-site/plugins

Enable the plugin in your pelicanconf.py file and add 'search' to your DIRECT_TEMPLATES list.

1
2
3
4
5
6
7
...
# Plugins
PLUGIN_PATHS = ['plugins']
PLUGINS = ['i18n_subsites','tipue_search','series']

DIRECT_TEMPLATES = ['index', 'categories', 'authors', 'archives','search']
...

If the dev server is still running then the site will automatically regenerate. If it doesn't, restart the dev server.

1
2
3
# Start the testing server
make devserver
# Browse to http://localhost:8000

You should see a search bar in the top right hand corner. Type in a keyword from the original article you posted and hit search. Viola! Search in a static site!

Coming up next I'll show how I configured GitLab CI to help with promoting the changes so I only need to make commits to the repository for updates.