Create Algolia Configuration
create_config(path_index_json = "public/index.json", app_id = Sys.getenv("algolia_app_id"), api_key = Sys.getenv("algolia_api_key"), index_name = Sys.getenv("algolia_index_name"))
path_index_json | path to index.json (default: "public/index.json") |
---|---|
app_id | app_id Application ID. This is your unique application identifier. It's used to identify you when using Algolia's API. (see: create a API key with valid scope in the Algolia Dashboard), (default: Sys.getenv("algolia_app_id")) |
api_key | api_key (default: Sys.getenv("algolia_api_key"), <https://www.algolia.com/doc/api-client/methods/api-keys/> |
index_name | name of Algolia index name (default: Sys.getenv("algolia_index_name")) |
list with algolia config
<https://www.algolia.com/doc/guides/getting-started/quick-start/tutorials/getting-started-with-the-dashboard/>
if (FALSE) { ######################################################################## ### Option A) Interactive R Session ######################################################################## config <- create_config(path_index_json = "path_to_your_index.json", app_id = "your_algolia_application_id", api_key = "your_algolia_api_key", index_name = "your_algolia_index_name") ######################################################################## ### Option B) Environment variable ######################################################################## Sys.setenv(algolia_app_id = "your_algolia_application_id", algolia_api_key = "your_algolia_api_key", algolia_index_name = "your_algolia_index_name") ### With default path to index.json ("public/index.json") ### (i.e standard output path after running blogdown::build_site() for ### theme hugo-academic (https://github.com/gcushen/hugo-academic/) config <- create_config() ### With user defined path or url to index.json "public/index.json" config <- create_config(path_index_json = "https://mhugoacademicsite.de/index.json") }