Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
15afb7c
Berry widget demo env
kimsauce Nov 11, 2024
e2c4b56
staging
kimsauce Nov 11, 2024
a075f6a
Update .github/workflows/pr.yml
kimsauce Nov 11, 2024
9248750
edits
kimsauce Nov 11, 2024
fc72909
edits
kimsauce Nov 11, 2024
5f5b918
fix
kimsauce Nov 11, 2024
b7afc94
fix link
kimsauce Nov 11, 2024
64fce9c
Merge branch 'main' into berry
kimsauce Nov 11, 2024
fba74a2
Merge branch 'main' into berry
kimsauce Nov 12, 2024
3446d32
Add suggested question prompts
kimsauce Nov 12, 2024
2dc71f8
Merge branch 'berry' of github.com:SumoLogic/sumologic-documentation …
kimsauce Nov 12, 2024
8104cd7
Merge branch 'main' into berry
kimsauce Nov 20, 2024
98f1b35
Merge branch 'main' into berry
kimsauce Dec 2, 2024
0d38907
undo
kimsauce Dec 2, 2024
40cd418
Update src/pages/index.tsx
kimsauce Dec 2, 2024
c43d3bd
undo
kimsauce Dec 2, 2024
07ba48e
Merge branch 'berry' of github.com:SumoLogic/sumologic-documentation …
kimsauce Dec 2, 2024
b21627f
Update src/css/sumo.scss
kimsauce Dec 2, 2024
0906449
Merge branch 'main' into berry
kimsauce Dec 12, 2024
2821875
Merge branch 'main' into berry
kimsauce Dec 28, 2024
f22f120
redesign
kimsauce Dec 28, 2024
b465d27
Merge branch 'main' into berry
kimsauce Jan 3, 2025
4d94f3c
css fixes, add more Qs
kimsauce Jan 3, 2025
e11638c
Merge branch 'main' into berry
kimsauce Jan 4, 2025
adca3ec
Merge branch 'main' into berry
kimsauce Jan 7, 2025
fb8772c
Merge branch 'main' into berry
kimsauce Jan 7, 2025
56b146f
Merge branch 'main' into berry
kimsauce Jan 8, 2025
540caf0
added light/dark mode toggle
kimsauce Jan 8, 2025
dd46b9b
light/dark toggle
kimsauce Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 14 additions & 23 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,20 @@ on:
- checks_requested

jobs:
build-and-deploy:
runs-on: ubuntu-22.04
env:
CI: true
NODE_ENV: production
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
cache: 'yarn'
- name: Docusaurus Webpack cache
uses: actions/cache@v3
with:
path: node_modules/.cache
key: ${{ runner.os }}-webpack-cache
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build the Docusaurus site
env:
NODE_OPTIONS: "--max-old-space-size=8192 --max-http-header-size=8192"
run: yarn build
deploy-to-review:
uses: SumoLogic/sumologic-documentation/.github/workflows/build_and_deploy.yml@main
with:
hostname: https://d2t1s0ah22jxsa.cloudfront.net
base_url: /${{ github.ref_name }}/
environment: review/${{ github.ref_name }}
secrets:
S3_BUCKET_NAME: ${{ secrets.REVIEW_S3_BUCKET_NAME }}
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.REVIEW_CLOUDFRONT_DISTRIBUTION_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
spellcheck:
runs-on: ubuntu-latest
steps:
spellcheck:
runs-on: ubuntu-latest
steps:
Expand Down
25 changes: 24 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';
import Layout from '@theme/Layout';
import { Box, Button, Container, Grid, Stack, Tab, Tabs, Typography } from '@mui/material';
import { TabContext, TabPanel } from '@mui/lab';
Expand All @@ -12,6 +12,29 @@ import ErrorBoundary from '../components/ErrorBoundary'; // Import the ErrorBoun
export const Home = () => {
const [tab, setTab] = useState('0');

useEffect(() => {
// Load the Berry widget script only if it hasn’t already been loaded
if (!document.getElementById('berry-widget-script')) {
const script = document.createElement('script');
script.id = 'berry-widget-script';
script.type = 'text/javascript';
script.src = 'https://www.berryapp.io/js/berry-widget.min.js';
document.head.appendChild(script);

script.onload = () => {
const widgetJwt = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MjU5NDg5MTcsImV4cCI6MTc0MTYwODkxNywiYXVkIjoiV2lkZ2V0SW5pdGlhbGl6YXRpb24iLCJvcmdhbml6YXRpb25JZCI6NjN9.oJEGkGq1q3uFD66J916f_ZBrqQjPHP9orUOKFxInG38';
window.Berry.init({
token: widgetJwt,
primaryColor: '#021b9a',
position: { side: 'right', offsetX: 25, offsetY: 100 },
isOpenByDefault: false,
botUrlPath: 'nova',
showNewChat: true,
});
};
}
}, []);

return (
<ErrorBoundary>
<Layout
Expand Down