@extends('layouts.app') @section('title', $page->title . ' - ' . $settings->site_name) @section('meta_description', $page->meta_description ?: ($settings->site_description ?: $page->title . ' - ' . $settings->site_name)) @section('content')

{{ $page->title }}

@if ($page->content) @php $raw = (string) $page->content; // Content that already has block-level HTML is shown as written. // Plain text gets blank lines -> paragraphs and single line breaks ->
. $html = preg_match('/<(p|h[1-6]|ul|ol|li|div|table|br|blockquote)\b /i', $raw) ? $raw : collect(preg_split('/(?:\r?\n){2,}/', trim($raw))) ->map(fn ($paragraph) => '

'.nl2br(trim($paragraph)).'

') ->implode(''); @endphp
{!! $html !!}
@else

{{__('This page has not been written yet')}}

@endif
@endsection