Skip to main content

MKDOCS Media Galleries

MkDocs plugin for that adds image and YouTube galleries with shortcodes.

Install

pip install mkdocs-media-gallery-plugin

Configure (mkdocs.yml)

plugins:
  - search
  - media-gallery:
      images_path: images            # relative to docs_dir
      youtube_links_path: youtube-links.yaml  # relative to docs_dir
      generate_category_pages: true  # auto-generate one page per category

Shortcodes in Markdown

  • {{ gallery_preview }}: Shows preview tiles for each category (folder under images_path)
  • {{ gallery_full category="cats" }}: Shows full gallery for the given category
  • {{ youtube_gallery }}: Renders YouTube gallery from YAML (optionally category="...")

YouTube data (docs/youtube-links.yaml)

# Either flat list
- https://www.youtube.com/watch?v=ZucM9aw6Qlo
- sHfe3nT5-jk

# Or categorized
Music:
- https://www.youtube.com/watch?v=mEK0owuRoks
Shows:
- https://www.youtube.com/watch?v=ZucM9aw6Qlo

Download files

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

Source Distribution

mkdocs_media_gallery_plugin-1.0.0.tar.gz (10.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_media_gallery_plugin-1.0.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

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