安装完flarum你会发现后台配置的描述并没有显示。
<meta name="description" content="">
这对seo会有影响,需要能显示它。
修改vendor/flarum/core/src/Http/WebApp/WebAppView.php:
$view->description = array_get($forum, 'data.attributes.description');//原本是$this->description,但是这个类属性并没赋值,所以前台header就会变成空的。修复一下,使它能赋值成我们设置的。
自此,你就能看到描述了。
<meta name="description" content="提供交流的社区">
可添加功能:
keyword配置。
链接:
原贴