Skip to content

Commit 847b9e2

Browse files
Algolia key in environment variable (#2056)
1 parent 838ac55 commit 847b9e2

File tree

5 files changed

+24
-1
lines changed

5 files changed

+24
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
env:
3030
USE_SSH: true
3131
GIT_USER: gh-actions
32+
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
3233
run: |
3334
git config --global user.email "[email protected]"
3435
git config --global user.name "gh-actions"

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
## Hosting the Documentation Locally
1111

12+
- _Optional: Create a `.env` file and write `ALGOLIA_API_KEY='<insert_key_here>'`._
13+
_The key can be found in the team KeePassXC._
1214
- Run `npm install`
1315
- Run `npm start`
1416
- The SAP Cloud SDK documentation portal should open in a new browser window

docusaurus.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { ProvidePlugin } = require('webpack');
2+
import 'dotenv/config';
23

34
// We have to polyfill some Node APIs because Docusaurus migrated to Webpack 5
45
// This is mainly required because of remark related modules which don't load otherwise
@@ -37,7 +38,7 @@ module.exports = {
3738
darkTheme: require('prism-react-renderer').themes.dracula
3839
},
3940
algolia: {
40-
apiKey: '441c57554e5a0ca9338cc9f047fb10c8',
41+
apiKey: process.env.ALGOLIA_API_KEY || 'fake_key',
4142
indexName: 'sap_cloud-sdk',
4243
appId: 'E4A268JVO0',
4344
algoliaOptions: {} // Optional, if provided by Algolia

package-lock.json

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"@docusaurus/theme-common": "^3.2.1",
2525
"buffer": "^6.0.3",
2626
"clsx": "^2.1.1",
27+
"dotenv": "^16.4.7",
2728
"events": "^3.3.0",
2829
"prism-react-renderer": "^2.4.1",
2930
"react": "^18.3.0",

0 commit comments

Comments
 (0)