From 72329fb20c3bc7703590b85bd0c42ea32e7cfe61 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 29 Mar 2023 17:02:57 +0700 Subject: SEO --- src/core/components/Seo.jsx | 33 ++++++++++++++++--- src/pages/_document.jsx | 62 ++++++++++++++++++++++++++++++++++-- src/pages/about-us.jsx | 3 ++ src/pages/activate.jsx | 2 ++ src/pages/blog/[slug].jsx | 3 ++ src/pages/blog/index.jsx | 3 ++ src/pages/contact-us.jsx | 2 ++ src/pages/faqs.jsx | 2 ++ src/pages/index.jsx | 7 ++-- src/pages/login.jsx | 3 ++ src/pages/register.jsx | 3 ++ src/pages/shop/brands/[slug].jsx | 15 +++++++++ src/pages/shop/brands/index.jsx | 3 ++ src/pages/shop/cart.jsx | 3 ++ src/pages/shop/checkout/[status].jsx | 15 ++++++--- src/pages/shop/checkout/index.jsx | 29 ++++++++++------- src/pages/shop/product/[slug].jsx | 18 ++++++++++- src/pages/shop/quotation/finish.jsx | 5 +++ src/pages/shop/quotation/index.jsx | 29 ++++++++++------- src/pages/shop/search.jsx | 3 ++ src/pages/video.jsx | 3 ++ 21 files changed, 206 insertions(+), 40 deletions(-) diff --git a/src/core/components/Seo.jsx b/src/core/components/Seo.jsx index e688077e..0e224c19 100644 --- a/src/core/components/Seo.jsx +++ b/src/core/components/Seo.jsx @@ -1,10 +1,33 @@ -import Head from 'next/head' +import { NextSeo } from 'next-seo' +import { useRouter } from 'next/router' + +const Seo = ({ ...props }) => { + const router = useRouter() + + const { additionalMetaTags = [], openGraph = [], title = '' } = props -const Seo = ({ title }) => { return ( - - {title} - + ) } diff --git a/src/pages/_document.jsx b/src/pages/_document.jsx index bff2b1b2..ff205a38 100644 --- a/src/pages/_document.jsx +++ b/src/pages/_document.jsx @@ -1,9 +1,67 @@ import { Html, Head, Main, NextScript } from 'next/document' +import Script from 'next/script' -export default function Document() { +export default function MyDocument() { return ( - + + +