feat: Added ability to set page meta description

This commit is contained in:
Roman Kelesidis 2025-05-31 09:29:34 +03:00
commit 0afd52c8d4
2 changed files with 6 additions and 0 deletions

View file

@ -123,6 +123,7 @@ $template->assign_vars([
'USE_TABLESORTER' => !empty($page_cfg['use_tablesorter']),
'ALLOW_ROBOTS' => !$bb_cfg['board_disable'] && (!isset($page_cfg['allow_robots']) || $page_cfg['allow_robots'] === true),
'META_DESCRIPTION' => $page_cfg['meta_description'] ?? '',
'SITENAME' => $bb_cfg['sitename'],
'U_INDEX' => BB_ROOT . 'index.php',

View file

@ -5,6 +5,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="initial-scale=1.0">
<meta name="generator" content="{#APP_NAME#}">
<!-- IF META_DESCRIPTION -->
<meta name="description" content="{META_DESCRIPTION}"/>
<meta property="og:description" content="{META_DESCRIPTION}">
<meta property="twitter:description" content="{META_DESCRIPTION}">
<!-- ENDIF -->
<title><!-- IF HAVE_NEW_PM -->({HAVE_NEW_PM}) <!-- ENDIF --><!-- IF PAGE_TITLE -->{PAGE_TITLE} :: {SITENAME}<!-- ELSE -->{SITENAME}<!-- ENDIF --></title>
<meta name="apple-mobile-web-app-title" content="{SITENAME}">
<meta name="application-name" content="{SITENAME}"/>