seo improvements
This commit is contained in:
@@ -8,8 +8,10 @@ use App\Models\Category;
|
|||||||
use App\Models\Summary;
|
use App\Models\Summary;
|
||||||
use App\Models\Author;
|
use App\Models\Author;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Psr\Log\LogLevel;
|
||||||
|
|
||||||
class IngestController extends Controller
|
class IngestController extends Controller
|
||||||
{
|
{
|
||||||
@@ -21,6 +23,8 @@ class IngestController extends Controller
|
|||||||
{
|
{
|
||||||
$payload = $request->all();
|
$payload = $request->all();
|
||||||
|
|
||||||
|
Log::log(LogLevel::INFO, "Updating books...".json_encode($payload));
|
||||||
|
|
||||||
// Normalize to array of items
|
// Normalize to array of items
|
||||||
$items = [];
|
$items = [];
|
||||||
if (isset($payload['books']) && is_array($payload['books'])) {
|
if (isset($payload['books']) && is_array($payload['books'])) {
|
||||||
|
|||||||
@@ -1,5 +1,37 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
{{ $book->title }}
|
||||||
|
by
|
||||||
|
@if($book->authors && $book->authors->count())
|
||||||
|
{{ $book->authors->pluck('name')->join(', ') }}
|
||||||
|
@elseif($book->author)
|
||||||
|
{{ $book->author }}
|
||||||
|
@endif
|
||||||
|
- Summary by OpenTextSummaries
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('meta_description')
|
||||||
|
@php
|
||||||
|
$raw = '';
|
||||||
|
if ($book->summary && $book->summary->content) {
|
||||||
|
$raw = strip_tags($book->summary->content);
|
||||||
|
} elseif (!empty($book->description)) {
|
||||||
|
$raw = strip_tags($book->description);
|
||||||
|
} else {
|
||||||
|
$authorNames = '';
|
||||||
|
if ($book->authors && $book->authors->count()) {
|
||||||
|
$authorNames = $book->authors->pluck('name')->join(', ');
|
||||||
|
} elseif (!empty($book->author)) {
|
||||||
|
$authorNames = $book->author;
|
||||||
|
}
|
||||||
|
$raw = trim($book->title . ($authorNames ? ' by ' . $authorNames : '') . ' — summary and key insights.');
|
||||||
|
}
|
||||||
|
$desc = \Illuminate\Support\Str::limit(preg_replace('/\s+/', ' ', $raw), 160, '…');
|
||||||
|
@endphp
|
||||||
|
{{ $desc }}
|
||||||
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<article class="bg-white rounded-lg shadow overflow-hidden">
|
<article class="bg-white rounded-lg shadow overflow-hidden">
|
||||||
<div class="md:flex">
|
<div class="md:flex">
|
||||||
@@ -81,6 +113,10 @@
|
|||||||
@endauth
|
@endauth
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
<div class="mt-8 pt-6 border-t">
|
||||||
|
@include('layouts.donate_widget')
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="mt-8 pt-6 border-t">
|
<div class="mt-8 pt-6 border-t">
|
||||||
<h3 class="text-lg font-semibold mb-2">Is this summary inaccurate?</h3>
|
<h3 class="text-lg font-semibold mb-2">Is this summary inaccurate?</h3>
|
||||||
@auth
|
@auth
|
||||||
|
|||||||
@@ -18,7 +18,8 @@
|
|||||||
<!-- CSRF Token -->
|
<!-- CSRF Token -->
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
|
||||||
<title>{{ config('app.name', 'OpenTextSummaries') }}</title>
|
<title>@yield('page_title', config('app.name', 'OpenTextSummaries'))</title>
|
||||||
|
<meta name="description" content="@yield('meta_description', 'OpenTextSummaries provides free, concise book summaries, key insights, and community reviews to help you learn faster.')">
|
||||||
|
|
||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||||
|
|||||||
@@ -1,9 +1,17 @@
|
|||||||
<div class="donate-widget">
|
<div class="donate-widget">
|
||||||
<div class="alert alert-info">
|
<div class="bg-teal-100 border-t-4 border-teal-500 rounded-b text-teal-900 px-4 py-3 shadow-md" role="alert">
|
||||||
👋 Hi! My name is Mike and I am the creator of OpenTextSummaries.
|
<div class="flex">
|
||||||
I love books, so I built this website to check great books.
|
<div class="py-1"><svg class="fill-current h-6 w-6 text-teal-500 mr-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM9 11V9h2v6H9v-4zm0-6h2v2H9V5z"/></svg></div>
|
||||||
OpenTextSummaries was founded in August 2025 and is processing the <a href="https://www.gutenberg.org/" target="_blank">Gutenberg</a> library.
|
<div>
|
||||||
Your support helps me maintain and add features to OpenTextSummaries.
|
<p class="font-bold">Site made by a Indie dev</p>
|
||||||
<script type='text/javascript' src='https://storage.ko-fi.com/cdn/widget/Widget_2.js'></script><script type='text/javascript'>kofiwidget2.init('Support me on Ko-fi', '#6492e3', 'N4N5QCI6A');kofiwidget2.draw();</script>
|
<p class="text-sm">
|
||||||
|
👋 Hi! My name is Mike and I am the creator of OpenTextSummaries.
|
||||||
|
I love books, so I built this website to check great books.
|
||||||
|
OpenTextSummaries was founded in August 2025 and is processing the <a href="https://www.gutenberg.org/" target="_blank">Gutenberg</a> library.
|
||||||
|
Your support helps me maintain and add features to OpenTextSummaries.
|
||||||
|
<script type='text/javascript' src='https://storage.ko-fi.com/cdn/widget/Widget_2.js'></script><script type='text/javascript'>kofiwidget2.init('Support me on Ko-fi', '#6492e3', 'N4N5QCI6A');kofiwidget2.draw();</script>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
About - OpenTextSummaries
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('meta_description')
|
||||||
|
Learn about OpenTextSummaries — our mission is to make knowledge accessible with concise, readable book summaries and key insights.
|
||||||
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="max-w-3xl mx-auto">
|
<div class="max-w-3xl mx-auto">
|
||||||
<h1 class="text-3xl font-bold text-indigo-700 mb-4">About</h1>
|
<h1 class="text-3xl font-bold text-indigo-700 mb-4">About</h1>
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
Contact - OpenTextSummaries
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('meta_description')
|
||||||
|
Get in touch with the OpenTextSummaries team — questions, feedback, or partnership inquiries.
|
||||||
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="max-w-xl mx-auto">
|
<div class="max-w-xl mx-auto">
|
||||||
<h1 class="text-3xl font-bold text-indigo-700 mb-4">Contact</h1>
|
<h1 class="text-3xl font-bold text-indigo-700 mb-4">Contact</h1>
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
Privacy - OpenTextSummaries
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('meta_description')
|
||||||
|
Read the OpenTextSummaries Privacy Policy — what data we collect, how we use it, and your choices.
|
||||||
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="max-w-3xl mx-auto">
|
<div class="max-w-3xl mx-auto">
|
||||||
<h1 class="text-3xl font-bold text-indigo-700 mb-4">Privacy Policy</h1>
|
<h1 class="text-3xl font-bold text-indigo-700 mb-4">Privacy Policy</h1>
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
Terms Of Use - OpenTextSummaries
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('meta_description')
|
||||||
|
Review the OpenTextSummaries Terms of Service — your responsibilities and the rules for using the site.
|
||||||
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="max-w-3xl mx-auto">
|
<div class="max-w-3xl mx-auto">
|
||||||
<h1 class="text-3xl font-bold text-indigo-700 mb-4">Terms of Service</h1>
|
<h1 class="text-3xl font-bold text-indigo-700 mb-4">Terms of Service</h1>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<title>{{ config('app.name', 'Open Text Summaries') }}</title>
|
<title>{{ config('app.name', 'Open Text Summaries') }}</title>
|
||||||
|
<meta name="description" content="OpenTextSummaries offers free, concise book summaries and key insights to help you learn faster and discover great books.">
|
||||||
|
|
||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||||
|
|||||||
Reference in New Issue
Block a user