- 替换支持中文的lunr.min.js文件
- 下载 https://github.com/codepiano/lunr.js/blob/37680a339bfec3785e507bb3c07e362cae66ac26/lunr.min.js
- 复制到 /usr/local/Cellar/mkdocs/0.16.1_1/libexec/lib/python2.7/site-packages/mkdocs/assets/search/mkdocs/js/
- 修改生成索引文件的函数
- 找到文件 /usr/local/Cellar/mkdocs/0.16.1_1/libexec/lib/python2.7/site-packages/mkdocs/search.py
- 修改函数generate_search_index,在json.dumps中添加一个参数:ensure_ascii=False
def generate_search_index(self):
"""python to json conversion"""
page_dicts = {