Giter Club home page Giter Club logo

mkdocs-featherlight's Introduction

DEAD

This project does not work with current mkdocs / markdown versions and has no active development anymore. Please take a look at https://github.com/Blueswen/mkdocs-glightbox which is a good replacement.


Featherlight Plugin for MkDocs

Lightbox preview

Simple lightbox plugin for MkDocs. This plugin use the jQuery plugin featherlight and is mostly based on the work of https://github.com/mementum/lightgallery-markdown

Markdown usage

This plugin simply converts all images into lightboxes

![Alt title](image.jpg)

Setup

pip3 install -e git+https://github.com/it-novum/mkdocs-featherlight.git

Alternative setup

git clone https://github.com/it-novum/mkdocs-featherlight.git
cd mkdocs-featherlight/
python3 setup.py install

Usage with MkDocs

extra_javascript:
  - vendor/jquery-3.6.0.min.js
  - vendor/featherlight-v.1.7.14/release/featherlight.min.js

extra_css:
  - vendor/featherlight-v.1.7.14/release/featherlight.min.css

markdown_extensions:
    - featherlight

Javascript dependencies

You have to download the latest versions of jQuery and featherlight manually or via a package manager like npm or yarn

Make sure to set the right paths in mkdocs.yml

Support for Light and Dark theme

In case you are using Material for MkDocs you can add support for light and dark mode by adding the following CSS to your extra_css files in mkdocs.yml

[data-md-color-scheme="slate"] .featherlight .featherlight-content {
    background: #2e303e;
}

[data-md-color-scheme="slate"] .featherlight .featherlight-close-icon {
    background: rgba(255,255,255,.3);
    color: #fff;
}

License

MIT License

Copyright (c) 2021 it-novum GmbH

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.

mkdocs-featherlight's People

Contributors

nook24 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mkdocs-featherlight's Issues

PyPI repository

Could you please register this package into the PyPI repository.

Thank you.

Automatic vendor library download

Hi, thanks for the plugin ๐Ÿ‘

It would be nice not to have to handle the libraries download ourselves, I found the way that the mkdocs-mermaid2-plugin does it simple and cool.

Maybe you could inspire yourself from them and do something automagic for your plugin!

Just an idea to improve, feel free to close if you feel it's useless.

Cheers

Installation Problem / Error: Failed loading extension "featherlight"

Hello,

I had issues installing mkdocs-featherlight on both Ubuntu (GitHub Actions) and macOS, using the instructions:
pip3 install -e git+https://github.com/it-novum/mkdocs-featherlight.git

Resulting in:

ERROR: Could not detect requirement name for 'git+https://github.com/it-novum/mkdocs-featherlight.git', please specify one with #egg=your_package_name

I was able to install without error by appending #egg=featherlight

However, mkdocs refuses to serve, with a vague error (even in verbose mode):

ERROR - Config value: 'markdown_extensions'. Error: Failed loading extension "featherlight"

This also happens when I use the alternative (manual) installation method.

I'd greatly appreciate any insight into this, or if you know of any way to further debug this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.