Add option to control whether boards and pages are indexed by search engines, using the X-Robots-Tag header

This commit is contained in:
Kijin Sung 2023-08-13 02:03:02 +09:00
parent fde3609f70
commit 2197b0a982
7 changed files with 37 additions and 9 deletions

View file

@ -38,6 +38,7 @@ class PageAdminController extends Page
if($args->use_mobile != 'Y') $args->use_mobile = '';
$args->browser_title = trim(utf8_normalize_spaces($args->browser_title));
$args->robots_tag = ($args->robots_tag === 'noindex') ? 'noindex' : 'all';
$args->meta_keywords = $args->meta_keywords ? implode(', ', array_map('trim', explode(',', $args->meta_keywords))) : '';
$args->meta_description = trim(utf8_normalize_spaces($args->meta_description));