GithubHelp home page GithubHelp logo

rehanhaider / pelican-algolia Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 0.0 81 KB

Pelican Algolia Search: A Plugin to integrated Algolia Search in Pelican

License: GNU General Public License v3.0

Python 100.00%
algolia python pelican pelican-plugins

pelican-algolia's Introduction

Algolia Search: A Plugin for Pelican

Build Status PyPI Version License PyPI - Downloads

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.

pelican-algolia's People

Contributors

botpub avatar rehanhaider avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.