feat: complete admin url query sync, full sorting/filters, latin search, product media players, personalized pet name and stage noindex
Deploy Canina / deploy (push) Successful in 1m57s
Deploy Canina / deploy (push) Successful in 1m57s
This commit is contained in:
1 parent
d5c05b7577
commit
27a1517464
23 files changed
+168815
-46100
No files matched your search
@@ -36,6 +36,15 @@ export async function generateMetadata(): Promise<Metadata> {
|
||||
|
||||
const ogImg = seoSettings?.ogImageUrl || '/assets/images/regenerated_image_1779109861747.png';
|
||||
|
||||
const isStaging =
|
||||
process.env.NEXT_PUBLIC_APP_ENV === 'staging' ||
|
||||
process.env.NODE_ENV !== 'production' ||
|
||||
(typeof process.env.NEXT_PUBLIC_SITE_URL === 'string' && (
|
||||
process.env.NEXT_PUBLIC_SITE_URL.includes('stage') ||
|
||||
process.env.NEXT_PUBLIC_SITE_URL.includes('test') ||
|
||||
process.env.NEXT_PUBLIC_SITE_URL.includes('dev')
|
||||
));
|
||||
|
||||
return {
|
||||
metadataBase: new URL(siteUrl),
|
||||
title: {
|
||||
@@ -47,6 +56,26 @@ export async function generateMetadata(): Promise<Metadata> {
|
||||
authors: [{ name: 'Canina Iran' }],
|
||||
creator: 'Canina Iran',
|
||||
publisher: 'Canina Iran',
|
||||
robots: isStaging ? {
|
||||
index: false,
|
||||
follow: false,
|
||||
nocache: true,
|
||||
googleBot: {
|
||||
index: false,
|
||||
follow: false,
|
||||
noimageindex: true,
|
||||
}
|
||||
} : {
|
||||
index: true,
|
||||
follow: true,
|
||||
googleBot: {
|
||||
index: true,
|
||||
follow: true,
|
||||
'max-video-preview': -1,
|
||||
'max-image-preview': 'large',
|
||||
'max-snippet': -1,
|
||||
}
|
||||
},
|
||||
alternates: {
|
||||
canonical: '/',
|
||||
},
|
||||
@@ -77,17 +106,6 @@ export async function generateMetadata(): Promise<Metadata> {
|
||||
description: descriptionDefault,
|
||||
images: [ogImg],
|
||||
},
|
||||
robots: {
|
||||
index: true,
|
||||
follow: true,
|
||||
googleBot: {
|
||||
index: true,
|
||||
follow: true,
|
||||
'max-video-preview': -1,
|
||||
'max-image-preview': 'large',
|
||||
'max-snippet': -1,
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
import { MetadataRoute } from 'next';
|
||||
|
||||
export default function robots(): MetadataRoute.Robots {
|
||||
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://canino-iran.com';
|
||||
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://canina-iran.com';
|
||||
const isStaging =
|
||||
process.env.NEXT_PUBLIC_APP_ENV === 'staging' ||
|
||||
process.env.NODE_ENV !== 'production' ||
|
||||
baseUrl.includes('stage') ||
|
||||
baseUrl.includes('test') ||
|
||||
baseUrl.includes('dev');
|
||||
|
||||
if (isStaging) {
|
||||
return {
|
||||
rules: {
|
||||
userAgent: '*',
|
||||
disallow: '/',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
rules: {
|
||||
|
||||
Reference in new issue
Block a user