From 56f93e72deb317d4b00eaa13220d63d728b03007 Mon Sep 17 00:00:00 2001 From: peterjunpark Date: Fri, 24 Oct 2025 11:04:12 -0400 Subject: [PATCH] [docs/7.9.0] Use "generic" rocm-docs-core theme (#5568) * use "generic" rocm-docs-core theme to tweak header * restore "nav_secondary_items" --- docs/conf.py | 14 +++++++++++--- docs/sphinx/static/version-history-link.js | 16 ---------------- 2 files changed, 11 insertions(+), 19 deletions(-) delete mode 100644 docs/sphinx/static/version-history-link.js diff --git a/docs/conf.py b/docs/conf.py index 0a9ac16d2..2515799c6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -122,7 +122,6 @@ external_toc_path = "./sphinx/_toc.yml" # Register Sphinx extensions and static assets sys.path.append(str(DOCS_DIR / "extension")) -html_static_path = ["sphinx/static"] # "sphinx/static/css", "extension/how-to/rocm-for-ai/inference"] # html_css_files = [ # "rocm_custom.css", @@ -130,7 +129,6 @@ html_static_path = ["sphinx/static"] # "dynamic_picker.css", # "vllm-benchmark.css", # ] -html_js_files = ["version-history-link.js"] templates_path = ["extension/rocm_docs_custom/templates", "extension/templates"] extensions = [ @@ -152,7 +150,17 @@ extensions = [ external_projects_current_project = "rocm" html_theme = "rocm_docs_theme" html_theme_options = { - "flavor": "rocm-docs-home", + "flavor": "generic", + "header_title": "ROCmâ„¢ 7.9.0 Preview", + "header_link": "https://rocm.docs.amd.com/en/7.9.0-preview/index.html", + "version_list_link": "https://rocm.docs.amd.com/en/7.9.0-preview/release/versions.html", + "nav_secondary_items": { + "GitHub": "https://github.com/ROCm/ROCm", + "Community": "https://github.com/ROCm/ROCm/discussions", + "Blogs": "https://rocm.blogs.amd.com/", + "Instinctâ„¢ Docs": "https://instinct.docs.amd.com/", + "Support": "https://github.com/ROCm/ROCm/issues/new/choose", + }, "link_main_doc": False, "secondary_sidebar_items": { "**": ["page-toc"], diff --git a/docs/sphinx/static/version-history-link.js b/docs/sphinx/static/version-history-link.js deleted file mode 100644 index 45260e608..000000000 --- a/docs/sphinx/static/version-history-link.js +++ /dev/null @@ -1,16 +0,0 @@ -function ready(callback) { - if (document.readyState !== "loading") { - callback(); - return; - } - document.addEventListener("DOMContentLoaded", callback); -} - -ready(() => { - const versionListLink = document.querySelector( - "a.header-all-versions[href='https://rocm.docs.amd.com/en/latest/release/versions.html']", - ); - versionListLink.textContent = "Preview versions"; - versionListLink.href = - "https://rocm.docs.amd.com/en/docs-7.9.0/release/versions.html"; -});