From b88cdc1f07ce3d27565781f0249f87547192e890 Mon Sep 17 00:00:00 2001 From: Rico van Zelst Date: Thu, 14 Dec 2023 14:11:08 +0100 Subject: [PATCH] feat: SEO Improvements - Added `APP_STAGING` variable to `.env.example` - Updated `config/app.php` to use `APP_STAGING` for determining the value of `IS_STAGING` - Updated `resources/views/layouts/app.blade.php` and `resources/views/posts/show.blade.php` to include additional meta tags for SEO and attribution --- .env.example | 2 ++ config/app.php | 13 +++++++++++++ resources/views/layouts/app.blade.php | 3 +++ resources/views/posts/show.blade.php | 8 ++++++++ 4 files changed, 26 insertions(+) diff --git a/.env.example b/.env.example index 2ef7ab2..592713b 100644 --- a/.env.example +++ b/.env.example @@ -4,6 +4,8 @@ APP_KEY= APP_DEBUG=true APP_URL=http://127.0.0.1:8000 +APP_STAGING=false + RGAPI_KEY="RGAPI-00000000-0000-0000-0000-000000000000" LOGIN_ROUTE_NAME="/your/secret/login/route" diff --git a/config/app.php b/config/app.php index 4569f6d..5c85235 100644 --- a/config/app.php +++ b/config/app.php @@ -187,4 +187,17 @@ return [ // 'Example' => App\Facades\Example::class, ])->toArray(), + /* + | Configurations mostly used for SEO and attribution. + | These are used in the of the page. + | Do not change these to your own URL, as they are used for attribution. + | If you want to change the URL, change the APP_URL in your .env file. + */ + + 'IS_STAGING' => env('APP_STAGING') == 'true', + + 'HEIMER_URL' => env('APP_ENV') == 'local' ? 'http://127.0.0.1:8000' + : (env('IS_STAGING') + ? 'https://staging.heimerdinger.lol' + : 'https://heimerdinger.lol'), ]; diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 0976453..8c4a541 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -18,9 +18,12 @@ @yield('title') + @stack('meta_tags') + + diff --git a/resources/views/posts/show.blade.php b/resources/views/posts/show.blade.php index d6d62a1..6f49a5c 100644 --- a/resources/views/posts/show.blade.php +++ b/resources/views/posts/show.blade.php @@ -4,6 +4,14 @@ @section('title', $post->title . ' • Heimerdinger.LoL') @section('description', 'Heimerdinger.LoL: ' . $post->description) +@push('meta_tags') + + + + + +@endpush + @section('content') Back