我正在尝试向我的 Laravel 页面添加描述和关键字。
这种方式行得通吗?或者有什么问题?
@section('title')
{{trans('strings.About')}}
@stop
@section('description', 'Share text and photos with your friends and have fun')
@section('keywords', 'sharing, sharing text, text, sharing photo, photo,')
@section('robots', 'index, follow')
@section('revisit-after', 'content="3 days')
原文由 Oleg Grytsenko 发布,翻译遵循 CC BY-SA 4.0 许可协议
您是否正在扩展另一个使用所有这些
sections
的模板?他们不会自己工作,他们需要在另一个模板中填充占位符。它应该是这样的:
然后你的模板应该扩展另一个模板。
至少,这就是我阅读他们文档的方式: https ://laravel.com/docs/5.2/blade