Skip to main content

mkdocs-search-izsam

This MkDocs plugin enhances the native search functionality by:

  • Enabling local search without CORS issues
  • Indexing YAML metadata from Markdown files for improved search capabilities

Local Search Functionality

The plugin generates two JavaScript files—one for config and one for docs—which can be included in your theme as follows:

<script src="{{ 'search/search_config.js'|url }}"></script>
<script src="{{ 'search/search_docs.js'|url }}"></script>

This approach eliminates CORS issues typically encountered with loadJSON and the native worker.js model.

Important

To leverage these JavaScript files and bypass the native search worker, set the search_index_only option to true in your theme configuration:

theme:
  name: null
  custom_dir: your_custom_theme
  include_search_page: true
  search_index_only: true

Search Metadata YAML Support

The plugin indexes YAML metadata defined in your Markdown files, making these fields searchable. To exclude specific metadata keys from the search index, add an exclude_meta_keys entry to your file's metadata, listing the keys to ignore. For example:

exclude_meta_keys:
  - sections.type
  - sections.data.link

Setup

Install the plugin using pip:

pip install mkdocs-izsam-search

Activate the plugin in mkdocs.yml:

plugins:
  - izsam-search

It is possible to use same config options of the native search plugin:

- izsam-search:
        lang: en

You can then implement search using your preferred JavaScript library (for example, lunr.js). For more details, see the MkDocs documentation on search and themes.

See Also

Change log

[0.1.9] - 2025-09-08

Added metadata YAML searchability

  • Implemented functionality to index and search metadata defined in markdown YAML front matter
  • Documented usage and configuration in README.md

[0.1.8] - 2021-11-10

Implementation of the main feature: build .js files to allow local search and avoid CORS problems

  • Added necessary code in plugin.py
  • Added instruction on README.md

[0.1.7] - 2021-11-10

Configuration error

  • Configuration error: mkdocs_izsam_search.search_index.SearchIndex must be a subclass of mkdocs.plugins.BasePlugin. Changed search_index.py

[0.1.6] - 2021-11-10

Configuration error

  • Configuration error: mkdocs_izsam_search.search_index.SearchIndex must be a subclass of mkdocs.plugins.BasePlugin. Changed entry_points in setup.py

[0.1.5] - 2021-11-10

Setup

  • different syntax for setup()

[0.1.4] - 2021-11-10

Setup

  • entry_points declaration in setup()

[0.1.3] - 2021-11-10

Debug on MANIFEST.in

  • Modified MANIFEST.in there was an error causing import data issues

[0.1.2] - 2021-11-10

Edited

  • README.md

[0.0.1] - 2021-11-10

Added

  • HISTORY.md

Metadata

Release files for mkdocs-izsam-search 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkdocs-izsam-search 0.1.9
File Size Uploaded Provenance Actions
mkdocs_izsam_search-0.1.9.tar.gz 92.1 kB Without provenance Details for mkdocs_izsam_search-0.1.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-izsam-search 0.1.9
File Interpreter ABI Platform Actions
mkdocs_izsam_search-0.1.9-py3-none-any.whl Python 3 none any Details for mkdocs_izsam_search-0.1.9-py3-none-any.whl

Total release size: 214.5 kB

Release files / mkdocs_izsam_search-0.1.9.tar.gz

Download URL mkdocs_izsam_search-0.1.9.tar.gz
Size 92.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8e8a069e3efda47146578020c71aab356317ab45c053924d515de5e4030fc15c
BLAKE2b-256 checksum
How to use checksums
7467792115bc49a24f0f3f87fc6e0761412fa3144b915ba14bea38067ca2c832
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.6

Release files / mkdocs_izsam_search-0.1.9-py3-none-any.whl

Download URL mkdocs_izsam_search-0.1.9-py3-none-any.whl
Size 122.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98778ec05dc4892997ccf23ae22259bd4ce582a9ea4c8d3a85f45a5afa26fdff
BLAKE2b-256 checksum
How to use checksums
697b9d4a91278f3f744719b1f508fafe91fa7282f33a830e75953febe39cfd3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.6

Security for mkdocs-izsam-search 0.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page