Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions resources/views/_snippets/layout/head.blade.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{ \App\Enum\Design::MAIN_TITLE }}" />
<meta name="keywords" content="php, rector, instant upgrades, instant refactoring, upgrade symfony, upgrade php, upgrade cakephp, upgrade legacy, php migration, laravel shift alternative, php shift" />

@php
$full_title = (isset($page_title) ? $page_title . ' | ' : '') . \App\Enum\Design::MAIN_TITLE;
@endphp

<title>{{ $full_title }}</title>
@isset ($metaDescription)
<meta name="description" content="{{ $metaDescription }}" />
<meta property="og:description" content="{{ $metaDescription }}" >
@else
<meta name="description" content="{{ \App\Enum\Design::MAIN_TITLE }}" />
@endisset
<meta name="keywords" content="php, rector, instant upgrades, instant refactoring, upgrade symfony, upgrade php, upgrade cakephp, upgrade legacy, php migration, laravel shift alternative, php shift" />

@isset ($metaTitle)
<title>{{ $metaTitle }}</title>
<meta property="og:title" content="{{ $metaTitle }}">
<meta property="twitter:title" content="{{ $metaTitle }}">
@else
@php
$full_title = (isset($page_title) ? $page_title . ' | ' : '') . \App\Enum\Design::MAIN_TITLE;
@endphp
<title>{{ $full_title }}</title>
<meta property="og:title" content="{{ $full_title }}">
<meta property="twitter:title" content="{{ $full_title }}">
@endisset

<link rel="alternate" type="application/rss+xml" title="Rector Blog RSS" href="/rss.xml">

Expand All @@ -22,9 +35,6 @@
<!-- default social tags -->
<meta property="twitter:card" content="summary">

<meta property="og:title" content="{{ $full_title }}">
<meta property="twitter:title" content="{{ $full_title }}">

<meta property="og:image" content="{{ \App\Enum\Design::SOCIAL_RECTOR_LOGO }}">
<meta name="twitter:image" content="{{ \App\Enum\Design::SOCIAL_RECTOR_LOGO }}">
<meta property="og:type" content="website">
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Blog/BlogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public function __invoke(PostRepository $postRepository): View
return \view('blog/blog', [
'page_title' => 'Learn about Rector, Upgrades and Planning',
'posts' => $postRepository->getPosts(),
'metaTitle' => 'Rector Blog: PHP Code Tips & Updates',
'metaDescription' => 'Read the latest PHP refactoring tips, Rector updates, and automation guides. Level up your coding skills with our expert blog posts.',
]);
}
}
2 changes: 2 additions & 0 deletions src/Controller/Demo/DemoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public function __invoke(Request $request): View
'page_title' => 'Try Rector Online',
'rectorRun' => RectorRun::createEmpty(),
'codeMirror' => true,
'metaTitle' => 'Try Rector: Free PHP Refactoring Demo',
'metaDescription' => 'Test Rector’s automated PHP refactoring tool for free. See instant code upgrades and improvements in action. Start your demo today!',
]);
}
}
2 changes: 2 additions & 0 deletions src/Controller/DocumentationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public function __invoke(string $section = 'introduction'): View
'section_title' => $this->documentationMenuFactory->createSectionTitle($section),
'section_markdown_contents' => $markdownContents,
'documentation_menu_categories' => $this->documentationMenuFactory->create(),
'metaTitle' => 'Rector Docs: PHP Refactoring Guide',
'metaDescription' => 'Explore Rector’s documentation for PHP code refactoring and upgrades. Learn how to automate and optimize your codebase with ease.',
]);
}
}
2 changes: 2 additions & 0 deletions src/Controller/HomepageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public function __invoke(): View
return \view('homepage/homepage', [
'page_title' => "We'll Speed Up Your Development Process by 300%",
'last_5_posts' => $this->postRepository->fetchLast(5),
'metaTitle' => 'Rector: Fast PHP Code Upgrades & Refactoring',
'metaDescription' => 'Automate PHP code upgrades and refactoring with Rector. Save time, reduce errors, and modernize your codebase instantly. Try it now!',
]);
}
}