Skip to content

Commit 387b71a

Browse files
committed
Merge branch 'main' into update-netlify-function-locations
2 parents c21a23f + 803d221 commit 387b71a

File tree

593 files changed

+20568
-10980
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

593 files changed

+20568
-10980
lines changed

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
WEAVIATE_DOCFEEDBACK_URL="<WEAVIATE_DOCFEEDBACK_URL>"
2-
WEAVIATE_DOCFEEDBACK_API_KEY="<WEAVIATE_DOCFEEDBACK_API_KEY>"
1+
WEAVIATE_DOCFEEDBACK_URL2="<WEAVIATE_DOCFEEDBACK_URL>"
2+
WEAVIATE_DOCFEEDBACK_APIKEY2="<WEAVIATE_DOCFEEDBACK_APIKEY>"
33
ALLOWED_ORIGIN="<SET_FOR_PROD_ENV>" # Set "https://docs.weaviate.io" for prod, "*.netlify.app" for staging and "http://localhost:8888" for local testing

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,3 +264,9 @@ __marimo__/
264264
# C# code
265265
_includes/code/csharp/bin
266266
_includes/code/csharp/obj
267+
_includes/code/csharp/quickstart/bin
268+
_includes/code/csharp/quickstart/obj
269+
*.sln
270+
271+
# Exclude WCD backups
272+
tests/backups/

.netlify/functions/submit-feedback.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ exports.handler = async (event) => {
6262

6363
try {
6464
const data = JSON.parse(event.body);
65-
const { WEAVIATE_DOCFEEDBACK_URL, WEAVIATE_DOCFEEDBACK_API_KEY } =
65+
const { WEAVIATE_DOCFEEDBACK_URL2, WEAVIATE_DOCFEEDBACK_APIKEY2 } =
6666
process.env;
6767

6868
// Basic server-side validation
@@ -76,13 +76,13 @@ exports.handler = async (event) => {
7676
};
7777
}
7878

79-
if (!WEAVIATE_DOCFEEDBACK_URL || !WEAVIATE_DOCFEEDBACK_API_KEY) {
80-
// const relevantKeys = Object.keys(process.env).filter(
81-
// k => k.includes('WEAVIATE') || k.includes('FEEDBACK') || k === 'CONTEXT' || k === 'ALLOWED_ORIGIN' || k.startsWith('DEPLOY_')
82-
// );
79+
if (!WEAVIATE_DOCFEEDBACK_URL2 || !WEAVIATE_DOCFEEDBACK_APIKEY2) {
80+
const relevantKeys = Object.keys(process.env).filter(
81+
k => k.includes('WEAVIATE') || k.includes('FEEDBACK') || k === 'CONTEXT' || k === 'ALLOWED_ORIGIN' || k.startsWith('DEPLOY_')
82+
);
8383
console.error('Missing Weaviate environment variables.', {
84-
hasUrl: !!WEAVIATE_DOCFEEDBACK_URL,
85-
hasKey: !!WEAVIATE_DOCFEEDBACK_API_KEY,
84+
hasUrl: !!WEAVIATE_DOCFEEDBACK_URL2,
85+
hasKey: !!WEAVIATE_DOCFEEDBACK_APIKEY2,
8686
context: process.env.CONTEXT,
8787
weaviateRelatedKeyNames: relevantKeys,
8888
weaviateRelatedKeyCount: relevantKeys.length,
@@ -92,8 +92,8 @@ exports.handler = async (event) => {
9292
body: JSON.stringify({
9393
error: 'Server configuration error.',
9494
// debug: {
95-
// hasUrl: !!WEAVIATE_DOCFEEDBACK_URL,
96-
// hasKey: !!WEAVIATE_DOCFEEDBACK_API_KEY,
95+
// hasUrl: !!WEAVIATE_DOCFEEDBACK_URL2,
96+
// hasKey: !!WEAVIATE_DOCFEEDBACK_APIKEY2,
9797
// context: process.env.CONTEXT,
9898
// availableWeaviateVars: relevantKeys,
9999
// availableWeaviateVarCount: relevantKeys.length,
@@ -121,13 +121,13 @@ exports.handler = async (event) => {
121121
},
122122
};
123123

124-
const weaviateUrl = `${WEAVIATE_DOCFEEDBACK_URL}/v1/objects`;
124+
const weaviateUrl = `${WEAVIATE_DOCFEEDBACK_URL2}/v1/objects`;
125125

126126
const response = await fetch(weaviateUrl, {
127127
method: 'POST',
128128
headers: {
129129
'Content-Type': 'application/json',
130-
Authorization: `Bearer ${WEAVIATE_DOCFEEDBACK_API_KEY}`,
130+
Authorization: `Bearer ${WEAVIATE_DOCFEEDBACK_APIKEY2}`,
131131
},
132132
body: JSON.stringify(weaviatePayload),
133133
});
@@ -156,7 +156,7 @@ exports.handler = async (event) => {
156156
debug: {
157157
weaviateStatus: response.status,
158158
weaviateStatusText: response.statusText,
159-
weaviateUrl: WEAVIATE_DOCFEEDBACK_URL,
159+
weaviateUrl: WEAVIATE_DOCFEEDBACK_URL2,
160160
// TODO: Remove errorBody from production after debugging
161161
weaviateError: errorBody,
162162
timestamp: new Date().toISOString(),

CLAUDE.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ yarn validate-links-dev
9292
- `weaviate/` - Database documentation (26 subdirectories: API, concepts, guides, search, etc.)
9393
- `cloud/` - Weaviate Cloud Services docs
9494
- `agents/` - AI agents framework docs
95-
- `integrations/` - Integration guides
95+
- Note: `/integrations` was deleted in Dec 2025, in favor of integration pages on the main Weaviate site (https://weaviate.io/product/integrations).
9696

9797
- **`/_includes`** - Reusable content fragments (code snippets, configurations, images)
9898
- Used via imports in MDX files to avoid duplication
9999
- Contains multi-language code examples
100100

101101
- **`/src`** - Custom React components and theme customizations
102-
- `components/` - 16 custom components (Feedback, InPageAskAI, APITable, etc.)
102+
- `components/` - 16 custom components (Feedback, APITable, etc.)
103103
- `theme/` - Docusaurus swizzled components (Navbar, Footer, SearchBar, etc.)
104104
- `css/` - SCSS stylesheets
105105
- `remark/` - Custom remark plugins for markdown processing
@@ -152,7 +152,6 @@ The custom navbar (`src/theme/Navbar/NavbarWrapper.js`) manages:
152152

153153
Located in `src/components/`:
154154
- **Feedback** - Expandable feedback widget linking to GitHub issues
155-
- **InPageAskAI** - LLM-powered question component
156155
- **APITable** - Structured API parameter tables
157156
- **DockerConfigGen** - Interactive Docker configuration generator
158157
- **Tooltip**, **CardsSection**, **QuickLinks** - UI components
@@ -206,7 +205,7 @@ Tests ensure documentation code examples work against live Weaviate instances.
206205
- Add tests in `/tests` for Python examples
207206
- Ensure examples are self-contained and runnable
208207
- Use inline assertions in examples for validation
209-
- Set required API keys as environment variables (OPENAI_APIKEY, COHERE_APIKEY, etc.)
208+
- Set required API keys as environment variables (OPENAI_API_KEY, COHERE_API_KEY, etc.)
210209

211210
### Link Validation
212211

@@ -233,7 +232,6 @@ Before PR merge:
233232

234233
- **Kapa.ai** - AI chatbot widget (configured in `Root.js`)
235234
- **Scalar** - Interactive REST API documentation at `/weaviate/api/rest`
236-
- **Algolia** - Search functionality
237235
- **Google Tag Manager** - Analytics
238236
- **LLMs.txt plugin** - Generates LLM-friendly content dump
239237
- **Mermaid** - Diagram support in markdown

FEEDBACK_WIDGET_README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@ The feedback widget is a component that appears on documentation pages, allowing
88

99
When a user clicks "Yes" or "No", a modal opens for optional, detailed feedback. Upon submission, a single data object is sent to a Netlify serverless function, which then stores it in a dedicated Weaviate instance.
1010

11+
For negative feedback, after submitting the initial feedback, users are shown a "Thank You" modal with an optional step to create a GitHub issue. This allows users to provide more detailed feedback without the security concerns of free-text input, as the GitHub issue form handles input sanitization.
12+
13+
## User Flow
14+
15+
### Positive Feedback
16+
1. User clicks "Yes" (thumbs up)
17+
2. Modal opens with positive feedback options
18+
3. User selects options (optional) and clicks "Submit"
19+
4. Feedback is sent to Weaviate instance
20+
5. Modal closes
21+
22+
### Negative Feedback
23+
1. User clicks "No" (thumbs down)
24+
2. Modal opens with negative feedback options
25+
3. User selects options (optional) and clicks "Submit"
26+
4. Feedback is sent to Weaviate instance
27+
5. "Thank You" modal appears with option to create GitHub issue
28+
6. User can either:
29+
- Click "Create GitHub Issue" (opens pre-populated GitHub issue form in new tab with selected feedback options)
30+
- Click "Skip" to close the modal
31+
1132
## Data Payload
1233

1334
The JSON payload sent to the Weaviate instance has the following structure:
@@ -47,9 +68,11 @@ See `.env.example` for an example of the required environment variables.
4768

4869
Add the credentials to your `.env` file like this:
4970

71+
Note: The variables have `2` suffixes as a result of debugging process. In case of any errors, check with folks with access to the Weaviate instance for the correct keys. The keys need to be scoped to "Functions" in Netlify so that the function can access them.
72+
5073
```
51-
WEAVIATE_DOCFEEDBACK_URL="https://your-weaviate-instance.weaviate.cloud"
52-
WEAVIATE_DOCFEEDBACK_API_KEY="YourSecretWeaviateApiKey"
74+
WEAVIATE_DOCFEEDBACK_URL2="https://your-weaviate-instance.weaviate.cloud"
75+
WEAVIATE_DOCFEEDBACK_APIKEY2="YourSecretWeaviateApiKey"
5376
ALLOWED_ORIGIN="http://localhost:8888" # Set "https://docs.weaviate.io" for prod, "*.netlify.app" for staging and "http://localhost:8888" for local testing
5477
```
5578

@@ -67,7 +90,7 @@ The CLI will automatically start the Docusaurus site and the serverless function
6790

6891
### 4. Create the Weaviate Collection
6992

70-
Ensure the `DocFeedback` class exists in your Weaviate instance. It should look like this:
93+
Ensure the `DocFeedback` class exists in your Weaviate instance. It should look like this :
7194

7295
```python
7396
client.collections.create(

0 commit comments

Comments
 (0)