From 4713df71c009583c0ceef4b2c33a5736bcc899f4 Mon Sep 17 00:00:00 2001 From: Charles Teh Date: Mon, 25 Sep 2023 03:28:46 +0800 Subject: [PATCH] Add (minifier) Add (seotools): facebook app id --- app/Http/Kernel.php | 1 + composer.json | 1 + composer.lock | 69 ++++++++++++++++++++++++++++++++++++++++++- config/htmlminify.php | 19 ++++++++++++ config/seotools.php | 8 +++-- 5 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 config/htmlminify.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 4f975eb..d621602 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -37,6 +37,7 @@ class Kernel extends HttpKernel \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, \Spatie\GoogleTagManager\GoogleTagManagerMiddleware::class, + \DipeshSukhia\LaravelHtmlMinify\Middleware\LaravelMinifyHtml::class, ], 'api' => [ diff --git a/composer.json b/composer.json index e4d63ac..f15a12d 100644 --- a/composer.json +++ b/composer.json @@ -10,6 +10,7 @@ "require": { "php": "^8.1", "artesaos/seotools": "^1.2", + "dipeshsukhia/laravel-html-minify": "^3.3", "graham-campbell/markdown": "^15.0", "guzzlehttp/guzzle": "^7.2", "intervention/image": "^2.7", diff --git a/composer.lock b/composer.lock index 6d64e1d..0abdb74 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "189360d364c9c9dd3b0432c0e6525083", + "content-hash": "6befdc23980f16c166f9c783aa9cabf5", "packages": [ { "name": "artesaos/seotools", @@ -357,6 +357,73 @@ }, "time": "2022-10-27T11:44:00+00:00" }, + { + "name": "dipeshsukhia/laravel-html-minify", + "version": "v3.3.1", + "source": { + "type": "git", + "url": "https://github.com/dipeshsukhia/laravel-html-minify.git", + "reference": "6c25fe0d95f74a3828ed86ac88f85d78e5cb8a96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dipeshsukhia/laravel-html-minify/zipball/6c25fe0d95f74a3828ed86ac88f85d78e5cb8a96", + "reference": "6c25fe0d95f74a3828ed86ac88f85d78e5cb8a96", + "shasum": "" + }, + "require": { + "illuminate/support": "^10.0", + "php": ">=8.1" + }, + "require-dev": { + "orchestra/testbench": "8.0.*", + "phpunit/phpunit": "^10.1" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "DipeshSukhia\\LaravelHtmlMinify\\LaravelHtmlMinifyServiceProvider" + ], + "aliases": { + "LaravelHtmlMinify": "DipeshSukhia\\LaravelHtmlMinify\\LaravelHtmlMinifyFacade" + } + } + }, + "autoload": { + "psr-4": { + "DipeshSukhia\\LaravelHtmlMinify\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dipesh Sukhia", + "email": "dipesh.sukhia@gmail.com", + "role": "Developer" + } + ], + "description": "laravel minify html output", + "homepage": "https://github.com/dipeshsukhia/laravel-html-minify", + "keywords": [ + "dipeshsukhia", + "laravel-html-minify" + ], + "support": { + "issues": "https://github.com/dipeshsukhia/laravel-html-minify/issues", + "source": "https://github.com/dipeshsukhia/laravel-html-minify/tree/v3.3.1" + }, + "funding": [ + { + "url": "https://github.com/dipeshsukhia", + "type": "github" + } + ], + "time": "2023-09-07T03:26:50+00:00" + }, { "name": "doctrine/inflector", "version": "2.0.8", diff --git a/config/htmlminify.php b/config/htmlminify.php new file mode 100644 index 0000000..973960b --- /dev/null +++ b/config/htmlminify.php @@ -0,0 +1,19 @@ + env('HTML_MINIFY', true), + + // exclude route name for exclude from minify + 'exclude_route' => [ + // 'routeName' + ] +]; diff --git a/config/seotools.php b/config/seotools.php index 78565ce..113c5ca 100644 --- a/config/seotools.php +++ b/config/seotools.php @@ -4,6 +4,10 @@ */ return [ + + + 'fb_app_id' => '1259730771382460', + 'meta' => [ /* * The default configurations to be used by the meta generator. @@ -41,7 +45,7 @@ 'url' => false, // Set null for using Url::current(), set false to total remove 'type' => false, 'site_name' => false, - 'images' => [], + 'images' => ['https://echoscoop.com/pwa/icon-512x512.png'], ], ], 'twitter' => [ @@ -62,7 +66,7 @@ 'description' => 'Distilling world news into bite-sized scoops.', // set false to total remove 'url' => false, // Set to null or 'full' to use Url::full(), set to 'current' to use Url::current(), set false to total remove 'type' => 'WebPage', - 'images' => [], + 'images' => ['https://echoscoop.com/pwa/icon-512x512.png'], ], ], ];