Metadata-Version: 1.1
Name: pelican-htmlmin
Version: 1.0.2
Summary: Minifies HTML files generated by Pelican
Home-page: https://git.bryanbrattlof.com/pelican-htmlmin
Author: Bryan Brattlof
Author-email: hello@bryanbrattlof.com
License: MIT
Description: pelican-htmlmin
        ###############
        
        A `Pelican <https://github.com/getpelican/pelican/>`_ plugin that uses
        `htmlmin <https://github.com/mankyd/htmlmin>`_ to remove comments and extra
        whitespace from your website after the pages have been generated.
        
        Turning this:
        
        .. code-block:: html
        
           <html>
             <head>
               <title>  Hello, World!  </title>
             </head>
             <body>
               <p> How  <em>you</em> doing?  </p>
             </body>
           </html>
        
        
        Into this:
        
        .. code-block:: html
        
           <html><head><title>Hello, World!</title><body><p> How <em>you</em> doing? </p></body></html>
        
        Installing
        ##########
        
        :code:`pelican-htmlmin`, is available on pip:
        
        .. code-block::
        
           $ pip install pelican-htmlmin
        
        After you've installed the package, update the :code:`PLUGINS` variable in your
        :code:`pelicanconf.py` to include the package in your next pelican build.
        
        .. code-block:: python
        
           PLUGINS = [
               # ...
               'pelican_htmlmin',
               # ...
           ]
        
        Options
        #######
        
        Being a very small wrapper around :code:`htmlmin`, there are only a few options
        that you may need.
        
        HTMLMIN_ENABLED
        ===============
        
        By Default, if Pelican is in :code:`DEBUG` mode, :code:`pelican-htmlmin` will
        not minify any files, helping with debugging. To override this, set
        :code:`HTMLMIN_ENABLED = True` to minify your HTML files regardless of the
        :code:`DEBUG` flag.
        
        .. code-block:: python
        
           # minify generated files only if pelican is not in DEBUG mode
           HTMLMIN_ENABLED = not logger.getEffectiveLevel() == logging.DEBUG
        
        HTMLMIN_MATCH
        =============
        
        :code:`pelican-htmlmin` looks for files ending with :code:`.html` or
        :code:`.htm` to minify. You can use the :code:`HTMLMIN_MATCH` to change the
        regular expression that matches the files you wish to minify.
        
        .. code-block:: python
        
           HTMLMIN_MATCH = r'.html?$'
        
        HTMLMIN_OPTIONS
        ===============
        
        If you wish to pass arguments directly to :code:`htmlmin`, use the
        :code:`HTMLMIN_OPTIONS` to pass keyword arguments.
        
        .. code-block:: python
        
           HTMLMIN_OPTIONS = {
               'remove_comments': True,
               'remove_all_empty_space': True,
               'remove_optional_attribute_quotes': False
           }
        
        For more information on the arguments you can give :code:`htmlmin`, see their
        `documentation here
        <https://htmlmin.readthedocs.io/en/latest/reference.html#main-functions>`_
        
        Contributing
        ############
        
        Please feel free to help. `Buying me Beer
        <https://www.buymeacoffee.com/bryanbrattlof>`_, emailing issues, or `patches via
        email <https://bryanbrattlof.com/connect/>`_, are all warmly welcomed,
        especially beer.
        
        .. image:: https://img.shields.io/badge/license-MIT-green.svg
           :alt: License: MIT
        
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: Framework :: Pelican
Classifier: Framework :: Pelican :: Plugins
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Natural Language :: English
