Skip to main content

No project description provided

Project description

MkDocs Video

This plugin allows you to embed videos on the documentation pages using a simple Markdown syntax.

Installation

Install the package with pip:

$ pip install ffc-mkdocs-video

Enable the plugin in the mkdocs.yml file:

plugins:
    - ffc-mkdocs-video

See how to use MkDocs Plugins

Usage

To add a video to the final documentation page, you need to use the Markdown syntax for images with a specific name (hereinafter marker).

See how to use Markdown syntax

Example:

content folder structure

├── content
|   ├── ...
│   ├── video.md
│   └── videos
│       └── costa_rica.mp4
└── mkdocs.yml

video.md

# Video example

Lorem ipsum dolor sit amet

![type:video](https://www.youtube.com/embed/LXb3EKWsInQ)

<mkdocs-url>/video

You can also use relative paths for videos stored together with your content

![type:video](./videos/costa_rica.mp4)

Configuration

Marker

By default, the string type:video is used as a marker in the Markdown syntax.

You can change this value by adding the following lines to your mkdocs.yml:

plugins:
  - mkdocs-video:
      mark: "custom-marker"

Now you can use this marker in the Markdown syntax:

![custom-marker](https://www.youtube.com/embed/LXb3EKWsInQ)

Style

By default, the following CSS styles are used for the <iframe> tag that is inserted into the final page:

position: relative;
width: 100%;
height: 22.172vw;

You can change the style by adding the following lines to your mkdocs.yml:

plugins:
  - mkdocs-video:
      css_style:
        weight: "100%"
        height: "22.172vw"
        ...

Contributing

  1. Fork it.
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

License

The MIT License (MIT)

Copyright (c) 2021 Mikalai Lisitsa

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

ffc-mkdocs-video-1.0.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

ffc_mkdocs_video-1.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file ffc-mkdocs-video-1.0.1.tar.gz.

File metadata

  • Download URL: ffc-mkdocs-video-1.0.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for ffc-mkdocs-video-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8672d1d2f64544e16839e26aef4dd95f07676655a9c9b8b5ff8aded78a13dbcd
MD5 4ae8f33482138817f78f6b7ef9b9245b
BLAKE2b-256 46eba45b36cd2cc6c680c022fd22d9d251ab921ce93272f6dfb72db490ec4456

See more details on using hashes here.

File details

Details for the file ffc_mkdocs_video-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ffc_mkdocs_video-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for ffc_mkdocs_video-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7d866c0df33448c9de865f35742c25d92f1ce07e6f3edd65531355b8ed66848
MD5 3e345584f8ccfe8c1298f16bcd9aadcb
BLAKE2b-256 9a4304fe51cac70d011c7422caaca573c77c1190f569434a5a98046411cd936e

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