Удалена старая версия главной страницы '/home-new' и обновлены мета-теги для главной страницы. Теперь главная страница использует динамическое получение мета-данных через getMetaByPath. Это улучшает SEO и упрощает управление мета-тегами.

This commit is contained in:
Bivekich
2025-07-06 18:51:43 +03:00
parent 8284385e3c
commit c7ba306a57
4 changed files with 82 additions and 77 deletions

View File

@ -253,14 +253,7 @@ export const metaConfig: Record<string, MetaConfig> = {
ogDescription: 'Читайте актуальные новости и статьи от компании Protek.'
},
// Главная страница (новая версия)
'/home-new': {
title: 'Protek - Автозапчасти и аксессуары (новая версия)',
description: 'Новый дизайн сайта Protek с улучшенным интерфейсом для поиска автозапчастей и аксессуаров.',
keywords: 'автозапчасти, новый дизайн, улучшенный интерфейс, protek',
ogTitle: 'Protek - Новая версия сайта',
ogDescription: 'Новый дизайн сайта Protek с улучшенным интерфейсом.'
},
// Поиск
'/search': {

View File

@ -1,42 +0,0 @@
import React from 'react';
import Head from 'next/head';
import CatalogSubscribe from "@/components/CatalogSubscribe";
import MobileMenuBottomSection from "@/components/MobileMenuBottomSection";
import NewsAndPromos from "@/components/index/NewsAndPromos";
import Footer from "@/components/Footer";
import IndexTopMenuNav from "@/components/index/IndexTopMenuNav";
import ProductOfDaySection from "@/components/index/ProductOfDaySection";
import CategoryNavSection from "@/components/index/CategoryNavSection";
import BrandSelectionSection from "@/components/index/BrandSelectionSection";
import BestPriceSection from "@/components/index/BestPriceSection";
import TopSalesSection from "@/components/index/TopSalesSection";
import PromoImagesSection from "@/components/index/PromoImagesSection";
import NewArrivalsSection from '@/components/index/NewArrivalsSection';
import SupportVinSection from '@/components/index/SupportVinSection';
import MetaTags from "@/components/MetaTags";
import { getMetaByPath } from "@/lib/meta-config";
export default function HomeNew () {
const metaData = getMetaByPath('/home-new');
return (
<>
<MetaTags {...metaData} />
<IndexTopMenuNav />
<ProductOfDaySection />
<CategoryNavSection />
<BrandSelectionSection />
<BestPriceSection />
<TopSalesSection />
<PromoImagesSection />
<NewArrivalsSection />
<SupportVinSection />
<NewsAndPromos />
<section className="section-3">
<CatalogSubscribe />
</section>
<Footer />
<MobileMenuBottomSection />
</>
);
}

59
src/pages/index-old.tsx Normal file
View File

@ -0,0 +1,59 @@
import Head from "next/head";
import Image from "next/image";
import { Geist, Geist_Mono } from "next/font/google";
import styles from "@/styles/Home.module.css";
import Header from "@/components/Header";
import Footer from "@/components/Footer";
import CatalogSubscribe from "@/components/CatalogSubscribe";
import MobileMenuBottomSection from "@/components/MobileMenuBottomSection";
import HeroSlider from "@/components/index/HeroSlider";
import CatalogSection from "@/components/index/CatalogSection";
import AvailableParts from "@/components/index/AvailableParts";
import NewsAndPromos from "@/components/index/NewsAndPromos";
import AboutHelp from "@/components/about/AboutHelp";
import MetaTags from "@/components/MetaTags";
import { getMetaByPath } from "@/lib/meta-config";
import JsonLdScript from "@/components/JsonLdScript";
import { generateOrganizationSchema, generateWebSiteSchema, PROTEK_ORGANIZATION } from "@/lib/schema";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export default function HomeOld() {
const metaData = getMetaByPath('/');
// Генерируем микроразметку для главной страницы
const organizationSchema = generateOrganizationSchema(PROTEK_ORGANIZATION);
const websiteSchema = generateWebSiteSchema(
"Protek - Автозапчасти и аксессуары",
"https://protek.ru",
"https://protek.ru/search"
);
return (
<>
<MetaTags {...metaData} />
<JsonLdScript schema={organizationSchema} />
<JsonLdScript schema={websiteSchema} />
<HeroSlider />
<CatalogSection />
<div className="w-layout-blockcontainer container w-container">
<AboutHelp />
</div>
<AvailableParts />
<NewsAndPromos />
<section className="section-3">
<CatalogSubscribe />
</section>
<Footer />
<MobileMenuBottomSection />
</>
);
}

View File

@ -1,31 +1,23 @@
import Head from "next/head";
import Image from "next/image";
import { Geist, Geist_Mono } from "next/font/google";
import styles from "@/styles/Home.module.css";
import Header from "@/components/Header";
import Footer from "@/components/Footer";
import React from 'react';
import Head from 'next/head';
import CatalogSubscribe from "@/components/CatalogSubscribe";
import MobileMenuBottomSection from "@/components/MobileMenuBottomSection";
import HeroSlider from "@/components/index/HeroSlider";
import CatalogSection from "@/components/index/CatalogSection";
import AvailableParts from "@/components/index/AvailableParts";
import NewsAndPromos from "@/components/index/NewsAndPromos";
import AboutHelp from "@/components/about/AboutHelp";
import Footer from "@/components/Footer";
import IndexTopMenuNav from "@/components/index/IndexTopMenuNav";
import ProductOfDaySection from "@/components/index/ProductOfDaySection";
import CategoryNavSection from "@/components/index/CategoryNavSection";
import BrandSelectionSection from "@/components/index/BrandSelectionSection";
import BestPriceSection from "@/components/index/BestPriceSection";
import TopSalesSection from "@/components/index/TopSalesSection";
import PromoImagesSection from "@/components/index/PromoImagesSection";
import NewArrivalsSection from '@/components/index/NewArrivalsSection';
import SupportVinSection from '@/components/index/SupportVinSection';
import MetaTags from "@/components/MetaTags";
import { getMetaByPath } from "@/lib/meta-config";
import JsonLdScript from "@/components/JsonLdScript";
import { generateOrganizationSchema, generateWebSiteSchema, PROTEK_ORGANIZATION } from "@/lib/schema";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export default function Home() {
const metaData = getMetaByPath('/');
@ -42,12 +34,15 @@ export default function Home() {
<MetaTags {...metaData} />
<JsonLdScript schema={organizationSchema} />
<JsonLdScript schema={websiteSchema} />
<HeroSlider />
<CatalogSection />
<div className="w-layout-blockcontainer container w-container">
<AboutHelp />
</div>
<AvailableParts />
<IndexTopMenuNav />
<ProductOfDaySection />
<CategoryNavSection />
<BrandSelectionSection />
<BestPriceSection />
<TopSalesSection />
<PromoImagesSection />
<NewArrivalsSection />
<SupportVinSection />
<NewsAndPromos />
<section className="section-3">
<CatalogSubscribe />