2023-12-22 08:36:42 -05:00
---
title: 📝 Documentation Guidelines
2024-03-11 09:06:27 -04:00
description: Learn how to contribute to the LibreChat documentation by following these guidelines.
2023-12-22 08:36:42 -05:00
weight: -9
---
2024-03-19 19:38:18 +02:00
2024-03-11 09:06:27 -04:00
# Documentation Contribution Guidelines
2023-05-09 13:47:14 -04:00
2024-03-11 09:06:27 -04:00
This document explains how to contribute to the LibreChat documentation by writing and formatting new documentation.
2023-07-01 20:11:37 -04:00
## New Documents
2024-03-19 19:38:18 +02:00
2024-03-11 09:06:27 -04:00
- Use lowercase letters and underscores to name new document files (e.g., `documentation_guidelines.md` ).
2023-12-22 08:36:42 -05:00
- For new features, create new documentation and place it in the relevant folder/sub-folder under `../docs` .
2024-03-11 09:06:27 -04:00
- If the feature adds new functionality, add it to the appropriate section in the main `README.md` and `../docs/index.md` .
- When creating a new document, **add it to the table of contents in the `index.md` file of the folder where your document is located.**
2023-07-01 20:11:37 -04:00
2023-12-22 08:36:42 -05:00
## Markdown Formatting
2024-03-19 19:38:18 +02:00
2023-07-01 20:11:37 -04:00
- Use `#` , `##` , and `###` for headings and subheadings.
2024-03-11 09:06:27 -04:00
- Use `#` for the document title.
2023-07-01 20:11:37 -04:00
- Use `##` for the main sections of the document.
- Use `###` for the sub-sections within a section.
2024-03-11 09:06:27 -04:00
- Use `**` to make text **bold** and highlight important information (do not use in place of a heading).
2023-07-06 17:41:22 -04:00
- Use relative paths for links to other documents.
2024-03-11 09:06:27 -04:00
- You can use HTML to add additional features to a document.
## Document Metadata
2024-03-19 19:38:18 +02:00
2024-03-11 09:06:27 -04:00
- Add metadata in the header of your document following this format:
2024-03-19 19:38:18 +02:00
2024-03-11 09:06:27 -04:00
```yaml
2023-12-22 08:36:42 -05:00
---
2024-03-11 09:06:27 -04:00
title: 😊 Document Title
description: This description will be used in social cards and search engine results.
2023-12-22 08:36:42 -05:00
weight: 0
---
```
2024-03-19 19:38:18 +02:00
2024-03-11 09:06:27 -04:00
- `title:` Begin with an emoji representing your new document, followed by a descriptive title.
- `description:` A brief description of the document's content.
- `weight:` Setting the weight in the document metadata will influence its position in the table of contents. Lowest weights are placed first. If not set, it defaults to `0` . When multiple docs have the same weight, they are sorted alphabetically.
2023-07-01 20:11:37 -04:00
## Important Notes
2024-03-19 19:38:18 +02:00
2024-03-11 09:06:27 -04:00
- **⚠️ Keep the documentation organized and structured⚠️ **
2023-07-01 20:11:37 -04:00
- Do not add unrelated information to an existing document. Create a new one if needed.
2024-03-11 09:06:27 -04:00
- Upload all assets (images, files) directly from GitHub's web interface when editing the document.
> **Tip:** Go to the LibreChat repository, find a conversation, and paste an image from your clipboard into the text input box. It will automatically be converted into a URL you can use in your document. (Then exit the page without actually posting the comment.😉)
2024-03-19 19:38:18 +02:00
> Get the link from a text input box:
> 
> Or upload directly from the web UI:
> 
2023-07-06 17:41:22 -04:00
2024-03-11 09:06:27 -04:00
## Testing New Documents
2024-03-19 19:38:18 +02:00
2024-03-11 09:06:27 -04:00
- When adding new documents, it is important to test them locally using MkDocs to ensure correct formatting and proper organization in the table of contents (index.md and the left panel of the category).
2024-03-19 19:38:18 +02:00
### Setup MkDocs Locally
- Requirement: Python 3.3 and later (on older versions you will need to install virtualenv)
2024-03-11 09:06:27 -04:00
#### Material for MkDocs Installation
2024-03-19 19:38:18 +02:00
2024-03-11 09:06:27 -04:00
- We are using MkDocs Material and multiple plugins. All of them are required to properly test new documentation.
2024-03-19 19:38:18 +02:00
2024-03-11 09:06:27 -04:00
```sh
2024-03-19 19:38:18 +02:00
python -m venv .venv
. .venv/bin/activate
pip install -r ./docs/src/requirements.txt
2024-03-11 09:06:27 -04:00
```
2024-03-19 19:38:18 +02:00
2024-03-11 09:06:27 -04:00
#### Running MkDocs
2024-03-19 19:38:18 +02:00
2024-03-11 09:06:27 -04:00
- Use this command to start MkDocs:
2024-03-19 19:38:18 +02:00
2024-03-11 09:06:27 -04:00
```sh
mkdocs serve
```
2024-03-19 19:38:18 +02:00
2024-03-11 09:06:27 -04:00
- Look for any errors in the console logs and fix them if possible.
- Access the locally running documentation website at `http://127.0.0.1:8000/` .
2024-03-19 19:38:18 +02:00

2023-07-06 17:41:22 -04:00
2023-07-01 20:11:37 -04:00
## Tips
2024-03-19 19:38:18 +02:00
2024-03-11 09:06:27 -04:00
- You can check the code of this document to see how it works.
- You can run MkDocs locally to test more extensive documentation changes.
- You can ask GPT or Bing for help with proofreading, syntax, and markdown formatting.
2023-07-01 20:11:37 -04:00
---
2024-03-19 19:38:18 +02:00
2023-07-01 20:11:37 -04:00
### Example of HTML image embedding:
2024-03-19 19:38:18 +02:00
2023-07-01 20:11:37 -04:00
< p align = "center" >
2024-02-19 09:42:57 -05:00
< a href = "https://discord.librechat.ai" >
2023-07-06 17:41:22 -04:00
< img src = "https://github.com/danny-avila/LibreChat/assets/32828263/45890a7c-5b8d-4650-a6e0-aa5d7e4951c3" height = "128" width = "128" >
2023-07-01 20:11:37 -04:00
< / a >
< a href = "https://librechat.ai" >
2023-07-06 17:41:22 -04:00
< h3 align = "center" > LibreChat< / h3 >
2023-07-01 20:11:37 -04:00
< / a >
2023-07-06 17:41:22 -04:00
< / p >