mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 08:12:00 +02:00
📋 chore: add requirements.txt to documentation (#2122)
* chore: add requirements.txt to documentation, to ease maintenance * docs: Update documentation_guidelines.md
This commit is contained in:
parent
382b303963
commit
d8304ec1bb
3 changed files with 33 additions and 11 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -74,6 +74,7 @@ src/style - official.css
|
||||||
config.local.ts
|
config.local.ts
|
||||||
**/storageState.json
|
**/storageState.json
|
||||||
junit.xml
|
junit.xml
|
||||||
|
**/.venv/
|
||||||
|
|
||||||
# docker override file
|
# docker override file
|
||||||
docker-compose.override.yaml
|
docker-compose.override.yaml
|
||||||
|
|
|
@ -3,17 +3,20 @@ title: 📝 Documentation Guidelines
|
||||||
description: Learn how to contribute to the LibreChat documentation by following these guidelines.
|
description: Learn how to contribute to the LibreChat documentation by following these guidelines.
|
||||||
weight: -9
|
weight: -9
|
||||||
---
|
---
|
||||||
|
|
||||||
# Documentation Contribution Guidelines
|
# Documentation Contribution Guidelines
|
||||||
|
|
||||||
This document explains how to contribute to the LibreChat documentation by writing and formatting new documentation.
|
This document explains how to contribute to the LibreChat documentation by writing and formatting new documentation.
|
||||||
|
|
||||||
## New Documents
|
## New Documents
|
||||||
|
|
||||||
- Use lowercase letters and underscores to name new document files (e.g., `documentation_guidelines.md`).
|
- Use lowercase letters and underscores to name new document files (e.g., `documentation_guidelines.md`).
|
||||||
- For new features, create new documentation and place it in the relevant folder/sub-folder under `../docs`.
|
- For new features, create new documentation and place it in the relevant folder/sub-folder under `../docs`.
|
||||||
- If the feature adds new functionality, add it to the appropriate section in the main `README.md` and `../docs/index.md`.
|
- 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.**
|
- 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.**
|
||||||
|
|
||||||
## Markdown Formatting
|
## Markdown Formatting
|
||||||
|
|
||||||
- Use `#`, `##`, and `###` for headings and subheadings.
|
- Use `#`, `##`, and `###` for headings and subheadings.
|
||||||
- Use `#` for the document title.
|
- Use `#` for the document title.
|
||||||
- Use `##` for the main sections of the document.
|
- Use `##` for the main sections of the document.
|
||||||
|
@ -23,7 +26,9 @@ This document explains how to contribute to the LibreChat documentation by writi
|
||||||
- You can use HTML to add additional features to a document.
|
- You can use HTML to add additional features to a document.
|
||||||
|
|
||||||
## Document Metadata
|
## Document Metadata
|
||||||
|
|
||||||
- Add metadata in the header of your document following this format:
|
- Add metadata in the header of your document following this format:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
---
|
---
|
||||||
title: 😊 Document Title
|
title: 😊 Document Title
|
||||||
|
@ -31,53 +36,65 @@ description: This description will be used in social cards and search engine res
|
||||||
weight: 0
|
weight: 0
|
||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
- `title:` Begin with an emoji representing your new document, followed by a descriptive title.
|
- `title:` Begin with an emoji representing your new document, followed by a descriptive title.
|
||||||
- `description:` A brief description of the document's content.
|
- `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.
|
- `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.
|
||||||
|
|
||||||
## Important Notes
|
## Important Notes
|
||||||
|
|
||||||
- **⚠️Keep the documentation organized and structured⚠️**
|
- **⚠️Keep the documentation organized and structured⚠️**
|
||||||
- Do not add unrelated information to an existing document. Create a new one if needed.
|
- Do not add unrelated information to an existing document. Create a new one if needed.
|
||||||
- Upload all assets (images, files) directly from GitHub's web interface when editing the document.
|
- 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.😉)
|
> **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.😉)
|
||||||
|
|
||||||
> Get the link from a text input box:
|
> Get the link from a text input box:
|
||||||

|
> 
|
||||||
Or upload directly from the web UI:
|
> Or upload directly from the web UI:
|
||||||

|
> 
|
||||||
|
|
||||||
## Testing New Documents
|
## Testing New Documents
|
||||||
|
|
||||||
- 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).
|
- 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).
|
||||||
|
|
||||||
### Setup MkDocs Locally
|
### Setup MkDocs Locally
|
||||||
- Requirement: Python 3.x
|
|
||||||
|
- Requirement: Python 3.3 and later (on older versions you will need to install virtualenv)
|
||||||
|
|
||||||
#### Material for MkDocs Installation
|
#### Material for MkDocs Installation
|
||||||
|
|
||||||
- We are using MkDocs Material and multiple plugins. All of them are required to properly test new documentation.
|
- We are using MkDocs Material and multiple plugins. All of them are required to properly test new documentation.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pip install mkdocs-material
|
python -m venv .venv
|
||||||
pip install mkdocs-nav-weight
|
. .venv/bin/activate
|
||||||
pip install mkdocs-publisher
|
pip install -r ./docs/src/requirements.txt
|
||||||
pip install mkdocs-exclude
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Running MkDocs
|
#### Running MkDocs
|
||||||
|
|
||||||
- Use this command to start MkDocs:
|
- Use this command to start MkDocs:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
mkdocs serve
|
mkdocs serve
|
||||||
```
|
```
|
||||||
|
|
||||||
- Look for any errors in the console logs and fix them if possible.
|
- 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/`.
|
- Access the locally running documentation website at `http://127.0.0.1:8000/`.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Tips
|
## Tips
|
||||||
|
|
||||||
- You can check the code of this document to see how it works.
|
- 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 run MkDocs locally to test more extensive documentation changes.
|
||||||
- You can ask GPT or Bing for help with proofreading, syntax, and markdown formatting.
|
- You can ask GPT or Bing for help with proofreading, syntax, and markdown formatting.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Example of HTML image embedding:
|
### Example of HTML image embedding:
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://discord.librechat.ai">
|
<a href="https://discord.librechat.ai">
|
||||||
<img src="https://github.com/danny-avila/LibreChat/assets/32828263/45890a7c-5b8d-4650-a6e0-aa5d7e4951c3" height="128" width="128">
|
<img src="https://github.com/danny-avila/LibreChat/assets/32828263/45890a7c-5b8d-4650-a6e0-aa5d7e4951c3" height="128" width="128">
|
||||||
|
|
4
docs/src/requirements.txt
Normal file
4
docs/src/requirements.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
mkdocs-material
|
||||||
|
mkdocs-nav-weight
|
||||||
|
mkdocs-publisher
|
||||||
|
mkdocs-exclude
|
Loading…
Add table
Add a link
Reference in a new issue