Skip to main content

Plugin to integrate Algolia Search with Pelican SSG

Project description

Algolia Search: A Plugin for Pelican

Build Status PyPI Version License

Installation

This plugin can be installed via:

python -m pip install pelican-algolia

Prerequisites

  1. Create an Algolia account
  2. On Algolia website, create a new application
  3. Create a new Index (or Indices) in you Algolia app. This will be ALGOLIA_INDEX_NAME
  4. Import you records, if asked select Use the API option
  5. Go to Settings -> API Keys -> Your API Keys and copy your
    • Application ID, this will be ALGOLIA_APP_ID
    • Admin API Key (DO NOT HARD CODE THIS IN YOUR PROGRAM). This will be ALGOLIA_ADMIN_API_KEY
    • Algolia Search-Only API Key. This will be ALGOLIA_SEARCH_API_KEY

Usage

Step 1: Set the following configuration in pelicanconf.py

# Algolia Publish Data
ALGOLIA_APP_ID = "<Your Algolia App ID>"
ALGOLIA_SEARCH_API_KEY = "<Your Search-only Api Key>"
ALGOLIA_INDEX_NAME = "<You Algolia App Index name>"

Step 2: Set the ALGOLIA_ADMIN_API_KEY as an environmatal variable on path

Step 3: Import ALGOLIA_ADMIN_API_KEY in your publishconf.py (or pelicanconf.py if you're not using publishconf.py for publish settings)

import os
ALGOLIA_ADMIN_API_KEY = os.environ.get("ALGOLIA_ADMIN_API_KEY")

Building Search bars

You can read through Algolia documentation on how to build InstaSearch experience, or use a legacy version of search bar (example below) described in detail here.

Contributing

Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on existing issues.

To start contributing to this plugin, review the Contributing to Pelican documentation, beginning with the Contributing Code section.

License

This project is licensed under the AGPL-3.0 license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pelican-algolia-2.2.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

pelican_algolia-2.2.0-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file pelican-algolia-2.2.0.tar.gz.

File metadata

  • Download URL: pelican-algolia-2.2.0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.7.12 Linux/5.11.0-1020-azure

File hashes

Hashes for pelican-algolia-2.2.0.tar.gz
Algorithm Hash digest
SHA256 b980e8914143336d7e250b4335c9dc991c1d38e6e5e487852975f7dc488b0922
MD5 7b69c38fcf3ee547ed4daf779048056b
BLAKE2b-256 5b836c7bddc2b9cd858c487f58b9613654a73e39ed6c0ceeba24662d45d2e333

See more details on using hashes here.

File details

Details for the file pelican_algolia-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: pelican_algolia-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.7.12 Linux/5.11.0-1020-azure

File hashes

Hashes for pelican_algolia-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29c32b9b13e9bbae3629878d84f85a594e8e024d0d0c77dfba9f2067b8b48edd
MD5 85449e46d75b684c684e5a0a6b7b88f8
BLAKE2b-256 e1150475feadec8d4342867dcbb0b2dfeb61de09f1cbaa6cf705dc1d9f9b01c7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page