Add (initial): futurewalker code
This commit is contained in:
@@ -42,7 +42,7 @@ public function index(Request $request, $category_slug, $slug)
|
||||
$content = $this->injectFeaturedImage($post, $content);
|
||||
$content = $this->injectPublishDateAndAuthor($post, $content);
|
||||
|
||||
$post_description = $post->excerpt.' '.$post->title.' by EchoScoop.';
|
||||
$post_description = $post->excerpt.' '.$post->title.' by FutureWalker.';
|
||||
|
||||
// Generate breadcrumb data
|
||||
$breadcrumbs = collect([
|
||||
@@ -71,7 +71,6 @@ public function index(Request $request, $category_slug, $slug)
|
||||
SEOMeta::setTitle($post->title, false);
|
||||
SEOMeta::setDescription($post_description);
|
||||
SEOMeta::addMeta('article:published_time', $post->published_at->format('Y-m-d'), 'property');
|
||||
SEOMeta::addMeta('article:section', $post->category->name, 'property');
|
||||
SEOMeta::setRobots('INDEX, FOLLOW, MAX-IMAGE-PREVIEW:LARGE, MAX-SNIPPET:-1, MAX-VIDEO-PREVIEW:-1');
|
||||
|
||||
OpenGraph::setDescription($post_description);
|
||||
@@ -89,15 +88,15 @@ public function index(Request $request, $category_slug, $slug)
|
||||
->addImage($post->featured_image_cdn)
|
||||
->addValue('author', [
|
||||
'type' => 'Person',
|
||||
'name' => $post->author->name,
|
||||
'name' => 'FutureWalker',
|
||||
'url' => config('app.url'),
|
||||
])
|
||||
->addValue('publisher', [
|
||||
'type' => 'Organization',
|
||||
'name' => 'EchoScoop',
|
||||
'name' => 'FutureWalker',
|
||||
'logo' => [
|
||||
'type' => 'ImageObject',
|
||||
'url' => asset('echoscoop-logo-512x512.png'),
|
||||
'url' => asset('FutureWalker-logo-512x512.png'),
|
||||
],
|
||||
])
|
||||
->addValue('datePublished', $post->published_at->format('Y-m-d'))
|
||||
@@ -231,7 +230,7 @@ private function injectTableOfContents($html)
|
||||
private function injectPublishDateAndAuthor($post, $content)
|
||||
{
|
||||
$publishedAtFormatted = $post->published_at->format('F j, Y');
|
||||
$authorName = $post->author->name;
|
||||
$authorName = 'FutureWalker Team';
|
||||
|
||||
// Create the HTML structure for publish date and author
|
||||
$publishInfo = "<div class=\"mb-4\"><span class=\"text-secondary small\">Published on {$publishedAtFormatted} by {$authorName}<i class=\"bi bi-dot\"></i>".markdown_min_read($post->body).'</span></div>';
|
||||
|
||||
Reference in New Issue
Block a user