We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2fec7f9 commit 9b9a186Copy full SHA for 9b9a186
src/View/Components/Cachet.php
@@ -25,7 +25,13 @@ public function __construct(
25
}
26
27
$this->title ??= ($this->appSettings->name ?? config('cachet.title'));
28
- $this->description ??= (Str::of($this->appSettings->about)->trim()->toString());
+ $this->description ??= Str::of($this->appSettings->about)
29
+ ->markdown()
30
+ ->stripTags()
31
+ ->replaceMatches('/\s\s+|\n/', ' ')
32
+ ->trim()
33
+ ->limit(155, preserveWords: true) // 155 is the recommended length of a meta description...
34
+ ->toString();
35
36
37
/**
0 commit comments