docs: polish doc styling and add copy buttons

This commit is contained in:
ob-yalian
2026-03-26 14:42:28 +08:00
parent b332fae572
commit d7463e4aef
5 changed files with 609 additions and 6 deletions
+5
View File
@@ -54,6 +54,7 @@ master_doc = 'index'
# ones.
extensions = ['recommonmark',
'sphinx_markdown_tables',
'sphinx_copybutton',
'sphinx.ext.autosectionlabel',
'language_switch',
# 'myst_parser',
@@ -183,6 +184,10 @@ html_last_updated_fmt = "%Y-%m-%d %H:%M:%S"
# 是否显示页面下方的由sphinx创建, 默认为True
html_show_sphinx = False
copybutton_exclude = '.linenos, .gp, .go'
copybutton_prompt_text = r'>>> |\.\.\. |\$ |# '
copybutton_prompt_is_regexp = True
# Function to copy video files to output directory
def setup(app):
app.connect('build-finished', copy_videos)