0.0.2 • Published 3 years ago

cli-algolia-manager v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

cli-algolia-manager

Easy to use

npm install -g .
clialgmanager index=[name] lang=[lang]

ATENTION: config file required to perform command.

The config file should be: ~/.algolia/conf.json.

{
	"key": {
		"app": "OSJ19HQ1NZ", // just an example
		"api": "ebmmf0za524aoiucjek188mmapp130ad" // just an example
	},
	"lang": ["en", "ptbr"],
	"blog": {
		"en": {
			"name": "blog-rgajr-en",
			"filepath": "/Users/robson.junior/development/rgajr-blog/_site/en/algolia/data/blog.json"
		},
		"ptbr": {
			"name": "blog-rgajr-ptbr",
			"filepath": "/Users/robson.junior/development/rgajr-blog/_site/pt-br/algolia/data/blog.json"
		}
	}
}
ATTRIBUTETYPEDESCRIPTION
keyObjectContains the identify attributes for access the app and use the api
key.appStringAlgolia APP id
key.apiStringAlgolia API key
langListThe lang enabled to be used into index validation
blogObjectCan be N objects, The name is optional, used into index param, like index=blog
blog.enObjectCan be many languages, Contains the object with the name of Algolia index and the filepath data to be publish
blog.en.nameStringThe name of Algolia index
blog.en.filepathStringThe file path with data to be uploaded

Parameters

PARAMETEROPTIONSDESCRIPTION
index---The object into index json configuration
lang---The the lang of index json configuration

Features

FEATURECOMMANDDESCRIPTION
reindexnode index.js index=name lang=langThis command clean the index and reupload again