Skip to main content

Extension for python-markdown that adds markdown syntax for !![image.jpg] for fancybox tag.

Project description

Fancybox markdown extension

This markdown extension creates fancybox images.

Markdown

!![Title](image.png "Description")

HTML

<figure>
  <a data-caption="Description" data-fancybox="gallery" href="image.png">
    <img alt="Title" src="image.png" title="Title" width="600px" />
  </a>
  <figcaption>
    Description
  </figcaption>
</figure>

Using it with mkdocs

Enable it in mkdocs.yml

markdown_extensions:
  - fancyboxmd

Enable fancybox in mkdocs.yml

# Css
extra_css:
  - https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css

# Extra javascript
extra_javascript:
  - https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js
  - https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js

Configuration

It supports one configuration option preview_width which defaults to 600px.

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

fancyboxmd-1.1.0.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

fancyboxmd-1.1.0-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page