Implement creator studio and upload updates
This commit is contained in:
@@ -1,3 +1,40 @@
|
||||
@php
|
||||
$seo = \App\Support\Seo\SeoDataBuilder::fromArray([
|
||||
'title' => $article->meta_title ?: $article->title,
|
||||
'description' => $article->meta_description ?: Str::limit(strip_tags((string) $article->excerpt), 160),
|
||||
'keywords' => $article->meta_keywords,
|
||||
'canonical' => route('news.show', $article->slug),
|
||||
'robots' => 'index,follow',
|
||||
'og_type' => 'article',
|
||||
'og_title' => $article->effective_og_title,
|
||||
'og_description' => $article->effective_og_description,
|
||||
'og_image' => $article->effective_og_image,
|
||||
'breadcrumbs' => collect([
|
||||
(object) ['name' => 'Community', 'url' => route('community.activity')],
|
||||
(object) ['name' => 'Announcements', 'url' => route('news.index')],
|
||||
$article->category
|
||||
? (object) ['name' => $article->category->name, 'url' => route('news.category', $article->category->slug)]
|
||||
: null,
|
||||
(object) ['name' => $article->title, 'url' => route('news.show', $article->slug)],
|
||||
])->filter()->values(),
|
||||
])
|
||||
->addJsonLd(array_filter([
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'Article',
|
||||
'headline' => $article->title,
|
||||
'description' => $article->meta_description ?: Str::limit(strip_tags((string) $article->excerpt), 160),
|
||||
'image' => $article->effective_og_image,
|
||||
'datePublished' => $article->published_at?->toIso8601String(),
|
||||
'dateModified' => $article->updated_at?->toIso8601String(),
|
||||
'author' => array_filter([
|
||||
'@type' => 'Person',
|
||||
'name' => $article->author?->name,
|
||||
]),
|
||||
'mainEntityOfPage' => route('news.show', $article->slug),
|
||||
], fn (mixed $value): bool => $value !== null && $value !== ''))
|
||||
->build();
|
||||
@endphp
|
||||
|
||||
@extends('news.layout', [
|
||||
'metaTitle' => $article->meta_title ?: $article->title,
|
||||
'metaDescription' => $article->meta_description ?: Str::limit(strip_tags((string)$article->excerpt), 160),
|
||||
@@ -17,21 +54,6 @@
|
||||
])->filter()->values();
|
||||
@endphp
|
||||
|
||||
{{-- OpenGraph meta --}}
|
||||
@push('head')
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:title" content="{{ $article->effective_og_title }}">
|
||||
<meta property="og:description" content="{{ $article->effective_og_description }}">
|
||||
@if($article->effective_og_image)
|
||||
<meta property="og:image" content="{{ $article->effective_og_image }}">
|
||||
@endif
|
||||
<meta property="article:published_time" content="{{ $article->published_at?->toIso8601String() }}">
|
||||
<meta property="article:author" content="{{ $article->author?->name }}">
|
||||
@if($article->meta_keywords)
|
||||
<meta name="keywords" content="{{ $article->meta_keywords }}">
|
||||
@endif
|
||||
@endpush
|
||||
|
||||
<x-nova-page-header
|
||||
section="Community"
|
||||
:title="$article->title"
|
||||
|
||||
Reference in New Issue
Block a user