From 765facc5d771e5e790d3fef7f7688c8ad0767bdd Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 28 Jan 2025 14:11:37 +0100 Subject: [PATCH] Fix Docs edit button links (#18932) Signed-off-by: Glenn Jocher --- docs/build_docs.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/build_docs.py b/docs/build_docs.py index d8b04835..021989d2 100644 --- a/docs/build_docs.py +++ b/docs/build_docs.py @@ -169,11 +169,12 @@ def update_docs_html(): # Update 404 titles update_page_title(SITE / "404.html", new_title="Ultralytics Docs - Not Found") - # Update edit links - update_subdir_edit_links( - subdir="hub/sdk/", # do not use leading slash - docs_url="https://github.com/ultralytics/hub-sdk/tree/main/docs/", - ) + # Update edit button links + for subdir, docs_url in ( + ("hub/sdk/", "https://github.com/ultralytics/hub-sdk/tree/main/docs/"), # do not use leading slash + ("compare/", "https://github.com/ultralytics/docs/tree/main/docs/en/compare/"), + ): + update_subdir_edit_links(subdir=subdir, docs_url=docs_url) # Convert plaintext links to HTML hyperlinks files_modified = 0