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
This commit is contained in:
Sam Wu
2023-12-07 09:39:45 -07:00
committed by GitHub
parent 412366ff61
commit 00f7899b03
3 changed files with 20 additions and 16 deletions

View File

@@ -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
}

View File

@@ -1 +1 @@
rocm-docs-core==0.30.0
rocm-docs-core==0.30.1

View File

@@ -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