Skip to content

feature_request(option): JQuery Lazy support #25

Description

@Kristinita

1. Summary

It would be nice, if JQuery Lazy syntax will support.

2. Argumentation

2.1. JQuery Lazy meaning

See on official site my reasons to use JQuery Lazy.

2.2. Syntactic sugar

At the time I need to use clean HTML for embedded videos to my Markdown, example:

<div class="SashaVideo"><iframe class="SashaLazy" data-src="https://pe.ertu.be/videos/embed/4faa7a29-5937-40ce-8191-7b536e6296ec?start=20m17s">

</iframe></div>

It is a big syntax.

3. Expected behavior

Part of pelicanconf.py for Pelican:

MARKDOWN = {
    'extension_configs': {
        'pyembed.markdown': {
            # If “False”: no “width”, “height”, “frameborder” and “allowfullscreen”
            # I don't use this attributes in HTML, because:
            # 1. I use CSS.
            # 2. “frameborder” attribute is obsolete: https://i.imgur.com/xPc9xH7.png
            'attributes': False,
            # Class for iframe. No class, if no this option.
            'iframe_class': 'SashaLazy',
            'jquery_lazy': True,
            # Class for div wrapper. No <div>, if no this option.
            'wrapper_class': 'SashaVideo'
        }
    },
}

Part of any my Pelican Markdown article:

[!embed](https://pe.ertu.be/videos/embed/4faa7a29-5937-40ce-8191-7b536e6296ec?start=20m17s)

Short and convenient syntax.

It will convert to HTML:

<div class="SashaVideo"><iframe class="SashaLazy" data-src="https://pe.ertu.be/videos/embed/4faa7a29-5937-40ce-8191-7b536e6296ec?start=20m17s">

</iframe></div>

Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions