mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-10-23 21:40:54 +08:00
Fix the multiversion_doc.
Some checks failed
Build / Bazel, cl, windows-latest (push) Has been cancelled
Build / Bazel, clang++, macos-latest (push) Has been cancelled
Build / Bazel, clang++, ubuntu-latest (push) Has been cancelled
Build / Bazel, g++, macos-latest (push) Has been cancelled
Build / Bazel, g++, ubuntu-latest (push) Has been cancelled
Build / CMake, cl, windows-latest (push) Has been cancelled
Build / CMake, gcc, ubuntu-latest (push) Has been cancelled
Build / CMake, llvm, ubuntu-latest (push) Has been cancelled
Build / CMake, llvm, macos-latest (push) Has been cancelled
Build / Test modules (llvm, ubuntu-latest) (push) Has been cancelled
Documentation / documentation (push) Has been cancelled
Some checks failed
Build / Bazel, cl, windows-latest (push) Has been cancelled
Build / Bazel, clang++, macos-latest (push) Has been cancelled
Build / Bazel, clang++, ubuntu-latest (push) Has been cancelled
Build / Bazel, g++, macos-latest (push) Has been cancelled
Build / Bazel, g++, ubuntu-latest (push) Has been cancelled
Build / CMake, cl, windows-latest (push) Has been cancelled
Build / CMake, gcc, ubuntu-latest (push) Has been cancelled
Build / CMake, llvm, ubuntu-latest (push) Has been cancelled
Build / CMake, llvm, macos-latest (push) Has been cancelled
Build / Test modules (llvm, ubuntu-latest) (push) Has been cancelled
Documentation / documentation (push) Has been cancelled
This commit is contained in:
@@ -151,8 +151,6 @@ def main():
|
|||||||
git_tags_result.stdout.splitlines(),
|
git_tags_result.stdout.splitlines(),
|
||||||
reverse=True
|
reverse=True
|
||||||
)
|
)
|
||||||
# For demonstration, limit the number of versions. Remove this in production.
|
|
||||||
version_names = version_names[:4]
|
|
||||||
print(f"Versions to build: {', '.join(version_names)}")
|
print(f"Versions to build: {', '.join(version_names)}")
|
||||||
|
|
||||||
# Pre-compute all version information and paths.
|
# Pre-compute all version information and paths.
|
||||||
@@ -205,7 +203,19 @@ def main():
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
print(f"Processing HTML files in: {version.dest_dir}")
|
print(f"Processing HTML files in: {version.dest_dir}")
|
||||||
for html_file in version.dest_dir.rglob("*.html"):
|
|
||||||
|
html_files = []
|
||||||
|
if version.is_main:
|
||||||
|
# For the main version, find all HTML files, but explicitly exclude the 'en' directory.
|
||||||
|
html_files.extend(version.dest_dir.glob("*.html"))
|
||||||
|
for subdir in version.dest_dir.iterdir():
|
||||||
|
if subdir.is_dir() and subdir.name != 'en':
|
||||||
|
html_files.extend(subdir.rglob("*.html"))
|
||||||
|
else:
|
||||||
|
# For other versions, their directory is self-contained.
|
||||||
|
html_files = list(version.dest_dir.rglob("*.html"))
|
||||||
|
|
||||||
|
for html_file in html_files:
|
||||||
js_script = get_version_switcher_js(version, versions, html_file)
|
js_script = get_version_switcher_js(version, versions, html_file)
|
||||||
script_tag = f'<script>{js_script}</script>'
|
script_tag = f'<script>{js_script}</script>'
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user