From 0d627b60bcb9fa10ecc789a09a58587ce995b0de Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Thu, 16 Jan 2025 23:12:44 +0800 Subject: [PATCH] vig. --- doc/conf.py | 8 ++++++++ doc/jvm/javadocs/index.rst | 1 + 2 files changed, 9 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index 25d622b11dea..d6a42304eda3 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -93,6 +93,7 @@ def get_branch() -> str: # sphinx configuration, which somehow makes sphinx to copy the extracted html files to # the build directory. + def build_jvm_docs() -> None: """Build docs for the JVM packages""" git_branch = get_branch() @@ -145,6 +146,13 @@ def try_fetch_r_doc(branch: str) -> bool: with tarfile.open(filename, "r:bz2") as t: t.extractall(r_doc_dir) + + for root, subdir, files in os.walk(os.path.join(r_doc_dir, "doc", "R-package")): + for f in files: + assert f.endswith(".md") + src = os.path.join(root, f) + dst = os.path.join(PROJECT_ROOT, "doc", "R-package", f) + shutil.move(src, dst) return True except HTTPError: print(f"R doc not found at {url}. Falling back to the master branch.") diff --git a/doc/jvm/javadocs/index.rst b/doc/jvm/javadocs/index.rst index 3ff7b882136b..c6e38af94eca 100644 --- a/doc/jvm/javadocs/index.rst +++ b/doc/jvm/javadocs/index.rst @@ -1,4 +1,5 @@ :orphan: + ================== XGBoost4J Java API ==================