Skip to content

Commit

Permalink
add algolia docsearch v3
Browse files Browse the repository at this point in the history
  • Loading branch information
JaneJeon committed Apr 10, 2023
1 parent f6b9680 commit 107a660
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
3 changes: 3 additions & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Put all the algolia stuff in here
.env
12 changes: 12 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
const lightCodeTheme = require('prism-react-renderer/themes/github')
const darkCodeTheme = require('prism-react-renderer/themes/dracula')

// Load from .env during local development
try {
const dotenv = require('dotenv')

dotenv.config()
} catch (e) {}

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Blink',
Expand Down Expand Up @@ -123,6 +130,11 @@ const config = {
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme
},
algolia: {
appId: process.env.ALGOLIA_APP_ID,
apiKey: process.env.ALGOLIA_API_KEY, // look for "Search API Key"
indexName: 'blink'
}
})
}
Expand Down
14 changes: 12 additions & 2 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion website/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "website-2",
"name": "blink-docs",
"version": "0.0.0",
"private": true,
"scripts": {
Expand All @@ -26,6 +26,7 @@
"devDependencies": {
"@docusaurus/module-type-aliases": "2.4.0",
"@tsconfig/docusaurus": "^1.0.5",
"dotenv": "^16.0.3",
"typescript": "^4.7.4"
},
"browserslist": {
Expand Down

1 comment on commit 107a660

@vercel
Copy link

@vercel vercel bot commented on 107a660 Apr 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blink – ./

blink-git-master-janejeon.vercel.app
blink-janejeon.vercel.app
docs.blink.rest

Please sign in to comment.