updates
This commit is contained in:
@@ -17,8 +17,8 @@ export const SITE_CONFIG = {
|
||||
country: 'Bulgaria',
|
||||
},
|
||||
social: {
|
||||
linkedin: 'https://www.linkedin.com/company/gnxtech',
|
||||
github: 'https://github.com/gnxtech',
|
||||
linkedin: 'https://linkedin.com',
|
||||
github: 'https://github.com',
|
||||
},
|
||||
businessHours: 'Monday - Friday: 9:00 AM - 6:00 PM PST',
|
||||
foundedYear: 2020,
|
||||
@@ -90,6 +90,15 @@ export function generateMetadata({
|
||||
const pageUrl = url ? `${SITE_CONFIG.url}${url}` : SITE_CONFIG.url;
|
||||
const allKeywords = [...DEFAULT_SEO.keywords, ...keywords];
|
||||
|
||||
// Safely create metadataBase URL
|
||||
let metadataBase: URL;
|
||||
try {
|
||||
metadataBase = new URL(SITE_CONFIG.url);
|
||||
} catch (e) {
|
||||
// Fallback to a default URL if SITE_CONFIG.url is invalid
|
||||
metadataBase = new URL('https://gnxsoft.com');
|
||||
}
|
||||
|
||||
const metadata: Metadata = {
|
||||
title: pageTitle,
|
||||
description: pageDescription,
|
||||
@@ -112,7 +121,7 @@ export function generateMetadata({
|
||||
address: false,
|
||||
telephone: false,
|
||||
},
|
||||
metadataBase: new URL(SITE_CONFIG.url),
|
||||
metadataBase: metadataBase,
|
||||
alternates: {
|
||||
canonical: pageUrl,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user