appolodev/bolt-seo
Composer 安装命令:
composer require appolodev/bolt-seo
包简介
Bolt - Seo extension
README 文档
README
The Bolt SEO extension is an extension to help you improve the search engine indexing of your Bolt website in a number of ways. It does this by:
- Allowing you to specify the SEO title and meta-description for your pages.
- Adding meta tags to your HTML to facilitate indexing of your pages using meta tags and OG tags.
- Override the canonical, if you really want to.
- Set the
<meta name="robots">-tag.
Compatibility
This extension supports different Bolt CMS versions depending on the major release:
- Bolt CMS 6 → Bolt SEO extension v2.x
- Bolt CMS 5 → Bolt SEO extension v1.x
This README documents usage for Bolt CMS 6.
Installation
composer require appolodev/bolt-seo
Setup
To use this extension, you should add a field to your contenttypes, and add the tags to the header of your HMTL templates.
In your contenttypes, you should add a single seo field. The extenion will
use this to store the data for the different fields that show in the backend
when editing a record. Simply add it to your fields like this;
pages: name: Pages singular_name: Page fields: [..] seo: type: seo group: "SEO settings"
You can assign the fields their own tab, using the group: 'SEO settings', to
keep them organised in the backend.
After you've done this, it will look like this in the Bolt backend:
To add the SEO title and Meta tags to your HTML, edit your templates (the 'master' or 'header') to have the following:
<title>{{ seo.title() }}</title> {{ seo.metatags() }}
When you've done this, all pages that make use of these templates will
automatically have the correct <title> tag and the meta- and OG-tags.
Configure the 'meta tags' output
By default, the output of the meta-tags is defined in the file
vendor/appolodev/bolt-seo/templates/_metatags.twig. If you'd like to
configure this output, you shouldn't edit this file directly. If you do,
changes will be overwritten on subsequent updates of this extension. Instead,
in /config/extensions/appolo-boltseo.yaml uncomment the following lines:
templates: meta: _metatags.twig
Next, copy the file _metatags.twig to your theme folder, and the extension
will pick it up from there.
Note: This is a new extension, so the functionality is still pretty bare bones. What's there works well, but there is probably a lot of functionality to add, to improve search engine indexing. If you'd like to contribute, or have a good idea, feel free to open an issue on the tracker at the SEO Extension repository on Github.
Contributors
- Bob den Otter: Thanks to him to allow me to use his original extension Bolt SEO
appolodev/bolt-seo 适用场景与选型建议
appolodev/bolt-seo 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16.51k 次下载、GitHub Stars 达 12, 最近一次更新时间为 2020 年 11 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 appolodev/bolt-seo 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 appolodev/bolt-seo 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 16.51k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-11-23
