Skip to content

Add Caption to images

Project Metadata⚓︎
  • Caption Readme
    Go to

    Overview of the plugin and basic usage.

  • Caption Config
    Go to

    Detailed configuration options and defaults.

  • Caption Custom
    Go to

    How to apply custom CSS and styles.

  • Caption Image
    Go to

    Settings for image-specific captions.

  • Caption Quick-Start
    Go to

    Get up and running in under 5 minutes.

  • Caption References
    Go to

    Technical API and cross-reference details.

  • Caption Table
    Go to

    Formatting and options for table captions.

  • MaterialX Start Page
    Return to

    Back to the project's main landing page.

  • MkDocs-Material
    Return to

    Back to the root documentation.

Enhance

  • Enhance your MkDocs documentation with easy figure, table captioning and numbering.

  • But it does not stop there. You can also add captioning and numbering to literally any element you want.

  • And the best part you do not even need to add additional CSS or JavaScript to your site, just enable the plugin and you are good to go.

Features⚓︎

Features

  • Easy to use table and figure caption declaration directly in Markdown
  • Automatic numbering of tables and figures
  • Dynamic link text generation for references
  • Highly configurable
  • Extendable to support captions for all element types
  • Cross page referencing
Installation⚓︎

Installation

uv pip install mkdocs-caption
Credits⚓︎

Credits

  • This is an open source project. It lives from your contributions, be it in form of bug reports, feature requests, discussions, or fixes and other code changes. I am happy to see other people contributing ideas or even building on top of it. If you encounter any issues or have ideas for improvements, feel free to open an issue or a pull request.

  • Of course, I am not the only one who has thought about adding captions to MkDocs. There are numerous other projects or workarounds that try to solve the same problem. What makes this project unique is that it is able to handle captions for images, tables and even custom elements. Also, it is a native MkDocs plugin, which enable it to detect the caption elements more reliably and to integrate well with other plugins.

Alternatives

If you are looking for an alternative, you might want to check out the following projects:

If you know other plugins or projects that should be listed here, feel free to open an issue or a pull request.

Advanced Configuration⚓︎

  • Material for MkDocs comes with many configuration options.

  • The setup section explains in great detail how to configure and customize colors, fonts, icons and much more:

  • Changing the Colors
    View Guide

    Customise primary and accent colors to match your brand identity.

  • Changing the Fonts
    View Guide

    Configure Google Fonts or custom web fonts for typography.

  • Changing the Language
    View Guide

    Localize your site interface and search into 50+ languages.

  • Changing the Logo
    View Guide

    Set a custom logo and choose from thousands of integrated icons.

  • Data Privacy
    View Guide

    Enable GDPR-compliant features and cookie consent management.

  • Site Navigation
    View Guide

    Define your site structure, tabs, and table of contents behavior.

  • Site Search
    View Guide

    Configure the built-in search engine with highlighting and indexing.

  • Site Analytics
    View Guide

    Integrate Google Analytics or other privacy-focused tracking tools.

  • The Header
    View Guide

    Customize the sticky header, search bar, and repository links.

  • The Footer
    View Guide

    Manage "Previous/Next" buttons and the copyright notice area.

  • Social Cards
    View Guide

    Generate automatic preview images for Twitter and LinkedIn shares.

  • Setting up a Blog
    View Guide

    Transform your documentation into a fully-featured technical blog.

  • Setting up Tags
    View Guide

    Organize content with categories and tags for easier discovery.

  • Versioning
    View Guide

    Host multiple versions of your documentation simultaneously.

  • Git Repository
    View Guide

    Link your source code to enable "Edit this page" functionality.

  • Comment System
    View Guide

    Integrate Giscus or Disqus to build community engagement.

  • Optimization
    View Guide

    Minify CSS/JS and optimize images for lightning-fast loading.

  • Offline Usage
    View Guide

    Package your documentation for use without an internet connection.

Supported Markdown Extensions

Furthermore, see the list of supported Markdown extensions that are natively integrated with Material for MkDocs.