Description Usage Arguments Value See Also Examples
Create Algolia Configuration
1 2 3 4 | 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/>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## Not run:
########################################################################
### 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")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.