Git Product home page Git Product logo

lightgallery-markdown's People

Contributors

faustefan avatar g-provost avatar mementum avatar pexcn avatar tirkarthi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lightgallery-markdown's Issues

Error with travis-ci

I get an error while trying to install this extension with travis-ci and I do not understand where it comes from. I wonder if you could help.

Log from travis of the installation of lightgallery-markdown:

running install
running bdist_egg
running egg_info
creating lightgallery.egg-info
writing requirements to lightgallery.egg-info/requires.txt
writing lightgallery.egg-info/PKG-INFO
writing top-level names to lightgallery.egg-info/top_level.txt
writing dependency_links to lightgallery.egg-info/dependency_links.txt
writing manifest file 'lightgallery.egg-info/SOURCES.txt'
reading manifest file 'lightgallery.egg-info/SOURCES.txt'
writing manifest file 'lightgallery.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
copying lightgallery.py -> build/lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
copying build/lib/lightgallery.py -> build/bdist.linux-x86_64/egg
byte-compiling build/bdist.linux-x86_64/egg/lightgallery.py to lightgallery.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying lightgallery.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying lightgallery.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying lightgallery.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying lightgallery.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying lightgallery.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/lightgallery-0.1.0-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing lightgallery-0.1.0-py2.7.egg
Copying lightgallery-0.1.0-py2.7.egg to /home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages
Adding lightgallery 0.1.0 to easy-install.pth file
Installed /home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/lightgallery-0.1.0-py2.7.egg
Processing dependencies for lightgallery==0.1.0
Searching for Markdown==3.0.1
Best match: Markdown 3.0.1
Adding Markdown 3.0.1 to easy-install.pth file
Installing markdown_py script to /home/travis/virtualenv/python2.7.14/bin
Using /home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages
Finished processing dependencies for lightgallery==0.1.0
0.26s$ mkdocs build -f ../mkdocs.yml --site-dir doks/
ERROR   -  Config value: 'markdown_extensions'. Error: configs 
Aborted with 1 Configuration Errors!
The command "mkdocs build -f ../mkdocs.yml --site-dir doks/" failed and exited with 1 during .

travis.yml :

env:
  global:
    secure: [//key]

language: python # Set the build language to Python

#python: 3.6 # python version

branches: master # Set the branch to build from

install:
    - pip install mkdocs # Install the required dependencies
    - pip install mkdocs-material
    - pip install pymdown-extensions
    - git clone https://github.com/g-provost/lightgallery-markdown.git
    - cd lightgallery-markdown
    - python setup.py install
    - mkdocs build -f ../mkdocs.yml --site-dir doks/

My mkdocs yml:

site_name: name
#repo_url: https://github.com/address
site_description: name

# Customization
extra:
  social:
    - type: globe
    - link: name
  

# pagination  
nav:
    - Project Home: index.md
    - Entity Reference Model:
      - Instruction: instruction.md
      - Artist : et/person.md
      - Artwork: et/artwork.md
    - Modelling Examples:
      - Instruction: pattern/instruction.md
      - Shared: pattern/general.md
      - Temporal: pattern/temporal.md
#     - Conceptual: pattern/conceptual.md
      - Physical: pattern/physical.md  
    - Ontology Extension:
      - Extension: schema.md

theme:
  name: 'material'
  logo: 'images/logo.png'
  favicon: 'images/favicon.ico'
  font:
    text: 'Source Sans Pro'
    code: 'IBM Plex Mono'
  custom_dir: 'theme/'
  palette:
    primary: 'white'
 
markdown_extensions:
  - pymdownx.smartsymbols
  - lightgallery
  - pymdownx.mark
  - markdown.extensions.attr_list
  - pymdownx.superfences
  - pymdownx.details
  - toc:
      permalink: true
  - codehilite:
      linenums: true
  - meta
  - footnotes
  - admonition
  - pymdownx.superfences:
        custom_fences:
          - name: mermaid
            class: mermaid
            format: !!python/name:pymdownx.superfences.fence_div_format

  

extra_css:
#  - https://unpkg.com/[email protected]/dist/mermaid.css
  - 'stylesheets/extra.css'
extra_javascript:
#  - https://unpkg.com/[email protected]/dist/mermaid.min.js

Any ideas?

DeprecationWarning: 'etree' is deprecated. Use 'xml.etree.ElementTree' instead.

Getting the following error related to this plugin

INFO     -  DeprecationWarning: Using the add method to register a processor or pattern is deprecated. Use the
            `register` method instead.
              File "c:\python38\lib\site-packages\lightgallery.py", line 57, in extendMarkdown
                md.treeprocessors.add("lightbox", ImagesTreeprocessor(config, md), "_end")
              File "c:\python38\lib\site-packages\markdown\util.py", line 462, in add
                warnings.warn(
INFO     -  DeprecationWarning: The 'md_globals' parameter of 'lightgallery.LightGalleryExtension.extendMarkdown' is
            deprecated.
              File "c:\python38\lib\site-packages\markdown\core.py", line 125, in registerExtensions
                ext._extendMarkdown(self)
              File "c:\python38\lib\site-packages\markdown\extensions\__init__.py", line 82, in _extendMarkdown
                warnings.warn(

Zoom button missing

Hello,

Based on Lightgallery's documentation, it should support a zoom function, if the user includes lg-zoom.js into their document.

Currently, I'm trying to integrate this extension with mkdocs material theme. I've followed the steps (with some modifications) and it seems to work. But there is no zoom button on the toolbar.

I put Lightgallery's JS, CSS, fonts, and gif files into overrides/assets/javascripts, overrides/assets/stylesheets, overrides/assets/fonts, and overrides/assets/img in order to (more or less) mirror the structure of mkdocs material.

In main.html, I also added:

{% block styles %}
{{ super() }}

{% endblock styles %}

{% block libs %}
{{ super() }}
<script src="{{ base_url }}/assets/javascripts/lightgallery.min.js"></script>
<script src="{{ base_url }}/assets/javascripts/lg-zoom.min.js"></script>
{% endblock libs %}

{% block scripts %}
{{ super() }}
<script>
var elements = document.getElementsByClassName("lightgallery");
for(var i=0; i<elements.length; i++) {
lightGallery(elements[i]);
}
var elements = document.getElementsByClassName("md-content");
for(var i=0; i<elements.length; i++) {
lightGallery(elements[i], {zoom:true});
}
</script>
{% endblock scripts %}

The extra parts were my (admittedly blind) efforts to try integrate lg-zoom into what the guide shows.

mkdocs.yml is edited exactly how it is shown in the guide.

But still, no zoom button.

Am I doing something wrong? Am I forgetting something? Or is zoom not supported with this extension? Thank you in advance for any help/guidance!

Failed loading extension "lightgallery" with mkdocs material

Mkdocs could not load lightgallery extension

theme directory :

theme/css
theme/css/lightgallery.min.css
theme/fonts
theme/fonts/lg.svg
theme/fonts/lg.ttf
theme/fonts/lg.woff
theme/img
theme/img/loading.gif
theme/js
theme/js/lightgallery.min.js
theme/main.hml

mkdocs.yml :

site_name: Edricus Documentation
site_dir: public
edit_uri: ""
theme:
  name: material
  logo: src/logo.svg
  icon:
    repo: fontawesome/brands/git-alt
  palette:
    scheme: slate
  font:
    text: Ubuntu
    code: Ubuntu Mono
  features:
    - navigation.tabs       
    - navigation.tracking  
    - navigation.instant    
  custom_dir: theme

markdown_extensions:
  - meta
  - admonition
  - attr_list
  - md_in_html
  - pymdownx.superfences
  - pymdownx.highlight
  - pymdownx.inlinehilite
  - pymdownx.details
  - pymdownx.mark
  - pymdownx.keys
  - pymdownx.emoji
  - lightgallery
plugins:
  - git-revision-date-localized:
      type: date
      enable_creation_date: true
  - search

extra_css:
  - src/extra.css

mkdocs serve -v

INFO     -  Building documentation...
DEBUG    -  Loading configuration file: /home/edricus/Documents/edricus-docs/mkdocs.yml
ERROR    -  Config value: 'markdown_extensions'. Error: Failed loading extension "lightgallery".
DEBUG    -  Config value: 'site_name' = 'Edricus Documentation'
DEBUG    -  Config value: 'pages' = None
DEBUG    -  Config value: 'site_url' = 'https://edricus.gitlab.io/edricus-docs/'
DEBUG    -  Config value: 'site_description' = None
DEBUG    -  Config value: 'site_author' = None
DEBUG    -  Config value: 'theme' = {'name': 'material', 'logo': 'src/logo.svg', 'icon': {'repo': 'fontawesome/brands/git-alt'}, 'palette':
          {'scheme': 'slate'}, 'font': {'text': 'Ubuntu', 'code': 'Ubuntu Mono'}, 'features': ['navigation.tabs', 'navigation.tracking',
          'navigation.instant'], 'custom_dir': 'theme'}
DEBUG    -  Config value: 'docs_dir' = '/home/edricus/Documents/edricus-docs/docs'
DEBUG    -  Config value: 'site_dir' = '/tmp/mkdocs_t7fgibtr'
DEBUG    -  Config value: 'copyright' = None
DEBUG    -  Config value: 'google_analytics' = None
DEBUG    -  Config value: 'dev_addr' = Address(host='127.0.0.1', port=8000)
DEBUG    -  Config value: 'use_directory_urls' = True
DEBUG    -  Config value: 'repo_url' = 'https://gitlab.com/edricus/docs'
DEBUG    -  Config value: 'repo_name' = 'edricus/docs'
DEBUG    -  Config value: 'edit_uri' = ''
DEBUG    -  Config value: 'extra_css' = ['src/extra.css']
DEBUG    -  Config value: 'extra_javascript' = []
DEBUG    -  Config value: 'extra_templates' = []
DEBUG    -  Config value: 'markdown_extensions' = ['meta', 'admonition', 'attr_list', 'md_in_html', 'pymdownx.superfences', 'pymdownx.highlight',
          'pymdownx.inlinehilite', 'pymdownx.details', 'pymdownx.mark', 'pymdownx.keys', 'pymdownx.emoji', 'lightgallery']
DEBUG    -  Config value: 'mdx_configs' = None
DEBUG    -  Config value: 'strict' = False
DEBUG    -  Config value: 'remote_branch' = 'gh-pages'
DEBUG    -  Config value: 'remote_name' = 'origin'
DEBUG    -  Config value: 'extra' = {}
DEBUG    -  Config value: 'plugins' = PluginCollection([('git-revision-date-localized',
          <mkdocs_git_revision_date_localized_plugin.plugin.GitRevisionDateLocalizedPlugin object at 0x7fa9951f1e20>), ('search',
          <material.plugins.search.plugin.SearchPlugin object at 0x7fa9951f1760>)])
DEBUG    -  Config value: 'watch' = None
Aborted with 1 Configuration Errors!

pip show lightgallery

pip show lightgallery
Name: lightgallery
Version: 0.5
Summary: Markdown extension to wrap images in lightbox/lightgallery
Home-page: https://github.com/g-provost/lightgallery-markdown
Author: Gauthier Provost
Author-email: [email protected]
License: MIT License
Location: /home/edricus/.local/lib/python3.9/site-packages
Requires: markdown
Required-by: 

requirements.txt

jinja2==3.0.0
mkdocs==1.2.3
mkdocs-material==8.2.7
Pygments==2.11.2
pymdown-extensions==9.3
mkdocs-git-revision-date-plugin==0.3.2
mkdocs-git-revision-date-localized-plugin==1.0.0
git+https://github.com/g-provost/lightgallery-markdown#egg=lightgallery

How to add in _config.yml ?

I am very confused about adding the lightgallery feature to Jekyll with the _config.yml configuration. Can the method in this tutorial be applied to my configuration settings?

How to implement this alongside Material for MkDocs?

I'm currently struggling on how to get this working with the Material-theme for MkDocs.

I tried my best to setup everything as explained in the Readme, but I'm not sure how I could download this through pip, as I use a GitHub Action to update the pages automatically.
I have a requirements.txt which is used for pip, so all I basically need is the name and version to add and possibly some more detailed guide on how to set this up, as the readme, while explaining the setup after installation, doesn't give info on if there are any specific cases for when you want to use it with Material for MkDocs.

pypi upload?

Hey there, any chance to get this added to pypi? Thank you!

Multiple images in the same lightbox

Hello!

First and foremost, thank you!
works amazing! and so far I love the zoomable option

but I was wondering if its an option to put more than one picture in the same lightbox?
if so, what is the syntax?

when I zoom in, I already see 1/1
so, how can I tell him that there is more than 1 picture for this lightbox?

Thanks in advance.
@mementum maybe you have any idea?

my code is here:
https://gitlab.com/SM26/swm_wiki
and the output is here:
https://sm26.gitlab.io/swm_wiki/SM500R/info%20and%20specs/

label:question

Icons missed

Thank you for your project, it works like a charm.

However, I've just found that there are two buttons missing at the right upper corner of the image. I guess one is for closing the lightbox and the other one for downloading the image.

image

I've looked at sachinchoolur/lightgallery.js repository, but there are only icons for playing video. ¿Should this be considered an issue?

Regards,
Guille.

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.