From 00f7899b0302dfb99e6b167501b1110b1d0eb4e6 Mon Sep 17 00:00:00 2001 From: Sam Wu Date: Thu, 7 Dec 2023 09:39:45 -0700 Subject: [PATCH] docs(conf.py): Use rocm-docs-core as extension (#2695) * docs(conf.py): Use rocm-docs-core as extension instead of calling and instantiating as object (legacy method) Also apply the rocm-docs-home theme flavor * build: Update rocm-docs-core to 0.30.1 --- docs/conf.py | 18 ++++++++---------- docs/sphinx/requirements.in | 2 +- docs/sphinx/requirements.txt | 16 +++++++++++----- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 319349c2a..2e2b9536e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -8,15 +8,11 @@ import shutil import jinja2 import os -from rocm_docs import ROCmDocs - -# Environement to process Jinja templates. +# Environment to process Jinja templates. jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader(".")) # Jinja templates to render out. -templates = [ - -] +templates = [] # Render templates and output files without the last extension. # For example: 'install.md.jinja' becomes 'install.md'. @@ -95,13 +91,15 @@ exclude_patterns = ['temp'] external_toc_path = "./sphinx/_toc.yml" -docs_core = ROCmDocs("ROCm Documentation") -docs_core.setup() +extensions = ["rocm_docs"] external_projects_current_project = "rocm" -for sphinx_var in ROCmDocs.SPHINX_VARS: - globals()[sphinx_var] = getattr(docs_core, sphinx_var) +html_theme = "rocm_docs_theme" +html_theme_options = {"flavor": "rocm-docs-home"} + +html_title = "ROCm Documentation" + html_theme_options = { "link_main_doc": False } diff --git a/docs/sphinx/requirements.in b/docs/sphinx/requirements.in index 500348c56..ee7a8d0d9 100644 --- a/docs/sphinx/requirements.in +++ b/docs/sphinx/requirements.in @@ -1 +1 @@ -rocm-docs-core==0.30.0 +rocm-docs-core==0.30.1 diff --git a/docs/sphinx/requirements.txt b/docs/sphinx/requirements.txt index 12640e25d..38fda65bf 100644 --- a/docs/sphinx/requirements.txt +++ b/docs/sphinx/requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.10 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # pip-compile requirements.in @@ -46,6 +46,10 @@ idna==3.4 # via requests imagesize==1.4.1 # via sphinx +importlib-metadata==7.0.0 + # via sphinx +importlib-resources==6.1.1 + # via rocm-docs-core jinja2==3.1.2 # via # myst-parser @@ -80,9 +84,7 @@ pygments==2.15.0 # pydata-sphinx-theme # sphinx pyjwt[crypto]==2.6.0 - # via - # pygithub - # pyjwt + # via pygithub pynacl==1.5.0 # via pygithub pytz==2022.7.1 @@ -96,7 +98,7 @@ requests==2.31.0 # via # pygithub # sphinx -rocm-docs-core==0.30.0 +rocm-docs-core==0.30.1 # via -r requirements.in smmap==5.0.0 # via gitdb @@ -143,3 +145,7 @@ urllib3==1.26.13 # via requests wrapt==1.14.1 # via deprecated +zipp==3.17.0 + # via + # importlib-metadata + # importlib-resources