Skip to main content

A spell checker plugin for MkDocs.

Project description

MkDocs SpellCheck

[!WARNING] This project is in maintenance mode. I'm now dedicating my time to Zensical. Feel free to reach out for a responsible transfer of maintainership.

ci documentation pypi version gitter

A spell checker plugin for MkDocs.

This plugin can use different backends to check the spelling of words in your final HTML pages. These backends are:

Installation

To install all backends, use the all extra. Otherwise specify the name(s) of the backend(s) as extra.

pip install 'mkdocs-spellcheck[all]'
pip install 'mkdocs-spellcheck[codespell]'
pip install 'mkdocs-spellcheck[symspellpy]'
pip install 'mkdocs-spellcheck[codespell,symspellpy]'

Usage

# 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

By default, the symspellpy backend is used.

Once your configuration is ready, just run mkdocs build -s to check the spelling inside your pages.

codespell

The builtin dictionaries are:

  • clear for unambiguous errors
  • rare for rare (but valid) words that are likely to be errors
  • informal for making informal words more formal
  • usage for replacing phrasing with recommended terms
  • code for words from code and/or mathematics that are likely to be typos in other contexts (such as uint)
  • names for valid proper names that might be typos
  • en-GB_to_en-US for corrections from en-GB to en-US

On-off regions

In some situations it can be useful to temporarily disable spell checking for a document. To this end, MkDocs SpellCheck recognizes special guards mkdocs-spellcheck-{on,off}:

Here MkDocs SpellCheck checks for correct spelling.

<!-- mkdocs-spellcheck-off -->
In this block it doesn't.
<!-- mkdocs-spellcheck-on -->

Here spelling checks are performed again.

Sponsors

Silver sponsors

FastAPI

Bronze sponsors

Nixtla


ofek samuelcolvin tlambert03 ssbarnea femtomc cmarqu kolenaIO ramnes machow BenHammersley trevorWieland MarcoGorelli analog-cbarber OdinManiac rstudio-sponsorship schlich butterlyn livingbio NemetschekAllplan EricJayHartman 15r10nk activeloopai roboflow cmclaughlin blaisep RapidataAI rodolphebarbanneau theSymbolSyndicate blakeNaccarato ChargeStorm Alphadelta14 Cusp-AI

And 7 more private sponsor(s).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs_spellcheck-1.2.1.tar.gz (38.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_spellcheck-1.2.1-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_spellcheck-1.2.1.tar.gz.

File metadata

  • Download URL: mkdocs_spellcheck-1.2.1.tar.gz
  • Upload date:
  • Size: 38.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for mkdocs_spellcheck-1.2.1.tar.gz
Algorithm Hash digest
SHA256 4e17cd4beb0fe96f067441b0b5ab8964b2718ad6b29cefbc22e5903456589651
MD5 f104180ac4840fbb896d7230c706e3f5
BLAKE2b-256 6558b5d1d5f8b425df333df920e45050f7f6aa5f20a71067c1e1534d3764f3c0

See more details on using hashes here.

File details

Details for the file mkdocs_spellcheck-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_spellcheck-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97a4f7b54b49578f050dfd330d21eab87255b5c111b3264918643eab82461cb0
MD5 0811fc44f80ae7b29d75e2b11f867bf8
BLAKE2b-256 a80099fef135671e55e1d0c1e7d3beb057a3d15b9bcf6d1113895a171c79fc09

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page