From e1b95b659bf7d14c30315f081fa1338d48e92bc2 Mon Sep 17 00:00:00 2001 From: TingWang Date: Mon, 22 Sep 2025 17:51:34 +0800 Subject: [PATCH] fix vllm-mindspore docs Signed-off-by: TingWang --- docs/vllm_mindspore/docs/source_en/conf.py | 12 ++---------- docs/vllm_mindspore/docs/source_en/index.rst | 4 ++-- docs/vllm_mindspore/docs/source_zh_cn/conf.py | 12 ++---------- .../docs/source_zh_cn/release_notes/release_notes.md | 2 +- 4 files changed, 7 insertions(+), 23 deletions(-) diff --git a/docs/vllm_mindspore/docs/source_en/conf.py b/docs/vllm_mindspore/docs/source_en/conf.py index b9b86d9414..7b2a780b0d 100644 --- a/docs/vllm_mindspore/docs/source_en/conf.py +++ b/docs/vllm_mindspore/docs/source_en/conf.py @@ -298,16 +298,8 @@ import search_code src_release = "./release_notes/release_notes.md" des_release = "./RELEASE.md" -with open(src_release, "r", encoding="utf-8") as f: - data = f.read() -if len(re.findall("\n## (.*?)\n",data)) > 1: - content = re.findall("(## [\s\S\n]*?)\n## ", data) -else: - content = re.findall("(## [\s\S\n]*)", data) - -with open(des_release, "w", encoding="utf-8") as p: - p.write("# Release Notes"+"\n\n") - p.write(content[0]) +if os.path.isfile(src_release): + os.rename(src_release, des_release) os.makedirs(os.path.join(present_path, "../build_en/html/"), exist_ok=True) shutil.copy(os.path.join(present_path, "arch.png"), os.path.join(present_path, "../build_en/html/")) diff --git a/docs/vllm_mindspore/docs/source_en/index.rst b/docs/vllm_mindspore/docs/source_en/index.rst index a373198a6d..08986a5db5 100644 --- a/docs/vllm_mindspore/docs/source_en/index.rst +++ b/docs/vllm_mindspore/docs/source_en/index.rst @@ -133,7 +133,7 @@ Apache License 2.0, as found in the `LICENSE 1: - content = re.findall("(## [\s\S\n]*?)\n## ", data) -else: - content = re.findall("(## [\s\S\n]*)", data) - -with open(des_release, "w", encoding="utf-8") as p: - p.write("# Release Notes"+"\n\n") - p.write(content[0]) +if os.path.isfile(src_release): + os.rename(src_release, des_release) os.makedirs(os.path.join(present_path, "../build_zh_cn/html/"), exist_ok=True) shutil.copy(os.path.join(present_path, "arch.cn.png"), os.path.join(present_path, "../build_zh_cn/html/")) diff --git a/docs/vllm_mindspore/docs/source_zh_cn/release_notes/release_notes.md b/docs/vllm_mindspore/docs/source_zh_cn/release_notes/release_notes.md index 8b6c39dbc6..db82dae47b 100644 --- a/docs/vllm_mindspore/docs/source_zh_cn/release_notes/release_notes.md +++ b/docs/vllm_mindspore/docs/source_zh_cn/release_notes/release_notes.md @@ -1,4 +1,4 @@ -# 发布信息 +# Release Notes [![查看源文件](https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source.svg)](https://gitee.com/mindspore/docs/blob/master/docs/vllm_mindspore/docs/source_zh_cn/release_notes/release_notes.md) -- Gitee