Files
Marco Beretta 4656b0116a feat: Migrate to Fumadocs, overhaul UI, and improve docs navigation (#500)
* feat: enhance accessibility and improve component structure across various files

* feat: enhance components with TypeScript typings and improve documentation

- Added TypeScript interface for Screenshot component props.
- Updated button component documentation for clarity.
- Removed unnecessary console log in ContainerScroll component.
- Added descriptive comments for FloatingDock and utility functions.
- Improved CSP headers in next.config.mjs for security.
- Cleaned up package.json by removing unused dependencies.
- Refactored _app.tsx to use AppProps for type safety.
- Updated meta configuration by removing hidden display property.
- Added API documentation comments for GitHub stats and subscription endpoints.
- Enhanced error handling in subscription API.
- Updated Tailwind CSS configuration with detailed comments.
- Cleaned up style.css by organizing and refining styles.
- Updated tsconfig.json to include TypeScript files for API routes.
- Added comments to Subscriber model and dbConnect utility for clarity.

* feat: add aria-labels to HeroLinks for improved accessibility

* feat: replace Twitter icon with X and add new X icon component

* chore: update code structure for better readability and maintenance

* chore: update .gitignore to include additional AI assistant files and Claude Flow generated files

* feat: replace sidebar emojis with Lucide icons, fix duplicate titles, and clean up codebase

- Add icon resolver (lib/icons.tsx) with 73 Lucide React icons mapped to string IDs
- Wire icon resolver into Fumadocs loader for automatic sidebar icon rendering
- Update all 19 meta.json files to use icon field instead of emoji prefixes
- Add icon frontmatter to all 162 MDX documentation pages
- Deduplicate adjacent sidebar icons (e.g. Search/ListFilter, Brain/Bookmark)
- Remove duplicate H1 headings from 154 MDX files (DocsTitle renders frontmatter)
- Add frontmatter to 33 files that were missing it
- Shorten overly long titles (agents, mcp, url_query)
- Rewrite /docs/local cards from old Nextra syntax to Fumadocs Card components
- Remove all emojis from Get Started and Features index pages
- Collapse sidebar folders by default (defaultOpenLevel: 0)
- Delete temporary debugging scripts, test specs, and screenshot artifacts
- Fix eslint errors in mdx-components, nextra-shims, tailwind config, and error page
- Update .gitignore to exclude test/debug artifacts

* feat: enhance accessibility and improve UI components

- Added aria-hidden attributes to social media icons in FooterMenu for better accessibility.
- Updated FooterMenu to use <footer> element for semantic HTML.
- Improved Carousel component by adding aria-labels to navigation buttons for better screen reader support.
- Modified OptionTable to use a unique key for each row to prevent rendering issues.
- Enhanced CredentialsGeneratorBox with aria-labels for input fields and buttons to improve accessibility.
- Updated documentation to remove unnecessary links and improve clarity in various sections.
- Fixed iframe attributes in documentation for better compatibility and accessibility.
- Adjusted CSS variable for muted foreground color to improve contrast.
- Updated package.json and pnpm-lock.yaml for dependency management and optimization.

* feat: update FileComponent and FolderComponent to include new props for enhanced functionality

* Add new AI provider icons and update documentation

- Introduced new SVG icons for AI providers: TogetherAI, TrueFoundry, VLLM, Vultr, and XAI.
- Updated existing AI endpoint documentation to reflect new icon names and improve clarity.
- Replaced generic \Plug\ icons with specific provider icons for Anyscale, APIpie, Cloudflare, Cohere, Databricks, DeepSeek, Fireworks, Groq, Helicone, HuggingFace, LiteLLM, Mistral, MLX, Moonshot, NeuroChain, Ollama, OpenRouter, Perplexity, Portkey, ShuttleAI, and TrueFoundry.
- Enhanced the icon resolution logic to include new icons in the icon registry.

* feat: add DocsHub and QuickStartHub components for enhanced documentation navigation

* feat: implement FeaturesHub component for enhanced feature navigation and update ViewOptions for improved links

* feat: add fresh-build script for streamlined project setup and development

* fix: update ESLint configuration and improve type handling in components

- Added 'next.config.mjs' to ESLint ignore list.
- Refactored version assignment in ChangelogPage for better type safety.
- Removed unnecessary type casting in Author components for cleaner code.
- Simplified BlogHeader component by removing redundant type assertions.
- Added eslint-disable comments for unused variables in CardCompat and Nextra shims.

* fix: update ViewOptions link for LibreChat to remove unnecessary submit parameter

* feat: enhance HomePage layout and improve GitHub star display

- Integrated HomeLayout component for better page structure.
- Updated HeroSection to improve the presentation of GitHub stars with a new layout and styling.
- Adjusted link attributes for better accessibility and user experience.

* refactor: simplify title for Model Context Protocol (MCP) documentation

- Changed the title from "Model Context Protocol (MCP)" to "MCP" for brevity.
- Updated the description to clarify how LibreChat utilizes MCP for integration with external tools and services.

* feat: enhance navigation styling and update HomeLayout props

- Added a new background style for the navigation bar with a blur effect.
- Updated HomeLayout component to include a transparent navigation mode for improved visual integration.

* refactor: deprecate plugins in favor of agents and update related documentation

- Removed references to plugins across various files, including the FeaturesHub and documentation.
- Updated navigation redirects to point to agents instead of plugins.
- Deleted the plugins documentation file to streamline content and reduce confusion.

* feat: update demo images for improved visual representation

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
2026-02-18 10:44:38 -05:00

146 lines
5.7 KiB
Plaintext

---
title: Overview
icon: BookOpen
description: Comprehensive guide on how to contribute to our documentation
---
Contributions to the documentation are welcome! This guide explains how to contribute to the LibreChat documentation by writing and formatting new documentation. Our website is built with Nextra 3 and our docs use the `.mdx` format (augmented markdown).
### When to Write a Doc vs. a Blog Post
<Callout type="info" title="Blog vs Docs">
Consider publishing a blog post when a document is an extension of an existing one, relates to a specific situation, or requires external maintenance (features not actively used by the team).
**See: [Contributing to Blog](/blog/2024-04-17_blog_guide)**
</Callout>
## Getting Started
- Fork the LibreChat Documentation repository: [https://github.com/LibreChat-AI/librechat.ai](https://github.com/LibreChat-AI/librechat.ai)
- Create a branch on your fork, name it properly, and link it to the original repository.
```sh filename="Download your LibreChat.ai branch"
git clone -b branch-name https://github.com/username/librechat.ai.git
```
> Replace `branch-name` and `username` with your details
## Creating New Documents
To create a new document:
- Use the `.mdx` file extension (see [MDX documentation](https://mdxjs.com/) for more info).
- Name files using **lowercase letters** and **underscores** (e.g., `documentation_guidelines.mdx`).
- Place new documents in the relevant folder/sub-folder under `./docs`.
- Add the document to the table of contents in the `_meta.ts` file of the folder where your document is located. If you don't add it, it will be alphabetically sorted after the ordered docs.
## Markdown Formatting Guidelines
- Use headings and subheadings with `#`, `##`, and `###`.
- Use `#` for the document title (**only one main title per document is allowed**).
- Use `##` for main sections.
- Use `###` for sub-sections within a section.
- Use `**` to make text **bold** and highlight important information (do not use in place of a heading).
- Use URL paths to link to other documents (e.g., `/docs/documentation` points the current [doc](/docs/documentation)).
- You can use HTML, TS, and JS to add additional features to a document.
- Ensure any HTML has closing tags (e.g., `<img src="" />` or `<a href="link"></a>`).
- Do not use HTML comments; instead, use [Markdown comments](https://gist.github.com/jonikarppinen/47dc8c1d7ab7e911f4c9?permalink_comment_id=4272770#gistcomment-4272770) **only if the text is actually hidden**.
### Docs Resources
<Callout type="tip" title="Docs Resources">
See some integrated components examples:
- [Components Examples](/docs/documentation/examples)
For more information, refer to:
- [Nextra](https://nextra.site/docs/docs-theme/start)
- [Nextra 3](https://the-guild.dev/blog/nextra-3#intro)
- [MDX](https://mdxjs.com/)
</Callout>
## Document Metadata
Add metadata to the header of your document using the following format:
> Note: The `ogImage` field is optional and can be omitted altogether. It is used to specify the image that will be displayed when sharing your document on social media platforms.
```yaml filename="metadata example:"
---
title: Document Title
description: This description will be used in social cards and search engine results.
ogImage: /images/docs/<category>/image.png (optional)
---
```
## Assets
Whenever possible, upload assets (e.g., images) to GitHub instead of storing them in the `/public` folder. This helps keep your repository organized and makes it easier to manage your assets.
### Images
**Note: In the following example:**
- I provided screenshots for both light and dark mode.
- I used `Image from 'next/image'` which gave me 4x improvement on the image file size for better performance.
see the following example in action here: [User Guides](/docs/user_guides)
```mdx filename="Example"
import Image from 'next/image'
<div style={{padding: "20px", display: "flex", justifyContent: "center", alignItems: "center", flexDirection: "column"}}>
<div className="image-light-theme">
<Image src="https://github.com/danny-avila/LibreChat/assets/32828263/cf0f3231-287a-407f-bd4d-3d5bad94e893" alt="ipad-light" width={1024} height={512} style={{borderRadius: "5px"}} />
</div>
<div className="image-dark-theme">
<Image src="https://github.com/danny-avila/LibreChat/assets/32828263/a03ee02d-5099-4220-95b0-bfa2d3b00b4d" alt="ipad-dark" width={1024} height={512} style={{borderRadius: "5px"}} />
</div>
</div>
```
### How to Upload Images and Videos on GitHub
<Callout title="Method A" emoji="🅰️" collapsible>
- Go to the LibreChat repository
- Find a random conversation or PR
- Paste an image from your clipboard into the text input box. It will automatically be converted into a URL.
- Copy and paste the resulting URL in your document. (Then exit the page without actually posting the comment.😉)
![image](https://github.com/danny-avila/LibreChat/assets/32828263/c1612f93-a6c0-4af7-9965-9f83872cff00)
</Callout>
<Callout title="Method B" emoji="🅱️" collapsible>
- Upload directly from the web UI:
![image](https://github.com/danny-avila/LibreChat/assets/32828263/4f138ab4-31a5-4fae-a459-5335e5ff25a8)
</Callout>
## Test the Docs
<Callout type="warning" title="Before you submit">
### Review carefully before submitting your PR
Before submitting a PR for your blog post, **always** test to ensure everything looks and functions as intended.
#### Check the following:
- Your new document(s) for layout, accuracy and completeness
- The document's position in the Table of Contents (ToC)
- The image and link in your document
#### To test:
1. Prepare the environment by running `pnpm install`
2. Start the dev server with `pnpm dev`
3. Test the build by running `pnpm build` followed by `pnpm start`
</Callout>