Comments (6)
Just came across this plugin - and having a simple pip install
would be nice for the markdown plugin
from lightgallery-markdown.
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.
I think the best approach would be to integrate directly the lightgallery feature to a mkdocs theme (e.g mkdocs material).
from lightgallery-markdown.
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.
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.
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)
- Error with travis-ci HOT 1
- Multiple images in the same lightbox HOT 6
- AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getiterator' HOT 3
- How to implement this alongside Material for MkDocs? HOT 3
- Zoom button missing HOT 5
- Icons missed HOT 1
- Failed loading extension "lightgallery" with mkdocs material HOT 4
- Upgrade to the latest markdown version
- DeprecationWarning: 'etree' is deprecated. Use 'xml.etree.ElementTree' instead. HOT 2
- How to add in _config.yml ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightgallery-markdown.