fix(seo): block gallery from image indexing and remove facebook/tiktok from hero
This commit is contained in:
1 parent
974863e237
commit
3c0654e030
5 files changed
+31
-13
No files matched your search
@@ -80,13 +80,14 @@ export default function Hero({
|
||||
}
|
||||
};
|
||||
|
||||
const linksToRender = socialLinks.length > 0
|
||||
const linksToRender = (socialLinks.length > 0
|
||||
? socialLinks.filter(l => l.showInHero !== false)
|
||||
: [
|
||||
{ platform: "GitHub", url: "https://github.com/ssbg04", icon: "github", order: 1 },
|
||||
{ platform: "LinkedIn", url: "https://www.linkedin.com/in/cris-charles-garcia/", icon: "linkedin", order: 2 },
|
||||
{ platform: "Email", url: "mailto:crischarlesgarcia345@gmail.com", icon: "mail", order: 3 }
|
||||
];
|
||||
]
|
||||
).filter(l => !['facebook', 'tiktok'].includes(l.platform.toLowerCase()));
|
||||
|
||||
const dayImg = heroImage || (ppDay as any).src || ppDay;
|
||||
const nightImg = heroImageNight || heroImage || (ppNight as any).src || ppNight;
|
||||
|
||||
@@ -30,20 +30,24 @@ const imagePath = image.startsWith('http')
|
||||
|
||||
const socialImageURL = new URL(imagePath, siteOrigin).href;
|
||||
|
||||
const isGalleryPage = Astro.url.pathname.startsWith('/gallery');
|
||||
|
||||
const isIndexablePage =
|
||||
!isGalleryPage &&
|
||||
!Astro.url.pathname.startsWith('/api/') &&
|
||||
!Astro.url.pathname.startsWith('/maintenance') &&
|
||||
!Astro.url.pathname.startsWith('/_astro') &&
|
||||
!Astro.url.pathname.startsWith('/_image');
|
||||
|
||||
const robotsValue = isIndexablePage
|
||||
? 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1'
|
||||
: 'noindex, nofollow';
|
||||
const robotsValue = isGalleryPage
|
||||
? 'noindex, noimageindex, nofollow'
|
||||
: isIndexablePage
|
||||
? 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1'
|
||||
: 'noindex, nofollow';
|
||||
|
||||
const socialProfiles = [
|
||||
'https://github.com/ssbg04',
|
||||
'https://www.facebook.com/kristyarls345/',
|
||||
'https://www.tiktok.com/@sisibigi',
|
||||
'https://www.linkedin.com/in/cris-charles-garcia/',
|
||||
'https://crischarles.com',
|
||||
];
|
||||
|
||||
@@ -64,11 +68,6 @@ const navigationElements = [
|
||||
description: 'Verified credentials and certifications earned by Cris Charles Garcia from Cisco and other industry-recognized programs.',
|
||||
path: '/certifications'
|
||||
},
|
||||
{
|
||||
name: 'Gallery',
|
||||
description: 'Visual showcase and photo archive of project milestones, developer activities, and academic experiences.',
|
||||
path: '/gallery'
|
||||
},
|
||||
{
|
||||
name: 'Contact',
|
||||
description: 'Get in touch with Cris Charles Garcia for development inquiries, consulting, or project collaborations.',
|
||||
|
||||
+3
-1
@@ -549,12 +549,14 @@ export async function getSocialLinks(): Promise<SocialLink[]> {
|
||||
else if (iconKey.includes('linkedin')) iconKey = 'linkedin';
|
||||
else if (iconKey.includes('mail') || iconKey.includes('email')) iconKey = 'mail';
|
||||
|
||||
const isSocialMedia = ['facebook', 'tiktok'].includes(platformName.toLowerCase());
|
||||
|
||||
return {
|
||||
platform: platformName,
|
||||
url: l.url || '#',
|
||||
icon: iconKey,
|
||||
order: typeof l.order === 'number' ? l.order : idx + 1,
|
||||
showInHero: l.showInHero ?? true,
|
||||
showInHero: isSocialMedia ? false : (l.showInHero ?? true),
|
||||
showInFooter: l.showInFooter ?? true,
|
||||
showInLinksPage: l.showInLinksPage ?? true
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user