跳到正文
我的项目

我的项目

用一句话说明这个项目做什么、给谁用。

2026年11月20日

我的项目#

指南#

我的项目帮助[谁]完成[什么],省去[常见的麻烦]。这份指南从安装开始,一直讲到在真实项目里使用。

  • 安装 环境要求和一行安装命令。
  • 快速开始 五分钟得到第一个结果。

提示

每一页都有 Markdown 版本。点页面顶部的复制为 Markdown,就能粘贴给 AI 助手。

安装#

需要 Python 3.10 或更高版本。

pip
pip install my-project
uv
uv add my-project
pipx
pipx install my-project

确认安装成功:

$ my-project --version
my-project 1.0.0

注意

把这些命令换成你项目自己的。标签相同的选项卡会在全站同步:读者选过一次 uv,其他页面也会显示 uv。

快速开始#

从一个空目录开始,得到第一个结果。

  1. 新建项目目录:mkdir hello && cd hello
  2. 把下面的配置保存为 my-project.toml
  3. 运行 my-project run,结果写入 build/summary.txt。
my-project.toml
[project]
name = "hello"
output = "build/"

发生了什么#

flowchart LR
  config[my-project.toml] --> run{my-project run}
  run --> out[build/summary.txt]

注意

中文站只放最常用的几页。没有翻译的页面,读者可以通过右上角的语言菜单切换到英文版。

Writing docs#

These pages use the Sumi theme for MkDocs NG. Everything is plain Markdown, so the files read well on GitHub too.

Preview locally#

pip install -r requirements.txt
mkdocs serve                  # http://127.0.0.1:8000/, Chinese under zh/
mkdocs serve --language zh    # only Chinese, faster

Where things live#

  • docs/English pages
    • index.mdhome page (data in front matter)
    • guide/
    • reference/
    • releases.mdrelease page, filled from releases.yml
    • releases.yml
    • blog/
      • .authors.yml
      • posts/one file per post, named YYYY-MM-DD-slug.md
  • docs-zh/Chinese pages, same layout
  • mkdocs.ymlsettings for both languages

Components#

You write You get
> [!NOTE] A callout. Also TIP, IMPORTANT, WARNING, CAUTION.
A numbered list + {.steps} A procedure with numbered steps. Indent step content by 4 spaces.
A list of links + {.cards} A grid of cards.
Code fences with {tab="…"} Tabs.
A table + {.fields} A parameter reference.
```mermaid A diagram.
```filetree A file tree.
$E = mc^2$ Math.
++Ctrl+K++ Keys.

See the Sumi component guide for all of them.

Before you open a pull request#

mkdocs build --strict

--strict turns broken links and missing pages into errors. CI runs the same command.

Configuration#

My Project reads my-project.toml from the current folder. Environment variables override the file.

my-project.toml
[project]
name = "hello"
output = "build/"
verbose = false
namestringDefault folder name
Shown in output and logs.
outputpathDefault build/
Where results are written. Created if missing.
verbosebooleanDefault false
Print every step. Same as --verbose.
timeoutintegerDefault 30
Seconds before a run is stopped. 0 waits forever.

Environment variables#

MY_PROJECT_TOKEN
The API token. Never put it in the file.
MY_PROJECT_OUTPUT
output

版本发布#

安装最新版本:

pip install --upgrade my-project

发布说明与英文站共用 docs/releases.yml。

博客#

项目动态、发布说明和使用指南。

Esc
↵ 打开 ↑↓ 移动 Esc 关闭
键盘快捷键
Ctrl K /
打开搜索与命令面板
t
切换深色模式
[ ]
上一页 / 下一页
j k
上一个 / 下一个标题
?
显示本帮助