Skip to content

Commit 3a7c3a7

Browse files
committed
feat: enabled support for robots
1 parent 5acd14b commit 3a7c3a7

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/components/partials/Head.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const seoImage = generateAbsoluteUrl(image.src);
2626
<meta name="keywords" content={seo?.keywords || defaultSeo.keywords} />
2727
</slot>
2828
<meta name="generator" content={Astro.generator} />
29+
<meta name="robots" content={seo?.robots || defaultSeo.robots} />
2930
<!-- OpenGraph Meta -->
3031
<meta property="og:type" content={seo?.type ?? 'website'} />
3132
<meta property="og:site_name" content={defaultSeo.title} />

src/content.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ export const seoSchemaWithoutImage = z.object({
1010
canonicalUrl: z.string().optional(),
1111
twitter: z.object({
1212
creator: z.string().optional(),
13-
}).optional()
13+
}).optional(),
14+
robots: z.string().optional(),
1415
})
1516

1617
const seoSchema = (image: ImageFunction) =>

src/lib/constants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export const DEFAULT_CONFIGURATION: DefaultConfigurationType = {
4444
image: MetaDefaultImage,
4545
twitter: {
4646
creator: '@cvfolio'
47-
}
47+
},
48+
robots: 'index, follow',
4849
}
4950
};

0 commit comments

Comments
 (0)