-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathconf.py
More file actions
52 lines (44 loc) · 1.63 KB
/
Copy pathconf.py
File metadata and controls
52 lines (44 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import re
from pathlib import Path
def _get_version():
init = Path(__file__).parent.parent / "primus" / "__init__.py"
match = re.search(r'^__version__\s*=\s*["\']([^"\']+)["\']', init.read_text(), re.MULTILINE)
if not match:
raise ValueError("Could not find __version__ in primus/__init__.py")
return match.group(1)
# Project info
version = _get_version()
release = version
project = f"AMD Primus {version}"
author = "Advanced Micro Devices, Inc."
copyright = "Copyright (c) %Y Advanced Micro Devices, Inc. All rights reserved."
# Theme-related configs
html_theme = "rocm_docs_theme"
html_theme_options = {
"flavor": "ai-ecosystem",
"link_main_doc": True,
"repository_url": "https://github.com/AMD-AGI/Primus",
"use_repository_button": True,
"use_issues_button": True,
"use_download_button": True,
}
html_title = project
# Sphinx extension-related configs
extensions = [
"rocm_docs",
"sphinxcontrib.mermaid",
]
external_toc_path = "./sphinx/_toc.yml"
external_projects_current_project = "primus"
myst_fence_as_directive = ["mermaid"]
myst_heading_anchors = 3
# Publish the llms.txt index at the docs site root and let
# rocm-docs-core generate llms-full.txt after each build (the llms.txt standard,
# https://llmstxt.org/). See the rocm-docs-core guide:
# https://rocm.docs.amd.com/projects/rocm-docs-core/en/latest/user_guide/llms.html
rocm_docs_generate_llms = True