File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,8 @@ export async function generateMetadata(props: MetadataProps): Promise<Metadata>
209209 ? [ { url : `${ previewDomain ?? domain } /og.png` , width : 1200 , height : 630 } ]
210210 : [ ] ;
211211
212+ let noindex : undefined | boolean = undefined ;
213+
212214 const rootNode = await getDocsRootNode ( ) ;
213215
214216 if ( params . path ) {
@@ -227,6 +229,8 @@ export async function generateMetadata(props: MetadataProps): Promise<Metadata>
227229 if ( pageNode . frontmatter . customCanonicalTag ) {
228230 customCanonicalTag = formatCanonicalTag ( pageNode . frontmatter . customCanonicalTag ) ;
229231 }
232+
233+ noindex = pageNode . frontmatter . noindex ;
230234 }
231235 }
232236
@@ -253,5 +257,6 @@ export async function generateMetadata(props: MetadataProps): Promise<Metadata>
253257 alternates : {
254258 canonical,
255259 } ,
260+ robots : noindex ? 'noindex' : undefined ,
256261 } ;
257262}
You can’t perform that action at this time.
0 commit comments