Skip to content

Commit 52d23f4

Browse files
authored
[Improvement] add mkdocs website (#194)
* add mkdocs website * update readthedocs
1 parent 2520b8d commit 52d23f4

File tree

6 files changed

+95
-0
lines changed

6 files changed

+95
-0
lines changed

.readthedocs.yaml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.12"
13+
14+
mkdocs:
15+
configuration: mkdocs.yml
16+
17+
# Optionally declare the Python requirements required to build your docs
18+
python:
19+
install:
20+
- requirements: docs/requirements.txt

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ERNIE Bot SDK提供便捷易用的接口,可以调用文心大模型的能力
99
![Supported Python versions](https://img.shields.io/badge/python-3.8+-orange.svg)
1010
![Supported OSs](https://img.shields.io/badge/os-linux%2C%20win%2C%20mac-yellow.svg)
1111

12+
[![Built with Material for MkDocs](https://img.shields.io/badge/Material_for_MkDocs-526CFE?style=for-the-badge&logo=MaterialForMkDocs&logoColor=white)](https://squidfunk.github.io/mkdocs-material/)
1213
</div>
1314

1415
## 最新动态

docs/index.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Welcome to MkDocs
2+
3+
For full documentation visit [mkdocs.org](https://www.mkdocs.org).
4+
5+
## Commands
6+
7+
* `mkdocs new [dir-name]` - Create a new project.
8+
* `mkdocs serve` - Start the live-reloading docs server.
9+
* `mkdocs build` - Build the documentation site.
10+
* `mkdocs -h` - Print help message and exit.
11+
12+
## Project layout
13+
14+
mkdocs.yml # The configuration file.
15+
docs/
16+
index.md # The documentation homepage.
17+
... # Other markdown pages, images and other files.

docs/package/erniebot_agent/agents.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
# Agent Module
3+
4+
5+
::: erniebot_agent.agents.base
6+
options:
7+
summary: true
8+
members:
9+
- BaseAgent
10+
- Agent

docs/requirements.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
mkdocs
2+
mkdocstrings[python]
3+
mkdocstrings-python
4+
griffe

mkdocs.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
site_name: Ernie Agent
2+
repo_url: https://github.com/PaddlePaddle/ERNIE-Bot-SDK/
3+
repo_name: ERNIE-Agent
4+
site_description: provides an easy-to-use Chinese agent builder tool suite.
5+
copyright: '@PaddlePaddle community'
6+
nav:
7+
- 介绍: 'index.md'
8+
- 快速开始:
9+
- 介绍: 'tutorials/index.md'
10+
- 使用指南:
11+
- 介绍: 'how-to/how-to_introduction.md'
12+
- API:
13+
- erniebot-agent:
14+
- agents: "package/erniebot_agent/agents.md"
15+
- chat_models: "package/erniebot_agent/chat_models.md"
16+
17+
theme:
18+
name: material
19+
favicon: img/favicon.ico
20+
21+
markdown_extensions:
22+
- pymdownx.highlight
23+
- pymdownx.superfences
24+
- toc:
25+
baselevel: 2
26+
27+
plugins:
28+
- search
29+
- mkdocstrings:
30+
default_handler: python
31+
handlers:
32+
python:
33+
options:
34+
show_submodules: true
35+
docstring_style: google
36+
annotations_path: brief
37+
paths: [erniebot-agent/src]
38+
selection:
39+
filters:
40+
- "^__init__$" # but always include __init__ modules and methods
41+
watch:
42+
- erniebot-agent/src
43+
- erniebot/src

0 commit comments

Comments
 (0)