Skip to content

Commit

Permalink
refactor SEO and remove it form SkyServiceProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi committed Aug 15, 2022
1 parent ed9c561 commit da4f36e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/Http/Livewire/Faq.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', '<link rel="icon" type="image/x-icon" href="'.asset('favicon/favicon.ico').'">')
->rawTag('<meta name="theme-color" content="'.config('zeus-sky.site_color').'" />')
->withUrl()
->twitter();

return view(app('theme').'.addons.faq')
Expand Down
6 changes: 5 additions & 1 deletion src/Http/Livewire/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', '<link rel="icon" type="image/x-icon" href="'.asset('favicon/favicon.ico').'">')
->rawTag('<meta name="theme-color" content="'.config('zeus-sky.site_color').'" />')
->withUrl()
->twitter();

return view(app('theme').'.page')
Expand Down
6 changes: 5 additions & 1 deletion src/Http/Livewire/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', '<link rel="icon" type="image/x-icon" href="'.asset('favicon/favicon.ico').'">')
->rawTag('<meta name="theme-color" content="'.config('zeus-sky.site_color').'" />')
->withUrl()
->twitter();

return view(app('theme').'.post')
Expand Down
9 changes: 9 additions & 0 deletions src/Http/Livewire/Posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -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', '<link rel="icon" type="image/x-icon" href="'.asset('favicon/favicon.ico').'">')
->rawTag('<meta name="theme-color" content="'.config('zeus-sky.site_color').'" />')
->withUrl()
->twitter();

return view(app('theme').'.home')
->with([
'posts' => $posts,
Expand Down

0 comments on commit da4f36e

Please sign in to comment.