File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 14
14
15
15
import sys
16
16
import os
17
+ import jieba
17
18
18
19
#sys.path.insert(0, os.path.abspath('..'))
19
20
import sphinx_rtd_theme
64
65
'myst_parser'
65
66
]
66
67
68
+ myst_enable_extensions = [
69
+ "linkify" , # 自动转换 URL 为链接
70
+ # "replacements", # 支持文本替换
71
+ # "smartquotes", # 美化引号
72
+ # "strikethrough", # 支持删除线
73
+ # "substitution", # 支持替换变量
74
+ # "attrs_block", # 支持 Markdown 块级属性
75
+ ]
76
+
67
77
# Add any paths that contain templates here, relative to this directory.
68
78
templates_path = ['../_templates' ]
69
79
234
244
#html_search_language = 'en'
235
245
html_search_language = 'zh'
236
246
247
+ # def chinese_tokenizer(text):
248
+ # return list(jieba.cut(text))
249
+
250
+ html_search_options = {
251
+ 'search_language' : 'zh' , # 指定中文
252
+ 'search_mode' : 'full_text' , # 全文搜索
253
+ 'additional_keywords' : [
254
+ '区块链' ,
255
+ '智能合约' ,
256
+ '共识算法' ,
257
+ '分布式账本' ,
258
+ '密码学' ,
259
+ '非对称加密' ,
260
+ '联盟链'
261
+ ]
262
+ }
263
+
237
264
# A dictionary with options for the search language support, empty by default.
238
265
# Now only 'ja' uses this config value
239
266
#html_search_options = {'type': 'default'}
Original file line number Diff line number Diff line change @@ -13,4 +13,6 @@ git-lfs
13
13
Jinja2 < 3.1
14
14
myst-parser == 0.13.0
15
15
pyyaml
16
-
16
+ jieba
17
+ linkify-it-py
18
+ # markdown-it-py
You can’t perform that action at this time.
0 commit comments