From ff3c54b579425911383e6068d12f538d1a50aeba Mon Sep 17 00:00:00 2001 From: HaoXuan40404 <444649358@qq.com> Date: Thu, 21 Nov 2024 10:51:24 +0800 Subject: [PATCH] fix chinese words search --- 3.x/zh_CN/conf.py | 12 +++++++++++- requirements.txt | 5 ++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/3.x/zh_CN/conf.py b/3.x/zh_CN/conf.py index d8020d241..7e1169fea 100644 --- a/3.x/zh_CN/conf.py +++ b/3.x/zh_CN/conf.py @@ -61,7 +61,17 @@ 'sphinxcontrib.mermaid', 'sphinx.ext.mathjax', 'sphinx_markdown_tables', - 'myst_parser' + 'myst_parser', + 'sphinx_search.ext' +] + +myst_enable_extensions = [ + "linkify", # 自动转换 URL 为链接 + # "replacements", # 支持文本替换 + # "smartquotes", # 美化引号 + # "strikethrough", # 支持删除线 + # "substitution", # 支持替换变量 + # "attrs_block", # 支持 Markdown 块级属性 ] # Add any paths that contain templates here, relative to this directory. diff --git a/requirements.txt b/requirements.txt index 367c31524..84f19ebc3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,4 +13,7 @@ git-lfs Jinja2<3.1 myst-parser == 0.13.0 pyyaml - +jieba +linkify-it-py +sphinx-search-zh +# markdown-it-py \ No newline at end of file