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

@ -83,6 +83,7 @@ class BoardAdminController extends Board {
$args->skip_bottom_list_days = max(0, intval($args->skip_bottom_list_days));
$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));
$args->header_text = Rhymix\Modules\Admin\Models\Utility::cleanHeaderAndFooterScripts($args->header_text ?? '');