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 thesearch
plugin. MkDocs enables it by default if there is noplugins
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
Built Distribution
Hashes for mkdocs_thumbnails-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdb9476e69ef7aa7d4279cd968c36f47d055ccd8decbfd175bdb14ccdaa05101 |
|
MD5 | 8ace1b67659957370948b3df36b8accb |
|
BLAKE2b-256 | ead0895a1d966243c131d5051bd7851b78eed5087b2022d562c90ccc06dc6eba |