Skip to content

Commit 983fb66

Browse files
authored
feat: include Orama Search! (#45)
1 parent 785b34f commit 983fb66

File tree

6 files changed

+14750
-8280
lines changed

6 files changed

+14750
-8280
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ jobs:
2323

2424
- name: Build the project
2525
run: npm run build
26-
26+
env:
27+
ORAMA_CLOUD_PRIVATE_API_KEY: ${{ secrets.ORAMA_CLOUD_PRIVATE_API_KEY }}
28+
ORAMA_CLOUD_INDEX_ID: ${{ secrets.ORAMA_CLOUD_INDEX_ID }}
29+
ENABLE_ORAMA_CLOUD_DEPLOY: ${{ secrets.ENABLE_ORAMA_CLOUD_DEPLOY }}
30+
2731
- name: Upload build artifact
2832
uses: actions/upload-artifact@v4
2933
with:

.github/workflows/deploy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ jobs:
2323

2424
- name: Build Docusaurus site
2525
run: npm run build
26+
env:
27+
ORAMA_CLOUD_PRIVATE_API_KEY: ${{ secrets.ORAMA_CLOUD_PRIVATE_API_KEY }}
28+
ORAMA_CLOUD_INDEX_ID: ${{ secrets.ORAMA_CLOUD_INDEX_ID }}
29+
ENABLE_ORAMA_CLOUD_DEPLOY: ${{ secrets.ENABLE_ORAMA_CLOUD_DEPLOY }}
2630

2731
- name: Deploy to GitHub Pages
2832
uses: peaceiris/actions-gh-pages@v3

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
# Misc
1212
.DS_Store
13+
.env
1314
.env.local
1415
.env.development.local
1516
.env.test.local

docusaurus.config.js

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
// @ts-check
2-
// `@type` JSDoc annotations allow editor autocompletion and type checking
3-
// (when paired with `@ts-check`).
4-
// There are various equivalent ways to declare your Docusaurus config.
5-
// See: https://docusaurus.io/docs/api/docusaurus-config
1+
require('dotenv').config();
62

7-
import {themes as prismThemes} from 'prism-react-renderer';
3+
import { themes as prismThemes } from 'prism-react-renderer';
84

95
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
106

@@ -23,6 +19,25 @@ const config = {
2319
defaultLocale: 'en',
2420
locales: ['en'],
2521
},
22+
plugins: [
23+
[
24+
"@orama/plugin-docusaurus-v3",
25+
{
26+
analytics: {
27+
enabled: true,
28+
apiKey: process.env.ORAMA_CLOUD_PRIVATE_API_KEY || '',
29+
indexId: process.env.ORAMA_CLOUD_INDEX_ID || '',
30+
deploy: process.env.ENABLE_ORAMA_CLOUD_DEPLOY === 'true',
31+
},
32+
searchbox: {
33+
placeholder: "Search...",
34+
},
35+
searchButton: {
36+
text: "Click here to search..."
37+
}
38+
},
39+
],
40+
],
2641
presets: [
2742
[
2843
'classic',
@@ -61,9 +76,9 @@ const config = {
6176
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
6277
({
6378
colorMode: {
64-
defaultMode: 'dark',
79+
defaultMode: 'dark',
6580
disableSwitch: true,
66-
respectPrefersColorScheme: false
81+
respectPrefersColorScheme: false
6782
},
6883
image: 'img/openPathfinder-social-card.jpg',
6984
navbar: {
@@ -72,7 +87,7 @@ const config = {
7287
alt: 'OpenPathfinder Logo',
7388
src: 'img/openPathfinder_profile.png',
7489
},
75-
style: 'dark',
90+
style: 'dark',
7691
items: [
7792
{
7893
type: 'docSidebar',
@@ -82,9 +97,9 @@ const config = {
8297
},
8398
// {to: '/docs/projects/fortSphere', label: 'fortSphere', position: 'left'},
8499
// {to: '/docs/projects/visionBoard', label: 'visionBoard', position: 'left'},
85-
{to: '/blog', label: 'Blog', position: 'left'},
86-
{to: '/contribute', label: 'Contribute', position: 'left'},
87-
{to: '/support', label: 'Support', position: 'left'},
100+
{ to: '/blog', label: 'Blog', position: 'left' },
101+
{ to: '/contribute', label: 'Contribute', position: 'left' },
102+
{ to: '/support', label: 'Support', position: 'left' },
88103
{
89104
href: 'https://github.com/openPathfinder/openpathfinder.com',
90105
label: 'GitHub',

0 commit comments

Comments
 (0)