Skip to main content

MkDocs plugin that generates a product catalog page from YAML files

Project description

mkdocs-product-catalog

An MkDocs plugin that renders a product catalog on any page from a directory of YAML files. Each product appears as a clickable button with an icon (or acronym fallback). Clicking a button opens a lightbox modal with all product details.

Installation

pip install mkdocs-product-catalog

Usage

Add the plugin to mkdocs.yml:

plugins:
  - search
  - product-catalog

Then place this tag anywhere in a markdown file to embed a catalog:

<!-- product-catalog: dirname -->

dirname is the path to a directory of YAML files, relative to your docs/ folder.

Navbar integration

The plugin automatically adds each product to the MkDocs navigation as a link. Clicking a nav entry opens the product's modal directly via a #modal-{id} hash. This is why placing each catalog on its own dedicated page is recommended — the navbar integration works best when each catalog has a single source page.

Hash-based deep linking

Products can be linked to directly via #modal-{id} in the URL. For example:

  • https://yoursite.com/catalog-page#modal-product-name-0
  • This allows direct linking to specific products in documentation

One catalog per page recommendation

Important: Each catalog tag should be on a separate page because:

  1. Navigation Integration: The navbar feature requires one catalog per page to correctly associate products with their source page
  2. User Experience: Users expect each catalog to have its own dedicated page
  3. Maintenance: Separate pages make it easier to manage and update catalogs independently

Recommended approach: Create separate pages for each catalog:

# Platform Tools (platform_tools.md)

<!-- product-catalog: catalog/platform -->
# Data Tools (data_tools.md)

<!-- product-catalog: catalog/data -->

Product YAML format

Each .yaml or .yml file in the directory represents one product:

title: My Product                                  # required
description: A short description of the product.  # optional
icon: images/my_icon.png                           # optional
url: https://myproduct.example.com                 # optional
documentation:                                    # optional - array format
  - url: https://docs.example.com/myproduct       # URL required
    title: Official Documentation                   # optional title override
    description: Comprehensive guide to the product # optional description
  - url: https://guide.example.com/user-guide       # Multiple links supported
    title: User Guide                                # Custom display title
    description: Step-by-step tutorials               # Additional context
repository:                                      # optional - array format
  - url: https://github.com/example/myproduct      # URL required
    title: Main Repository                          # optional title override
    description: Official source code repository     # optional description
  - url: https://github.com/example/plugins         # Multiple repos supported
    title: Plugins Repository                       # Custom display title
    description: Official and community plugins      # Additional context
owners:                                            # optional
  - Alice
  - Bob
metadata:                                          # optional — arbitrary key/value pairs
  team: platform
  sla: 99.9%
  dashboard: https://grafana.example.com/d/overview

Products are rendered in alphabetical order by filename.

Icon

The icon value is used as the src of an <img> tag — use a path relative to the page the tag appears on, or an absolute URL. If omitted, an acronym (up to 3 initials) is shown in a colored circle instead.

Documentation and Repository

Both documentation and repository fields support array format for multiple links:

documentation:
  - url: https://docs.example.com          # Required: URL
    title: Official Documentation           # Optional: Custom display title
    description: Comprehensive API reference # Optional: Additional context
  - url: https://guides.example.com
    title: Getting Started Guide
    description: Beginner tutorials

Each array item creates a separate link in the modal with optional title and description.

Backward Compatibility: The old single-string format is still supported:

documentation: https://docs.example.com/myproduct
repository: https://github.com/example/myproduct

Existing YAML files using the single-string format will continue to work without modification.

Metadata

Any metadata value that contains a URL (http://, https://) is automatically rendered as a clickable link.

Search

Product titles, descriptions, and owner names are included in a hidden element on the page so MkDocs search can index them. Searching for a product title will surface the page it appears on.

How it works

  • The plugin scans all .yaml and .yml files in the specified directory.
  • It renders a responsive button grid; each button shows the product icon or acronym and title.
  • Clicking a button opens a modal with the product's description, URL, documentation, repository, owners, and metadata.
  • The modal closes with the × button, by clicking the backdrop, or pressing Escape.
  • Styles use MkDocs CSS custom properties and adapt to light and dark themes.

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_product_catalog-2.0.0.tar.gz (13.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_product_catalog-2.0.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_product_catalog-2.0.0.tar.gz.

File metadata

  • Download URL: mkdocs_product_catalog-2.0.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mkdocs_product_catalog-2.0.0.tar.gz
Algorithm Hash digest
SHA256 c14fb8b0b5a5c4bda564dbbb0fef9d437ae454b1c2bc3ff3edd5b010aa50eed5
MD5 e725a4dfde751b6c08371fa1d51c6295
BLAKE2b-256 79d464bbdfc870ce55ee49c43cc663372af2be0d7803d1e9c54a81b0946fae55

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_product_catalog-2.0.0.tar.gz:

Publisher: pypi.yml on luukkemp/mkdocs_product_catalog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mkdocs_product_catalog-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_product_catalog-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a1cfdfdafae9244f951a31cb1791e6845c07a5c80e731cace4744cdc027fad4
MD5 27e990b4cddbfa49c54f63c35d0d511d
BLAKE2b-256 46984871dbde6d244979552bb928559f1f12787970820ae8b78033c97939568f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_product_catalog-2.0.0-py3-none-any.whl:

Publisher: pypi.yml on luukkemp/mkdocs_product_catalog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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