Skip to main content

MkDocs plugin providing media galleries with shortcodes

Project description

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

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_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

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