Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rehanhaider/pelican-algolia
Pelican Algolia Search: A Plugin to integrated Algolia Search in Pelican
https://github.com/rehanhaider/pelican-algolia
algolia pelican pelican-plugins python
Last synced: about 2 months ago
JSON representation
Pelican Algolia Search: A Plugin to integrated Algolia Search in Pelican
- Host: GitHub
- URL: https://github.com/rehanhaider/pelican-algolia
- Owner: rehanhaider
- License: gpl-3.0
- Created: 2021-10-24T08:35:06.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-13T05:59:40.000Z (over 2 years ago)
- Last Synced: 2024-08-09T04:07:20.401Z (5 months ago)
- Topics: algolia, pelican, pelican-plugins, python
- Language: Python
- Homepage:
- Size: 79.1 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pelican - pelican-algolia - algolia)](https://pypi.org/project/pelican-algolia/)| [rehanhaider](https://github.com/rehanhaider) | Plugin to integrate Algolia Search with Pelican SSG (Plugins / Migrated to new architecture)
README
Algolia Search: A Plugin for Pelican
====================================================[![Build Status](https://img.shields.io/github/workflow/status/rehanhaider/pelican-algolia/build)](https://github.com/rehanhaider/pelican-algolia/actions)
[![PyPI Version](https://img.shields.io/pypi/v/pelican-algolia)](https://pypi.org/project/pelican-algolia/)
![License](https://img.shields.io/pypi/l/pelican-algolia?color=blue)
![PyPI - Downloads](https://img.shields.io/pypi/dm/pelican-algolia)Installation
------------This plugin can be installed via:
python -m pip install pelican-algolia
Prerequisites
-------------
1. Create an [Algolia](https://www.algolia.com/) 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`
```python
# Algolia Publish Data
ALGOLIA_APP_ID = ""
ALGOLIA_SEARCH_API_KEY = ""
ALGOLIA_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)
```python
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].[Algolia]: https://www.algolia.com/doc/guides/building-search-ui/getting-started/js/
[here]: https://cloudbytes.dev/snippets/launching-pelican-algolia-plugin-for-pelicanContributing
------------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.
[existing issues]: https://github.com/rehanhaider/pelican-algolia/issues
[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.htmlLicense
-------This project is licensed under the AGPL-3.0 license.