From da4f36ec21217ea97d7ec371f060a235b751ed37 Mon Sep 17 00:00:00 2001 From: Ashraf Monshi Date: Mon, 15 Aug 2022 19:17:18 +0300 Subject: [PATCH] refactor SEO and remove it form SkyServiceProvider --- src/Http/Livewire/Faq.php | 6 +++++- src/Http/Livewire/Page.php | 6 +++++- src/Http/Livewire/Post.php | 6 +++++- src/Http/Livewire/Posts.php | 9 +++++++++ 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/Http/Livewire/Faq.php b/src/Http/Livewire/Faq.php index 1ccc1f8..59bacc3 100644 --- a/src/Http/Livewire/Faq.php +++ b/src/Http/Livewire/Faq.php @@ -11,7 +11,11 @@ public function render() { seo() ->title(__('FAQ')) - ->description(__('FAQ description')) + ->description(__('FAQs') . ' ' . config('zeus-sky.site_description', 'Laravel')) + ->site(config('zeus-sky.site_title', 'Laravel')) + ->rawTag('favicon', '') + ->rawTag('') + ->withUrl() ->twitter(); return view(app('theme').'.addons.faq') diff --git a/src/Http/Livewire/Page.php b/src/Http/Livewire/Page.php index fbade4f..52ea15b 100644 --- a/src/Http/Livewire/Page.php +++ b/src/Http/Livewire/Page.php @@ -21,7 +21,11 @@ public function render() } seo() ->title($this->page->title) - ->description($this->page->description ?? '') + ->description(($this->page->description ?? '') . ' ' . config('zeus-sky.site_description', 'Laravel')) + ->site(config('zeus-sky.site_title', 'Laravel')) + ->rawTag('favicon', '') + ->rawTag('') + ->withUrl() ->twitter(); return view(app('theme').'.page') diff --git a/src/Http/Livewire/Post.php b/src/Http/Livewire/Post.php index 59186a3..908bd2d 100644 --- a/src/Http/Livewire/Post.php +++ b/src/Http/Livewire/Post.php @@ -22,7 +22,11 @@ public function render() seo() ->title($this->post->title) - ->description($this->post->description ?? '') + ->description(($this->post->description ?? '') . ' ' . config('zeus-sky.site_description', 'Laravel')) + ->site(config('zeus-sky.site_title', 'Laravel')) + ->rawTag('favicon', '') + ->rawTag('') + ->withUrl() ->twitter(); return view(app('theme').'.post') diff --git a/src/Http/Livewire/Posts.php b/src/Http/Livewire/Posts.php index fba5050..43bca9e 100644 --- a/src/Http/Livewire/Posts.php +++ b/src/Http/Livewire/Posts.php @@ -36,6 +36,15 @@ public function render() ->orderBy('published_at', 'desc') ->get(); + seo() + ->title(__('Posts')) + ->description(__('Posts') . ' ' . config('zeus-sky.site_description', 'Laravel')) + ->site(config('zeus-sky.site_title', 'Laravel')) + ->rawTag('favicon', '') + ->rawTag('') + ->withUrl() + ->twitter(); + return view(app('theme').'.home') ->with([ 'posts' => $posts,