Git Product home page Git Product logo

Comments (6)

AbdealiLoKo avatar AbdealiLoKo commented on June 30, 2024 1

Just came across this plugin - and having a simple pip install would be nice for the markdown plugin

from lightgallery-markdown.

g-provost avatar g-provost commented on June 30, 2024

It would be nice but I'm not sure if it would be accepted as it is since the extension requires to install manually the lightgallery files (js, css, font).

from lightgallery-markdown.

g-provost avatar g-provost commented on June 30, 2024

I think the best approach would be to integrate directly the lightgallery feature to a mkdocs theme (e.g mkdocs material).

from lightgallery-markdown.

faustefan avatar faustefan commented on June 30, 2024

Hi @g-provost,

I'm not sure if you are mixing up different levels of tools used here. While you have created the plugin with mkdocs use in mind, it is a plugin for markdown itself. It generates HTML markup from markdown which conforms to the structure which lightgallery.js needs in order to create the light boxes from image tags. It is not and cannot be a plugin for mkdocs or one of its themes as it works during generation of the source fieles (.md's) into HTML.

It would be nice but I'm not sure if it would be accepted as it is since the extension requires to install manually the lightgallery files (js, css, font).

The generated HTMLs need to ensure that the prerequisites given in your README are fulfilled when being loaded - i.e. that lightgallery.js is loaded and that the conversion of the image tags to light boxes is triggered. This is not the task of your plugin but a task for mkdocs, its themes or an indiviudal project. Therefore, I do not see a reason why your markdown plugin should be rejected in any form.

I think the best approach would be to integrate directly the lightgallery feature to a mkdocs theme (e.g mkdocs material).

squidfunk/mkdocs-material#280 discusses the integration of lightgallery.js or another light box provider directly into the mkdocs-material theme. The conclusion there is to allow choosing which ligh box implementation shall be used. This provides necessary felxibility for projects, while keeping the required boiler-plate code low due to the built-in way to include the js, css, html through the extra_* configuration settings or extension mechanisms of mkdocs.

Releasing your markdown plugin on pypi would have the benefit of making it easily consumable and universally usable anywhere markdown is used to generate HTML files from .md's - whether its mkdocs with a dedicated theme or not. Such a program / tool, mkdocs or mkdocs themes can choose to pre-bundle lightgallery.js with all files, adjust styling if needed, or leave anything to their users (as mkdocs-material chose to do).

Still your plugin is there to transform the markdown into the HTML which lightgallery.js needs because this is the intention of you plugin, right? And this is what users of your plugin will know.

I do have some time in the coming weeks. Judging a fist read on the pypi.org website and on Github actions, I should be able to come up with a suggestion on enabling the pypi upload e.g. once a tag is pushed to the repo. Would you accept a PR on this again (given some previous discussion on my findings)?

BR, Stefan

from lightgallery-markdown.

g-provost avatar g-provost commented on June 30, 2024

Hi @faustefan
You making valid points, my guess was that most people expectation would be to have a mkdocs or a theme that integrates it already seamlessly. But yeah you right, the correct course of action should be first to get this markdown plugin into pypi. Then the rest can come later.
Of course any PR that could improve or make plugin more mainstream is welcome.

from lightgallery-markdown.

Master-An avatar Master-An commented on June 30, 2024

Just came across this plugin - and having a simple pip install would be nice for the markdown plugin

Hope that!

from lightgallery-markdown.

Related Issues (11)

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.