mirror of
https://gitlab.com/foxixus/neomovies.git
synced 2025-10-28 01:48:50 +05:00
Improve SEO
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { Inter } from 'next/font/google';
|
||||
import Script from 'next/script';
|
||||
import './globals.css';
|
||||
import { DefaultSeo } from 'next-seo';
|
||||
import SEO from '@/next-seo.config';
|
||||
import { ClientLayout } from '@/components/ClientLayout';
|
||||
import { Providers } from '@/components/Providers';
|
||||
import type { Metadata } from 'next';
|
||||
@@ -23,6 +25,9 @@ export default function RootLayout({
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta name="darkreader-lock" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/public/logo.png" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
|
||||
{/* Google tag (gtag.js) */}
|
||||
<Script
|
||||
@@ -61,6 +66,7 @@ export default function RootLayout({
|
||||
></iframe>
|
||||
</noscript>
|
||||
{/* End Google Tag Manager (noscript) */}
|
||||
<DefaultSeo {...SEO} />
|
||||
<Providers>
|
||||
<ClientLayout>{children}</ClientLayout>
|
||||
</Providers>
|
||||
|
||||
@@ -11,6 +11,7 @@ import FavoriteButton from '@/components/FavoriteButton';
|
||||
import Reactions from '@/components/Reactions';
|
||||
import { formatDate } from '@/lib/utils';
|
||||
import { PlayCircle, ArrowLeft } from 'lucide-react';
|
||||
import { NextSeo } from 'next-seo';
|
||||
|
||||
interface MovieContentProps {
|
||||
movieId: string;
|
||||
@@ -62,6 +63,39 @@ export default function MovieContent({ movieId, initialMovie }: MovieContentProp
|
||||
|
||||
return (
|
||||
<>
|
||||
<NextSeo
|
||||
title={`${movie.title} смотреть онлайн`}
|
||||
description={movie.overview?.slice(0, 150)}
|
||||
canonical={`https://neomovies.ru/movie/${movie.id}`}
|
||||
openGraph={{
|
||||
url: `https://neomovies.ru/movie/${movie.id}`,
|
||||
images: [
|
||||
{
|
||||
url: getImageUrl(movie.poster_path, 'w780'),
|
||||
alt: movie.title,
|
||||
},
|
||||
],
|
||||
}}
|
||||
/>
|
||||
{/* schema.org Movie */}
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: JSON.stringify({
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'Movie',
|
||||
name: movie.title,
|
||||
image: getImageUrl(movie.poster_path, 'w780'),
|
||||
description: movie.overview,
|
||||
datePublished: movie.release_date,
|
||||
aggregateRating: {
|
||||
'@type': 'AggregateRating',
|
||||
ratingValue: movie.vote_average,
|
||||
ratingCount: movie.vote_count,
|
||||
},
|
||||
}),
|
||||
}}
|
||||
/>
|
||||
<div className="min-h-screen bg-background text-foreground px-4 py-6 md:px-6 lg:px-8">
|
||||
<div className="w-full">
|
||||
<div className="grid grid-cols-1 gap-8 md:grid-cols-3">
|
||||
|
||||
@@ -11,6 +11,7 @@ import FavoriteButton from '@/components/FavoriteButton';
|
||||
import Reactions from '@/components/Reactions';
|
||||
import { formatDate } from '@/lib/utils';
|
||||
import { PlayCircle, ArrowLeft } from 'lucide-react';
|
||||
import { NextSeo } from 'next-seo';
|
||||
|
||||
interface TVContentProps {
|
||||
showId: string;
|
||||
@@ -69,6 +70,39 @@ export default function TVContent({ showId, initialShow }: TVContentProps) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<NextSeo
|
||||
title={`${show.name} смотреть онлайн`}
|
||||
description={show.overview?.slice(0, 150)}
|
||||
canonical={`https://neomovies.ru/tv/${show.id}`}
|
||||
openGraph={{
|
||||
url: `https://neomovies.ru/tv/${show.id}`,
|
||||
images: [
|
||||
{
|
||||
url: getImageUrl(show.poster_path, 'w780'),
|
||||
alt: show.name,
|
||||
},
|
||||
],
|
||||
}}
|
||||
/>
|
||||
{/* schema.org TVSeries */}
|
||||
<script
|
||||
type="application/ld+json"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: JSON.stringify({
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'TVSeries',
|
||||
name: show.name,
|
||||
image: getImageUrl(show.poster_path, 'w780'),
|
||||
description: show.overview,
|
||||
numberOfSeasons: show.number_of_seasons,
|
||||
aggregateRating: {
|
||||
'@type': 'AggregateRating',
|
||||
ratingValue: show.vote_average,
|
||||
ratingCount: show.vote_count,
|
||||
},
|
||||
}),
|
||||
}}
|
||||
/>
|
||||
<div className="min-h-screen bg-background text-foreground px-4 py-6 md:px-6 lg:px-8">
|
||||
<div className="w-full">
|
||||
<div className="grid grid-cols-1 gap-8 md:grid-cols-3">
|
||||
|
||||
Reference in New Issue
Block a user