Skip to content

Commit e6753c4

Browse files
committed
feat(docs): add AI integration documentation and sidebar link
1 parent bab6c75 commit e6753c4

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: AI and LLM Integration with Flowbite React
3+
description: Learn how to integrate Flowbite React with AI models, LLMs, and chatbots using our specialized documentation routes and markdown accessibility features
4+
keywords: AI integration, LLM integration, React AI, AI documentation, ChatGPT integration, AI components, language models, machine learning, documentation API, markdown API
5+
---
6+
7+
Flowbite React provides powerful, built-in support for AI and Large Language Model (LLM) integration through specialized routes that expose documentation in machine-readable formats. These features enable seamless integration with ChatGPT, Claude, and other AI assistants.
8+
9+
## Compliance
10+
11+
Flowbite React follows the [llms.txt standard](https://llmstxt.org/), a community-driven proposal initiated by Jeremy Howard that standardizes how websites provide LLM-friendly information.
12+
13+
Our implementation helps address the fundamental challenge that language models face: context windows are too small to process entire websites, and HTML content with navigation, ads, and JavaScript is difficult to convert to LLM-friendly formats.
14+
15+
By adopting this standard, Flowbite React ensures that AI assistants can efficiently access our documentation without struggling with complex HTML or excessive content.
16+
17+
## Machine-Readable Routes
18+
19+
### LLM-Optimized Endpoints
20+
21+
- **`https://flowbite-react.com/llms.txt`** - A concise version of the documentation specifically optimized for LLM consumption and context-efficient prompting
22+
- **`https://flowbite-react.com/llms-full.txt`** - The complete documentation in a format suitable for comprehensive LLM processing when token limits aren't a concern
23+
24+
### Markdown API Access
25+
26+
All documentation pages can be accessed in pure markdown format by simply appending `.md` to their URLs. For example:
27+
28+
- `https://flowbite-react.com/docs/getting-started/introduction.md`
29+
- `https://flowbite-react.com/docs/components/button.md`
30+
- `https://flowbite-react.com/docs/customize/theme.md`
31+
32+
## Implementation Examples
33+
34+
Here's how you might leverage these features in your AI integration:
35+
36+
```ts
37+
// Fetching LLM-optimized documentation for context-efficient prompting
38+
const llmDocs = await fetch("https://flowbite-react.com/llms.txt").then((res) => res.text());
39+
40+
// Getting full documentation for comprehensive LLM processing
41+
const fullDocs = await fetch("https://flowbite-react.com/llms-full.txt").then((res) => res.text());
42+
43+
// Accessing specific component documentation in markdown format
44+
const buttonDocs = await fetch("https://flowbite-react.com/docs/components/button.md").then((res) => res.text());
45+
46+
// Using markdown documentation in a ChatGPT prompt
47+
const chatGptPrompt = `Based on this Flowbite React Button component documentation:
48+
${buttonDocs}
49+
50+
Generate a code example for a primary button with an icon.`;
51+
```
52+
53+
These features make it easy to integrate Flowbite React's documentation with modern AI systems, creating powerful, intelligent tools to enhance developer experience and productivity.

apps/web/data/docs-sidebar.ts

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const DOCS_SIDEBAR: DocsSidebarSection[] = [
1818
{ title: "Compatibility", href: "/docs/getting-started/compatibility", tag: "new" },
1919
{ title: "CLI", href: "/docs/getting-started/cli", tag: "updated" },
2020
{ title: "Editor Setup", href: "/docs/getting-started/editor-setup" },
21+
{ title: "AI Integration", href: "/docs/getting-started/ai-integration", tag: "new" },
2122
{ title: "Server Components", href: "/docs/getting-started/server-components" },
2223
{ title: "License", href: "/docs/getting-started/license" },
2324
{ title: "Changelog", href: "https://github.com/themesberg/flowbite-react/releases" },

0 commit comments

Comments
 (0)