This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Bruno Meilick <[email protected]>
- Loading branch information
Showing
25 changed files
with
1,154 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[*.{css,scss,less,js,json,ts,sass,html,hbs,mustache,phtml,html.twig,md,yml}] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
indent_size = 4 | ||
trim_trailing_whitespace = false | ||
|
||
[site/templates/**.php] | ||
indent_size = 2 | ||
|
||
[site/snippets/**.php] | ||
indent_size = 2 | ||
|
||
[package.json,.{babelrc,editorconfig,eslintrc,lintstagedrc,stylelintrc}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,27 @@ | ||
vendor/ | ||
/kirby3-thumb-imageoptim.zip | ||
/composer.lock | ||
/kirby | ||
# OS files | ||
.DS_Store | ||
.php_cs.cache | ||
|
||
# imageoptim | ||
/vendor/imageoptim/imageoptim/*.png | ||
|
||
# files of Composer dependencies that are not needed for the plugin | ||
/vendor/**/.* | ||
/vendor/**/*.json | ||
/vendor/**/*.txt | ||
/vendor/**/*.md | ||
/vendor/**/*.yml | ||
/vendor/**/*.yaml | ||
/vendor/**/*.xml | ||
/vendor/**/*.dist | ||
/vendor/**/readme.php | ||
/vendor/**/LICENSE | ||
/vendor/**/COPYING | ||
/vendor/**/VERSION | ||
/vendor/**/docs/* | ||
/vendor/**/example/* | ||
/vendor/**/examples/* | ||
/vendor/**/test/* | ||
/vendor/**/tests/* | ||
/vendor/**/php4/* | ||
/vendor/getkirby/composer-installer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,35 @@ | ||
<?php | ||
|
||
require_once __DIR__ . '/vendor/autoload.php'; | ||
@include_once __DIR__ . '/vendor/autoload.php'; | ||
|
||
Kirby::plugin('bnomei/thumbimageoptim', [ | ||
'options' => [ | ||
'optimize' => true, | ||
'forceupload' => false, | ||
'apikey' => null, | ||
'defaults' => [ | ||
'io_quality' => 'medium', | ||
'io_dpr' => '1', | ||
], | ||
'timelimit' => 30, // set_time_limit | ||
'log.enabled' => false, | ||
'log' => function (string $msg, string $level = 'info', array $context = []):bool { | ||
if (option('bnomei.thumbimageoptim.log.enabled') && function_exists('kirbyLog')) { | ||
kirbyLog('bnomei.thumbimageoptim.log')->log($msg, $level, $context); | ||
return true; | ||
} | ||
return false; | ||
}, | ||
'cache' => true, | ||
], | ||
'components' => [ | ||
'thumb' => function ($kirby, $src, $dst, $options) { | ||
return \Bnomei\Imageoptim::thumb($src, $dst, $options); | ||
} | ||
], | ||
'hooks' => [ | ||
'route:before' => function () { | ||
\Bnomei\Imageoptim::removeFilesOfUnfinishedJobs(); | ||
}, | ||
], | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
// autoload.php @generated by Composer | ||
|
||
require_once __DIR__ . '/composer/autoload_real.php'; | ||
|
||
return ComposerAutoloaderInit438486ca4052af1f12bcb5232c4ed236::getLoader(); |
Oops, something went wrong.