diff --git a/.gitmodules b/.gitmodules index 297ce922..cfee595d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -11,3 +11,7 @@ [submodule "_repos/ms-swift"] path = _repos/ms-swift url = https://github.com/modelscope/ms-swift.git +[submodule "_repos/vllm-ascend"] + path = _repos/vllm-ascend + url = https://github.com/vllm-project/vllm-ascend.git + branch = main diff --git a/Makefile b/Makefile index 28f828c1..92be3a63 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,8 @@ PROJECT_CONFIGS = \ _repos/verl/docs/ascend_tutorial:sources/verl \ _repos/VeOmni/docs:sources/VeOmni \ _repos/LLaMA-Factory/docs:sources/LLaMA-Factory \ - _repos/ms-swift/docs:sources/ms-swift + _repos/ms-swift/docs:sources/ms-swift \ + _repos/vllm-ascend/docs/source:sources/vllm-ascend # vllm-ascend 文档根在 docs/source/ 下 # Configure all subprojects generated path GENERATED_DOCS := sources/_generated @@ -68,6 +69,9 @@ copy-docs: init-submodules @echo "Preparing generated docs directory..." @mkdir -p $(GENERATED_DOCS) + # vllm-ascend: 仅删除根 index(避免与 sources/vllm-ascend/index.rst 冲突), + # 保留子目录 index(如 tutorials/models/index.md)供 toctree 直接引用。 + # 其他社区: 递归删除所有 index,导航由各社区 sources//index.rst 独立定义。 @echo "Copying project documentation..." @for config in $(PROJECT_CONFIGS); do \ src=$$(echo $$config | cut -d: -f1); \ @@ -76,11 +80,16 @@ copy-docs: init-submodules echo "Copying $$src -> $$dst"; \ rm -rf $$dst; \ mkdir -p $$dst; \ - find $$src -name 'index.*' -delete 2>/dev/null || true; \ echo "Copying $$src to $$dst"; \ cp -r "$$src"/* "$$dst"/ 2>/dev/null || echo " [WARN] Source directory does not exist or is empty: $$src"; \ + if [ "$$rel_dst" = "sources/vllm-ascend" ]; then \ + rm -f "$$dst/index.md" "$$dst/index.rst" "$$dst/index.html" 2>/dev/null || true; \ + else \ + find "$$dst" -name 'index.*' -delete 2>/dev/null || true; \ + fi; \ done + # Clean up submodules clean-submodules: @echo "Cleaning up submodules..." diff --git a/_repos/vllm-ascend b/_repos/vllm-ascend new file mode 160000 index 00000000..2916601e --- /dev/null +++ b/_repos/vllm-ascend @@ -0,0 +1 @@ +Subproject commit 2916601e6c0705cb147387409c679cceab5c3ce9 diff --git a/_static/images/vllm-ascend.png b/_static/images/vllm-ascend.png new file mode 100644 index 00000000..b71b4926 Binary files /dev/null and b/_static/images/vllm-ascend.png differ diff --git a/_templates/layout.html b/_templates/layout.html index b470b03c..5e3e841e 100644 --- a/_templates/layout.html +++ b/_templates/layout.html @@ -14,7 +14,9 @@ document.addEventListener('DOMContentLoaded', function() { const mapping = {{ comm_config.get('sidebar_mapping', {}) | tojson | safe }}; const commId = '{{ current_community_id }}'; - + // 根目录文件的显式分组映射(filename → folder key) + const rootFiles = mapping['__root_files__'] || {}; + // 获取数据源和目标容器 const globalMenu = document.getElementById('temp-menu-holder'); const targetContainer = document.getElementById('independent-sidebar'); @@ -38,14 +40,13 @@ if (activeL1) { // 步骤 B: 找到属于这个社区的所有子页面 (