Skip to content

Commit

Permalink
Merge pull request #114 from 0xPolygonID/remove-algolia-key
Browse files Browse the repository at this point in the history
Removes algolia api key
  • Loading branch information
elias-garcia authored Feb 19, 2024
2 parents 6254dd2 + bc4689d commit 095bc9e
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 4 deletions.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALGOLIA_API_KEY=
5 changes: 4 additions & 1 deletion .github/workflows/prod_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ jobs:
with:
mask-password: 'true'

- name: INSTALL
- name: Install dependencies
run: rm -rf node_modules && npm ci

- name: Create .env file
run: echo 'ALGOLIA_API_KEY=${{ secrets.ALGOLIA_API_KEY }}' >> .env

# Runs a single command using the runners shell
- name: Build
run: npm run build
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/staging_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ jobs:
with:
mask-password: 'true'

- name: INSTALL
- name: Install dependencies
run: rm -rf node_modules && npm ci

- name: Create .env file
run: echo 'ALGOLIA_API_KEY=${{ secrets.ALGOLIA_API_KEY }}' >> .env

# Runs a single command using the runners shell
- name: Build
run: npm run build
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ packages/docusaurus-plugin-content-pages/lib/
packages/docusaurus-plugin-sitemap/lib/
packages/docusaurus-plugin-ideal-image/lib/
venv/

.env
4 changes: 3 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const math = require("remark-math");
const katex = require("rehype-katex");

require("dotenv").config();

module.exports = {
title: "Polygon ID Documentation",
tagline: "The official developer documentation hub for Polygon ID.",
Expand Down Expand Up @@ -66,7 +68,7 @@ module.exports = {
// need to update this
indexName: "devs-polygonid",
appId: "VHJ21ILMOQ",
apiKey: "2281aa8fc382facc33ebfbb1e745e442",
apiKey: process.env.ALGOLIA_API_KEY,
contextualSearch: true,
algoliaOptions: {
attributesToSnippet: ["content:20"],
Expand Down
12 changes: 12 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@docusaurus/preset-classic": "^2.4.3",
"browserslist": "^4.22.2",
"classnames": "^2.3.2",
"dotenv": "^16.4.4",
"katex": "^0.16.9",
"prettier": "^3.2.4",
"react": "^16.14.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/TutorialsCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import useBaseUrl from "@docusaurus/useBaseUrl";
export const TutorialsCard = (props) => {
const { iconSrc, cardLink, title, blockInfo, tutorialsInfo } = props;
const onCardClick = () => {
window.open(cardLink, "_blank").focus();
window.open(cardLink, "_self").focus();
};
const onLinkClick = (e) => {
e.stopPropagation();
Expand Down

0 comments on commit 095bc9e

Please sign in to comment.