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
}