16 lines
340 B
TypeScript
16 lines
340 B
TypeScript
export type Publish =
|
|
| 'public'
|
|
| 'limited' // noindex
|
|
| 'private'; // noindex nofollow
|
|
|
|
export function robots(publish: Publish) {
|
|
switch (publish) {
|
|
case 'public':
|
|
return '';
|
|
case 'limited':
|
|
return 'noindex';
|
|
case 'private':
|
|
return 'noindex, nofollow';
|
|
}
|
|
}
|