代码拉取完成,页面将自动刷新
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import sys, os
import datetime
sys.path.append(os.path.abspath('exts'))
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'K230'
copyright = f'{datetime.datetime.now().year} Canaan Inc'
author = 'Canaan'
# release = '0.1'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
'sphinx_copybutton',
'myst_parser',
'sphinx_multiversion',
'sphinxcontrib.mermaid'
]
html_js_files = [
'https://cdnjs.cloudflare.com/ajax/libs/mermaid/8.13.8/mermaid.min.js',
'init_mermaid.js',
]
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}
templates_path = ['_templates']
exclude_patterns = ['venv', 'exts', 'en', 'zh/template']
# html_sidebars = { '**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'] }
language = os.getenv('SPHINX_LANGUAGE', 'en')
# Set the title based on the language
if language == 'en':
html_title = 'K230 Docs'
else:
html_title = 'K230 文档'
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
myst_heading_anchors = 7
suppress_warnings = ["myst.header"]
html_copy_source = True
html_show_sourcelink = False
html_favicon = 'favicon.ico'
# html_show_sphinx = False
html_theme = "sphinx_book_theme"
# html_theme = 'alabaster'
html_static_path = ['_static']
default_dark_mode = True
locale_dirs = ['locale']
html_css_files = ['topbar.css', 'custom-theme.css']
html_theme_options = {
'collapse_navigation': True,
"repository_url": "https://github.com/kendryte/k230_docs",
'navigation_depth': 7,
"primary_sidebar_end": ["versionsFlex.html"],
"use_repository_button": True
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。