From 7ad53814d3fe95acf6065a9ad1869cecb2d9b5c9 Mon Sep 17 00:00:00 2001 From: Rico van Zelst Date: Mon, 1 Apr 2024 16:22:23 +0200 Subject: [PATCH] feat: Enhance social media sharing meta image for blogpost - Update OpenGraph and Twitter meta tags in app.blade.php to dynamically set og:image based on content. - Modify show.blade.php to include post thumbnail as og_image for better social media sharing. --- resources/views/layouts/app.blade.php | 5 +++-- resources/views/posts/show.blade.php | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index f4f4a0f..e5fac87 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -31,6 +31,7 @@ @stack('meta_tags') + @@ -38,14 +39,14 @@ - + - + @vite(['resources/css/app.css', 'resources/js/app.js']) diff --git a/resources/views/posts/show.blade.php b/resources/views/posts/show.blade.php index 8483ca6..b1cad85 100644 --- a/resources/views/posts/show.blade.php +++ b/resources/views/posts/show.blade.php @@ -1,9 +1,11 @@ @use('Carbon\Carbon') @extends('layouts.app') -@section('title', $post->title . ' • Heimerdinger.LoL') +@section('title', $post->title) @section('description', 'Heimerdinger.LoL: ' . $post->description) +@section('og_image', $post->thumbnail) + @push('meta_tags')