Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/razonyang/hugo-theme-bootstrap-algolia
A CLI tool for HBS theme to upload Algolia index file.
https://github.com/razonyang/hugo-theme-bootstrap-algolia
Last synced: 17 days ago
JSON representation
A CLI tool for HBS theme to upload Algolia index file.
- Host: GitHub
- URL: https://github.com/razonyang/hugo-theme-bootstrap-algolia
- Owner: razonyang
- License: mit
- Created: 2022-11-26T15:39:21.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-27T08:41:27.000Z (almost 2 years ago)
- Last Synced: 2024-04-13T22:26:44.083Z (7 months ago)
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HBS Algolia
A CLI Application for HBS theme.
## Installation
### Downloads
Download from [Releases](https://github.com/razonyang/hugo-theme-bootstrap-algolia/releases).
## Environments
| Name | Required | Default | Description |
|---|:-:|:-:|---|
| `ALGOLIA_APP_ID` | YES | - | The Algolia App ID.
| `ALGOLIA_API_KEY` | YES | - | The Algolia **Admin** API KEY.
| `ALGOLIA_INDEX_NAME` | YES | - | The Algolia App Index Name.
| `ALGOLIA_INDEX_FILE` | NO | `public/algolia/index.json`, relative to your working directory.This tool requires several env vars to be set, there are multiple ways to do that.
**via command line**
```
ALGOLIA_APP_ID=x \
ALGOLIA_API_KEY=y \
ALGOLIA_INDEX_NAME=z \
hugo-theme-bootstrap-algolia
```**via .env file**
Create the `.env` file under your site root with following form.
```
ALGOLIA_APP_ID=x
ALGOLIA_API_KEY=y
ALGOLIA_INDEX_NAME=z
#ALGOLIA_INDEX_FILE=public/algolia/index.json
```You should never commit the `.env` file, since it contains sensitive data, you can ignore it via `.gitignore`.
```
echo .env >> .gitignore
```## Usage
This program should be ran after building site, since it need to access and upload the index file.
```
$ hugo$ hugo-theme-bootstrap-algolia
```