Add breadcrumbs to site documentation views
- Integrate breadcrumb rendering across documentation views (`index`, `category`, `view`, and `no-default-version`). - Add support for dynamic JSON-LD breadcrumb generation.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
@section('meta_title', $category->content?->title . ' - ' . $project->name . ' ' . $version->title)
|
||||
@section('h1', $category->content?->title)
|
||||
|
||||
@section('breadcrumbs', Breadcrumbs::render('documentation.category', $project, $websiteTranslations, $version, $category, $categoryPath))
|
||||
@push('head')
|
||||
{{ Breadcrumbs::view('breadcrumbs::json-ld', 'documentation.category', $project, $websiteTranslations, $version, $category, $categoryPath) }}
|
||||
@endpush
|
||||
<x-site.layout :project="$project" :websiteTranslations="$websiteTranslations" :documentationVersion="$version">
|
||||
@foreach($categories as $category)
|
||||
@continue(! $category->content?->title)
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
@section('meta_title', $websiteTranslations->translate('site.Documentation') . ' - ' . $project->name . ' ' . $version->title)
|
||||
@section('h1', $websiteTranslations->translate('site.Documentation'))
|
||||
|
||||
@section('breadcrumbs', Breadcrumbs::render('documentation.index', $project, $websiteTranslations, $version))
|
||||
@push('head')
|
||||
{{ Breadcrumbs::view('breadcrumbs::json-ld', 'documentation.index', $project, $websiteTranslations, $version) }}
|
||||
@endpush
|
||||
<x-site.layout :project="$project" :websiteTranslations="$websiteTranslations" :documentationVersion="$version">
|
||||
@foreach($categories as $category)
|
||||
@continue(! $category->content?->title)
|
||||
|
||||
+4
-1
@@ -1,6 +1,9 @@
|
||||
@section('meta_title', $websiteTranslations->translate('site.Documentation not created'))
|
||||
@section('h1', $websiteTranslations->translate('site.Documentation not created'))
|
||||
|
||||
@section('breadcrumbs', Breadcrumbs::render('documentation.no-default-version', $project, $websiteTranslations))
|
||||
@push('head')
|
||||
{{ Breadcrumbs::view('breadcrumbs::json-ld', 'documentation.no-default-version', $project, $websiteTranslations) }}
|
||||
@endpush
|
||||
<x-site.layout :project="$project" :websiteTranslations="$websiteTranslations">
|
||||
|
||||
</x-site.layout>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
@section('meta_title', $documentation->content?->title . ' - ' . $project->name . ' ' . $version->title)
|
||||
@section('h1', $documentation->content?->title)
|
||||
|
||||
@section('breadcrumbs', Breadcrumbs::render('documentation.view', $project, $websiteTranslations, $version, $documentation, $categoryPath))
|
||||
@push('head')
|
||||
{{ Breadcrumbs::view('breadcrumbs::json-ld', 'documentation.view', $project, $websiteTranslations, $version, $documentation, $categoryPath) }}
|
||||
@endpush
|
||||
<x-site.layout :project="$project" :websiteTranslations="$websiteTranslations" :documentationVersion="$version">
|
||||
<div class="line-numbers">{!! $documentation->content->content !!}</div>
|
||||
@push('scripts')
|
||||
|
||||
Reference in New Issue
Block a user