Skip to content

Commit 607491c

Browse files
ikidnapmyselfclaude
andcommitted
seo: add meta description and canonical link to layout
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 906c98f commit 607491c

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

resources/views/layout.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<meta name="csrf-token" content="{{ csrf_token() }}">
77
<title>{{ config('app.name') }}</title>
8+
<meta name="description" content="@yield('meta-description', config('app.name'))">
9+
<link rel="canonical" href="{{ url()->current() }}">
810
@vite(['resources/css/app.css', 'resources/js/app.js'])
911
@yield('page-data')
1012
<script>window.__AUTH__ = @json(auth()->user()?->only(['id', 'name', 'email']));</script>

resources/views/welcome.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
@extends('layout')
22

3+
@section('meta-description', config('app.name').' — real-time messaging threads for teams')
4+
35
@section('page-data')
46
<script>
57
window.__PAGE__ = 'Welcome';

tests/Feature/FrontEndTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ public function test_page_controller_index_method()
2121

2222
$response->assertOk();
2323
$response->assertSee(Config::string('app.name'));
24+
$response->assertSee('<meta name="description" content="', false);
25+
$response->assertSee('<link rel="canonical" href="'.url('/').'">', false);
2426
}
2527

2628
public function test_dashboard_shows_real_unread_counts_and_participant_ids(): void

0 commit comments

Comments
 (0)