gioppy/statamic-metatags
Composer 安装命令:
composer require gioppy/statamic-metatags
包简介
An addon for Statamic 3 to manage and customize any meta tag.
README 文档
README
This is an add-on for Statamic 5. It gives the ability to manage and customize almost every created meta tags!
Supperted Meta tags
- Classic meta tags, mainly used by search engines
- Site verification
- Dublin core
Google +Google CSE- Google Search
- Open Graph
- Facebook App
- App links
- Mobile and UI related
- Apple proprietary
- Android proprietary
- Favicons
If you think that some meta tags are missing, open a PR!
Installation
composer require gioppy/statamic-metatags
If you are on an older version of Statamic, please use one of these depending on your installed version.
Statamic < 3.3
composer require gioppy/statamic-metatags "^1.0.4"
Statamic >= 3.3 and < 4.0
composer require gioppy/statamic-metatags "^2.0"
Statamic >= 4.0 and < 5.0
composer require gioppy/statamic-metatags "^3.0"
Statamic >= 5.0 and < 6.0
composer require gioppy/statamic-metatags "^4.0"
How to use
All meta tags are injected dynamically within an entry or term depending on the options selected for each individual blueprint.
In the blueprints section, under Meta Tags, you can select all the categories you want to activate for each individual blueprint. At the moment it is possible to enable meta tags only for collections and taxonomies.
In your template, remove the title tag in layout.antlers.html. For every category of meta tags you have a antlers tag to use it:
{{ metatags:basic }}
{{ metatags:advanced }}
{{ metatags:dublin_core }}
{{ metatags:dublin_core_advanced }}
{{ metatags:opengraph }}
{{ metatags:facebook }}
{{ metatags:twitter }}
{{ metatags:pinterest }}
{{ metatags:google_search }}
{{ metatags:site_verifications }}
{{ metatags:app_links }}
{{ metatags:mobile }}
{{ metatags:apple }}
{{ metatags:android }}
{{ metatags:favicons }}
Upgrade from previous versions
Upgrading from previous versions should not cause you to lose any data within entries or terms. However, you will need to re-configure all meta tags within all blueprints.
First clear the fieldset metatags from all your blueprints. Make sure not to save any content at this stage otherwise your meta tags will be deleted!
Set the meta tags you want to use for each blueprint and the common meta tags.
Check that, by editing an entry or term, you correctly see the newly SEO tab and the values of the meta tags fields.
Edit your layout.antlers.html by replacing the {{ metatags }} tag with new antlers tags, depending on the categories you have enabled.
Warning
Google+ and Google CSE meta tags are no longer available!
Credits
The add-on was inspired by the excelent Metatag Drupal module.
gioppy/statamic-metatags 适用场景与选型建议
gioppy/statamic-metatags 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11.25k 次下载、GitHub Stars 达 6, 最近一次更新时间为 2020 年 09 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 gioppy/statamic-metatags 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 gioppy/statamic-metatags 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 11.25k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2020-09-07