MkDocs的拼写检查插件。
项目描述
MkDocs SpellCheck
MkDocs的拼写检查插件。
此插件可以使用不同的后端来检查最终HTML页面中的单词拼写。这些后端包括
安装
要安装所有后端,请使用all
扩展。否则,请指定后端名称作为扩展。
pip install mkdocs-spellcheck[all]
pip install mkdocs-spellcheck[codespell]
pip install mkdocs-spellcheck[symspellpy]
pip install mkdocs-spellcheck[codespell,symspellpy]
用法
# mkdocs.yml
plugins:
- search
- spellcheck:
backends: # the backends you want to use
- symspellpy # as strings
- codespell: # or nested configs
dictionaries: [clear, rare]
# known_words can also be a list of words
known_words: known_words.txt
# ignore words in <code> tags
ignore_code: yes
# minimum length of words to consider
min_length: 2
# maximum number of capital letters in a word
max_capital: 1
# keep unicode characters
allow_unicode: no
# skip files entirely (supports Unix shell-style wildcards)
skip_files:
- credits.md
- coverage.md
- reference/*
# whether to only check in strict mode
strict_only: yes
默认情况下,使用symspellpy
后端。
codespell
内置词典有
clear
用于无歧义错误rare
用于罕见(但有效)的单词,这些单词可能是错误informal
用于使非正式词汇更加正式usage
用于用推荐术语替换措辞code
用于来自代码和/或数学的单词,这些单词在其他上下文中可能是误拼(如uint
)names
用于可能误拼的有效专有名词en-GB_to_en-US
用于从en-GB
到en-US
的修正
项目详情
下载文件
下载适合您平台的应用程序文件。如果您不确定选择哪一个,请了解更多关于安装包的信息。
源分布
mkdocs_spellcheck-1.1.0.tar.gz (10.6 kB 查看哈希值)