Skip to main content

An MkDocs plugin. Generates thumbnails of PDF files and YouTube links.

Project description

mkdocs-thumbnails

MkDocs plugin to generate thumbnails automatically.

Provides a mechanism to indicate, in Markdown, the desire for PDF files and YouTube links to have a thumbnail image, automatically generated/downloaded.

Setup

Install the plugin using pip:

pip install mkdocs-thumbnails

Activate the plugin in mkdocs.yml. Include the attr_list extension as shown here:

plugins:
  - search
  - thumbnails:
      # optional styling for the thumbnail:
      style: margin-top:5px;margin-bottom:5px;margin-right:25px  

markdown_extensions:
    - markdown.extensions.attr_list 

Note: The extension If you have no plugins entry in your config file yet, you'll likely also want to add the search plugin. MkDocs enables it by default if there is no plugins entry set, but now you have to enable it explicitly.

More information about plugins in the MkDocs documentation.

Config

  • style - This is the CSS style to be set in the thumbnail's image tag

Usage

In the attribute list of a link, add .pdf or .youtube to turn on the thumbnail for that link.

# Some example markdown text

* [My PDF file](foo.pdf){.pdf}
* [A YouTube video link](https://youtu.be/dQw4w9WgXcQ){.youtube}

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-thumbnails-0.0.4.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_thumbnails-0.0.4-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs-thumbnails-0.0.4.tar.gz.

File metadata

  • Download URL: mkdocs-thumbnails-0.0.4.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for mkdocs-thumbnails-0.0.4.tar.gz
Algorithm Hash digest
SHA256 476aab227b37de373fb6c9c8a8d80c3a9fb3b8315c3cbda15b4a95ed08d76c1b
MD5 d315ab9bdf62f4e4d1cb0ef7625d7ea9
BLAKE2b-256 cd88b6f64f431839925f3a3bff329a161aaf78761b0d8f2a70a7721fabe9cd9f

See more details on using hashes here.

File details

Details for the file mkdocs_thumbnails-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_thumbnails-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for mkdocs_thumbnails-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cdb9476e69ef7aa7d4279cd968c36f47d055ccd8decbfd175bdb14ccdaa05101
MD5 8ace1b67659957370948b3df36b8accb
BLAKE2b-256 ead0895a1d966243c131d5051bd7851b78eed5087b2022d562c90ccc06dc6eba

See more details on using hashes here.

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