arillo/silverstripe-metatags
Composer 安装命令:
composer require arillo/silverstripe-metatags
包简介
Metatags for SilverStripe
关键字:
README 文档
README
Better metatags for your SilverStripe Projects.
The module will add a $MetaImage to each page and a fallback $MetaImage to the $SiteConfig that will be used if no image is defined on a particular page (to avoid this behavior do not fill in the $SiteConfig.MetaImage in the CMS). It will automatically generate OpenGraph and Twitter meta tags based on pages $MetaDescription.
Requirements
| CMS version | Branch / version |
|---|---|
| SilverStripe CMS ^6 | master (3.x-dev) — you are here |
| SilverStripe CMS ^4 || ^5 | 2.x |
| SilverStripe CMS ^3 | 1.x |
PHP ^8.3 required for the SS6 master line.
Usage
Install with composer:
composer require arillo/silverstripe-metatags
or clone the repo:
git clone git@github.com:arillo/silverstripe-metatags.git
Configure the extension:
Arillo\MetaTags\MetaTagsExtension: titles_by_pagetype: Default: <% if $MetaTitle %>$MetaTitle<% else %>$Title<% end_if %> / $SiteConfig.Title # Define the default <title> tag pattern. (Defaults to $Title) HomePage: <% if $MetaTitle %>$MetaTitle<% else %>$Title<% end_if %> # Exception for the HomePage page-type ProductsPage: $Item.Title # Pattern for a DataObject
Include the template in your <head>:
<head> $MetaTagsX </head>
Be sure not to include $MetaTags in your <head>, the module includes it in the default template. To customize the rendering of the metatags copy the template MetaTagsX.ss to your project theme.
Why the X? Because $MetaTags was taken by the SilverStripe default metatags =).
Recommended
Move the MetaDescription field inside the Meta Tab:
<?php use Arillo\MetaTags\MetaTagsExtension; class Page extends SiteTree { public function getCMSFields() { // move meta fields return MetaTagsExtension::prepare_cms_fields(parent::getCMSFields()); } }
arillo/silverstripe-metatags 适用场景与选型建议
arillo/silverstripe-metatags 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 940 次下载、GitHub Stars 达 2, 最近一次更新时间为 2017 年 02 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「seo」 「silverstripe」 「metatags」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 arillo/silverstripe-metatags 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 arillo/silverstripe-metatags 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 arillo/silverstripe-metatags 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Phalcon PHP Meta tags service
SEO Tools for Laravel and Lumen
Help to manage meta data on Laravel Eloquent model
SEO Tools for Laravel and Lumen
Seo Maestro allows to easily manage your page's meta data and sitemap.
统计信息
- 总下载量: 940
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-24