import os
import sys
sys.path.append(os.path.abspath('.'))
project = 'MindStudio Insight'
copyright = '2025, Huawei Technologies Co.,Ltd'
author = 'MindStudio Insight Team'
html_context = {
'gitcode_url': 'https://gitcode.com/Ascend/msinsight',
}
html_theme = 'sphinx_rtd_theme'
html_theme_options = {
'collapse_navigation': True,
'navigation_depth': 2,
'sticky_navigation': True,
'includehidden': True,
}
language = 'zh_CN'
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'myst_parser',
'sphinx.ext.todo',
'sphinx.ext.intersphinx',
'sphinx.ext.imgconverter',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
]
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}
source_encoding = 'utf-8'
version = '1.0'
release = '1.0'
myst_enable_extensions = [
'linkify',
'html_image',
'smartquotes',
'dollarmath',
'html_admonition',
'replacements',
]
myst_mermaid_output_format = 'svg'
suppress_warnings = [
'myst.xref_missing',
'myst.header',
'misc.highlighting_failure',
]
default_role = 'any'
myst_all_links_external = False
myst_highlight_code_blocks = True
myst_heading_anchors = 3
myst_footnote_transition = True
myst_dmath_double_inline = True
html_static_path = ['_static']
templates_path = ['_templates']
exclude_patterns = [
'zh/design_documents/*',
]
html_sidebars = {
'**': [
'localtoc.html',
'relations.html',
'searchbox.html',
]
}
def setup(app):
app.config._raw_config['html_file_suffix'] = '.html'
app.add_css_file('custom.css')
app.add_js_file('https://cdn.jsdelivr.net/npm/mermaid@10.4.0/dist/mermaid.min.js')
app.add_js_file('mermaid_init.js')
app.add_js_file('repo_links.js')
app.add_js_file('right_toc.js')
app.add_js_file('table_add_class_name.js')