mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
Code cleanup, refactor
Updated to use Str::length for entity descriptions. Moved function to get first image in page to PageContent class.
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
<meta charset="utf-8">
|
||||
|
||||
<!-- Social Cards Meta -->
|
||||
|
||||
<meta property="og:title" content="{{ isset($pageTitle) ? $pageTitle . ' | ' : '' }}{{ setting('app-name') }}">
|
||||
<meta property="og:url" content="{{ url()->current() }}">
|
||||
@stack('social-meta')
|
||||
|
@@ -7,7 +7,7 @@
|
||||
@stop
|
||||
|
||||
@push('social-meta')
|
||||
<meta property="og:description" content="{{ Str::words($book->description, 50, '...') }}">
|
||||
<meta property="og:description" content="{{ Str::limit($book->description, 100, '...') }}">
|
||||
<meta property="og:image" content="{{ $book->getBookCover() }}">
|
||||
@endpush
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
@stop
|
||||
|
||||
@push('social-meta')
|
||||
<meta property="og:description" content="{{ Str::words($chapter->description, 50, '...') }}">
|
||||
<meta property="og:description" content="{{ Str::limit($chapter->description, 100) }}">
|
||||
<meta property="og:image" content="{{ $chapter->book->getBookCover() }}">
|
||||
@endpush
|
||||
|
||||
|
@@ -1,8 +1,11 @@
|
||||
@extends('tri-layout')
|
||||
|
||||
@push('social-meta')
|
||||
<meta property="og:description" content="{{ Str::words($page->html, 50, '...') }}">
|
||||
<meta property="og:description" content="{{ Str::limit($page->text, 100, '...') }}">
|
||||
<meta property="og:image" content="{{ $page->getCoverImage() }}">
|
||||
|
||||
|
||||
$pageContent->getNavigation($page->html);
|
||||
@endpush
|
||||
|
||||
@section('body')
|
||||
|
@@ -1,7 +1,7 @@
|
||||
@extends('tri-layout')
|
||||
|
||||
@push('social-meta')
|
||||
<meta property="og:description" content="{{ Str::words($shelf->description, 50, '...') }}">
|
||||
<meta property="og:description" content="{{ Str::limit($shelf->description, 100) }}">
|
||||
<meta property="og:image" content="{{ $shelf->getBookCover() }}">
|
||||
@endpush
|
||||
|
||||
|
Reference in New Issue
Block a user