aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-04-12 12:07:30 -0700
committerFuwn <[email protected]>2021-04-12 12:07:30 -0700
commit22f18ada306e7238a0d35a28e7c3f9f8f3eecb12 (patch)
tree2b18eb1e5e950e9e00e04862234415c14b3a4ef6
parentblog: The State of Whirl (diff)
downloadsite-22f18ada306e7238a0d35a28e7c3f9f8f3eecb12.tar.xz
site-22f18ada306e7238a0d35a28e7c3f9f8f3eecb12.zip
feature: Algolia search
The dotenv package is required from grabbing GitHub secrets from the environment.
-rw-r--r--docusaurus.config.js13
-rw-r--r--package.json1
-rw-r--r--yarn.lock5
3 files changed, 12 insertions, 7 deletions
diff --git a/docusaurus.config.js b/docusaurus.config.js
index cce5f98..ecee414 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -1,3 +1,5 @@
+require('dotenv').config();
+
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
title: 'Whirlsplash',
@@ -60,13 +62,10 @@ module.exports = {
liveCodeBlock: { playgroundPosition: 'bottom', },
- // TODO: Implement
- // algolio: {
- // apiKey: '',
- // indexName: '',
- // contextualSearch: true,
- // searchParameters: {},
- // },
+ algolia: {
+ apiKey: process.env.ALGOLIA_API_KEY,
+ indexName: 'whirlsplash',
+ },
},
presets: [
[
diff --git a/package.json b/package.json
index 1fac670..95b0dc2 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,7 @@
"@docusaurus/theme-live-codeblock": "^2.0.0-alpha.72",
"@mdx-js/react": "^1.6.21",
"clsx": "^1.1.1",
+ "dotenv": "^8.2.0",
"react": "^17.0.1",
"react-dom": "^17.0.1"
},
diff --git a/yarn.lock b/yarn.lock
index bdae5b6..e9e86cc 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4227,6 +4227,11 @@ dot-prop@^5.2.0:
dependencies:
is-obj "^2.0.0"
+dotenv@^8.2.0:
+ version "8.2.0"
+ resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a"
+ integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==
+
duplexer3@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"