From b88cdc1f07ce3d27565781f0249f87547192e890 Mon Sep 17 00:00:00 2001 From: Rico van Zelst Date: Thu, 14 Dec 2023 14:11:08 +0100 Subject: [PATCH 1/3] 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 From 20bdb09a8e108350a4953a0eddf7ebc83bf94c4f Mon Sep 17 00:00:00 2001 From: Rico van Zelst Date: Thu, 14 Dec 2023 14:20:55 +0100 Subject: [PATCH 2/3] feat: Add post thumbnail to show page This commit adds a post thumbnail to the show page of a post. The thumbnail is displayed below the date and above the post title. It is an image with the source set to the URL of the post's thumbnail and alt text set to the post's title. The image has a fixed height, rounded corners, and a semi-transparent border. --- resources/views/posts/show.blade.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/views/posts/show.blade.php b/resources/views/posts/show.blade.php index 6f49a5c..9014166 100644 --- a/resources/views/posts/show.blade.php +++ b/resources/views/posts/show.blade.php @@ -24,6 +24,8 @@ + {{$post->title}} Thumbnail

thumbnail`. This will help improve SEO by providing search engines with information about the thumbnail image associated with the post. --- resources/views/posts/show.blade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/views/posts/show.blade.php b/resources/views/posts/show.blade.php index 9014166..a923348 100644 --- a/resources/views/posts/show.blade.php +++ b/resources/views/posts/show.blade.php @@ -26,6 +26,7 @@

{{$post->title}} Thumbnail +