跳转到主要内容

MkDocs的拼写检查插件。

项目描述

MkDocs SpellCheck

ci documentation pypi version gitpod gitter

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-GBen-US的修正

项目详情


下载文件

下载适合您平台的应用程序文件。如果您不确定选择哪一个,请了解更多关于安装包的信息。

源分布

mkdocs_spellcheck-1.1.0.tar.gz (10.6 kB 查看哈希值)

上传时间

构建分布

mkdocs_spellcheck-1.1.0-py3-none-any.whl (11.0 kB 查看哈希值)

上传时间 Python 3

由以下组织支持

AWSAWS云计算和安全赞助商DatadogDatadog监控FastlyFastlyCDNGoogleGoogle下载分析MicrosoftMicrosoftPSF赞助商PingdomPingdom监控SentrySentry错误日志StatusPageStatusPage状态页面