Giter VIP home page Giter VIP logo

kirby-minify-html's People

Contributors

afbora avatar grommas avatar nilshoerrmann 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kirby-minify-html's Issues

Conditional comments not minified

On my side everything is working as expected. I only had a small piece of html (conditional comment) that wasn't minified.

To reproduce the "issue", place the following somewhere in your html:
<!--[if lt IE 9]>
<div class="browserUpdate">
<p>Bro, don't you think it's time to upgrade to a real browser? </p>
<p><a href="http://browsehappy.com/" target="_blank">UPDATE NOW</a> </p>
</div>
<![endif]-->

RESULT (after minification):
<!--[if lt IE 9]>
<div class="browserUpdate">
<p>Bro, don't you think it's time to upgrade to a real browser? </p>
<p><a href="http://browsehappy.com/" target="_blank">UPDATE NOW</a> </p>
</div>
<![endif]-->

EXPECTED (after minification):
<!--[if lt IE 9]><div class="browserUpdate"><p>Bro, don't you think it's time to upgrade to a real browser? </p><p><a href="http://browsehappy.com/" target="_blank">UPDATE NOW</a></p></div><![endif]-->

Hope it helps you make your plugin even BETTER :-)

Collision with `getkirby/layouts` plugin

.. and I can't figure out why! What could possible pitfalls be? On many other websites, I install it and it just worksTM - I tried var_dumping from inside the plugin, nothing - I don't even know if it's loaded - and if not, why ..

I appreciate all pointers,

cheers
S1SYPHOS

Allow options of type array

Hi Ahmet,

I want to use the doMakeSameDomainsLinksRelative option and pass an array with domains to the minifier, like this:
'doMakeSameDomainsLinksRelative' => ['https://example.com'],

But using this option will lead to an TypeError:
"voku\helper\HtmlMin::doMakeSameDomainsLinksRelative(): Argument #1 ($localDomains) must be of type array, bool given ..."

What do you think? Could this be customized?

Thanks for your time and the great plugin.
Tim

Function libxml_disable_entity_loader() is deprecated

On PHP 8, this extension throws the following error:

Whoops\Exception\ErrorException thrown with message "Function libxml_disable_entity_loader() is deprecated"

Stacktrace:
#9 Whoops\Exception\ErrorException in /Users/xyz/site/plugins/minify-html/vendor/voku/simple_html_dom/src/voku/helper/HtmlDomParser.php:311
#8 Whoops\Run:handleError in /Users/xyz/site/plugins/minify-html/vendor/voku/simple_html_dom/src/voku/helper/HtmlDomParser.php:311
#7 voku\helper\HtmlDomParser:createDOMDocument in /Users/xyz/site/plugins/minify-html/vendor/voku/simple_html_dom/src/voku/helper/HtmlDomParser.php:733
#6 voku\helper\HtmlDomParser:loadHtml in /Users/xyz/site/plugins/minify-html/vendor/voku/html-min/src/voku/helper/HtmlMin.php:1540
#5 voku\helper\HtmlMin:minifyHtmlDom in /Users/xyz/site/plugins/minify-html/vendor/voku/html-min/src/voku/helper/HtmlMin.php:1355
#4 voku\helper\HtmlMin:minify in /Users/xyz/site/plugins/minify-html/index.php:27
#3 MinifyHTML:render in /Users/xyz/kirby/src/Cms/Page.php:1172
#2 Kirby\Cms\Page:render in /Users/xyz/kirby/src/Cms/App.php:686
#1 Kirby\Cms\App:io in /Users/xyz/kirby/src/Cms/App.php:1039
#0 Kirby\Cms\App:render in /Users/xyz/index.php:5

Exclude content representation

We have an RSS feed on our side that we provide via a content representation: with this extension, the XML output is also minified which results in invalid markup.

Would it be possible to check the content type and only minify output that is explicitely HTML?

Remove comments

Hi,

Minifying works but unfortunately my comments are removed even though I added this to my config.php:

  'afbora.kirby-minify-html.enabled' => true,
  'afbora.kirby-minify-html.options' => [
      'doOptimizeViaHtmlDomParser' => true,
      'doRemoveComments' => false,
  ],

Am I missing something?

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.