E
public

 

xly ERP 框架 Wiki

本仓库包含 xly ERP 框架 Wiki 的两个语言版本。

简体中文文档由英文版翻译得到;如果中英文内容冲突,以英文版为准。

xly-wiki/
├── en/      英文 MkDocs 项目
├── zh/      简体中文 MkDocs 项目
└── site/    共享生成输出,已被 git 忽略

安装

依赖只需安装一次,全部装在仓库根目录的 .venv/ 中(已被 git 忽略,请勿提交):

python3 -m venv .venv
.venv/bin/pip install -r en/requirements.txt

zh/requirements.txt 与英文版相同;上面那条命令已经覆盖两种语言。

如果之后修改了 requirements.txt(例如新增依赖),重新执行同一条 pip install 即可更新。

构建

.venv/bin/mkdocs build -f en/mkdocs.yml
.venv/bin/mkdocs build -f zh/mkdocs.yml

输出目录:

site/en/
site/zh/

本地预览

单独预览任一语言:

.venv/bin/mkdocs serve -f en/mkdocs.yml
.venv/bin/mkdocs serve -f zh/mkdocs.yml

要测试语言切换按钮,需要先构建两种语言,并从共享输出目录启动静态服务:

.venv/bin/mkdocs build -f en/mkdocs.yml
.venv/bin/mkdocs build -f zh/mkdocs.yml
python3 -m http.server 8000 -d site

然后打开 http://127.0.0.1:8000/zh/http://127.0.0.1:8000/en/

静态托管时发布共享的 site/ 目录。


xly ERP Framework Wiki

This repository contains both language versions of the xly ERP framework wiki.

The Simplified Chinese documentation is translated from the English version. If the two versions conflict, the English documentation is authoritative.

xly-wiki/
├── en/      English MkDocs project
├── zh/      Simplified Chinese MkDocs project
└── site/    shared generated output, ignored by git

Install

Dependencies are installed once into a .venv/ at the repo root (gitignored — do not commit it):

python3 -m venv .venv
.venv/bin/pip install -r en/requirements.txt

zh/requirements.txt is identical to the English file, so the single command above covers both languages.

If requirements.txt changes later (new dependency added), re-run the same pip install to refresh.

Build

.venv/bin/mkdocs build -f en/mkdocs.yml
.venv/bin/mkdocs build -f zh/mkdocs.yml

This writes:

site/en/
site/zh/

Serve Locally

Run either language directly:

.venv/bin/mkdocs serve -f en/mkdocs.yml
.venv/bin/mkdocs serve -f zh/mkdocs.yml

To test the language switcher, build both languages and serve the shared output root:

.venv/bin/mkdocs build -f en/mkdocs.yml
.venv/bin/mkdocs build -f zh/mkdocs.yml
python3 -m http.server 8000 -d site

Then open http://127.0.0.1:8000/zh/ or http://127.0.0.1:8000/en/.

For static hosting, publish the shared site/ directory.