File tree Expand file tree Collapse file tree 4 files changed +10
-5
lines changed
resources/views/components Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1
1
@if ($about !== ' ' )
2
2
<div >
3
- <h2 class =" text-3xl font-semibold" >{{ __ ( ' About This Site ' ) } } </h2 >
3
+ <h1 class =" text-3xl font-semibold" >{{ $title } } </h1 >
4
4
<div class =" prose-sm md:prose prose-zinc mt-1 dark:prose-invert prose-a:text-primary-500 prose-a:underline" >
5
5
{!! $about ! !}
6
6
</div >
Original file line number Diff line number Diff line change 10
10
11
11
<title >{{ $title ?: config (' cachet.title' , ' Cachet' ) } } </title >
12
12
<meta name =" title" content =" {{ $title ?: config (' cachet.title' , ' Cachet' ) } }" />
13
- <meta name =" description" content =" Status page for {{ $site_name } }. " />
13
+ <meta name =" description" content =" {{ $description } }" />
14
14
15
15
<!-- Open Graph / Facebook -->
16
16
<meta property =" og:type" content =" website" />
17
17
<meta property =" og:url" content =" {{ url (Cachet:: path ()) } }" />
18
18
<meta property =" og:title" content =" {{ $title ?: config (' cachet.title' , ' Cachet' ) } }" />
19
- <meta property =" og:description" content =" Status page for {{ $site_name } }. " />
19
+ <meta property =" og:description" content =" {{ $description } }" />
20
20
21
21
<!-- Twitter -->
22
22
<meta property =" twitter:card" content =" summary_large_image" />
23
23
<meta property =" twitter:url" content =" {{ url (Cachet:: path ()) } }" />
24
24
<meta property =" twitter:title" content =" {{ $title ?: config (' cachet.title' , ' Cachet' ) } }" />
25
- <meta property =" twitter:description" content =" Status page for {{ $site_name } }. " />
25
+ <meta property =" twitter:description" content =" {{ $description } }" />
26
26
27
27
@vite ([' resources/css/cachet.css' , ' resources/js/cachet.js' ], ' vendor/cachethq/cachet/build' )
28
28
@filamentStyles
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ public function __construct(private AppSettings $settings)
24
24
public function render (): View |Closure |string
25
25
{
26
26
return view ('cachet::components.about ' , [
27
+ 'title ' => $ this ->settings ->name ?: config ('cachet.title ' , 'Cachet ' ),
27
28
'about ' => Str::of ($ this ->settings ->about )->trim ()->markdown ()->toString (),
28
29
]);
29
30
}
Original file line number Diff line number Diff line change 7
7
use Closure ;
8
8
use Illuminate \Contracts \View \View ;
9
9
use Illuminate \View \Component ;
10
+ use Illuminate \Support \Str ;
10
11
11
12
class Cachet extends Component
12
13
{
@@ -16,13 +17,15 @@ class Cachet extends Component
16
17
public function __construct (
17
18
private readonly AppSettings $ appSettings ,
18
19
private readonly CustomizationSettings $ customizationSettings ,
19
- private ?string $ title = null
20
+ private ?string $ title = null ,
21
+ private ?string $ description = null
20
22
) {
21
23
if ($ this ->title ) {
22
24
$ this ->title .= ' - ' .($ this ->appSettings ->name ?: config ('cachet.title ' ));
23
25
}
24
26
25
27
$ this ->title ??= ($ this ->appSettings ->name ?? config ('cachet.title ' ));
28
+ $ this ->description ??= (Str::of ($ this ->appSettings ->about )->trim ()->toString ());
26
29
}
27
30
28
31
/**
@@ -32,6 +35,7 @@ public function render(): View|Closure|string
32
35
{
33
36
return view ('cachet::components.cachet ' , [
34
37
'title ' => $ this ->title ,
38
+ 'description ' => $ this ->description ,
35
39
'site_name ' => $ this ->appSettings ->name ,
36
40
'cachet_header ' => $ this ->customizationSettings ->header ,
37
41
'cachet_css ' => $ this ->customizationSettings ->stylesheet ,
You can’t perform that action at this time.
0 commit comments