silverstripers/seo 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

silverstripers/seo

Composer 安装命令:

composer require silverstripers/seo

包简介

SEO for SilverStripe websites

README 文档

README

This module enables advanced SEO functions for Silverstripe. It providers an SEO editor with

  1. Instant Previews for Google, Facebook, Twitter
  2. Editor for Open Graph Data
  3. Editor for Twitter Cards
  4. Save taxonomies
  5. Various meta title templates for pages
  6. Robots.txt controller
  7. Canonical URL management
  8. Flexibility on extending

Maintainers

nivanka@silverstripers.com

Installation

Use composer to install on your SilverStripe 4 website.

composer require silverstripers/seo dev-master

Requirements

  1. SilverStripe 4+
  2. SilverStripe Reports
  3. SilverStripe Assets

Basic usage

Require the package via composer and run dev build. http://mysite.com/dev/build?flush=all The module will create additional SEO fields for the SiteTree (page) objects and will add in an interface for set up the SEO data.

Add the following instead of the SilverStripe's default meta tag in the <head> section of your template.

$GenerateMetaTags.RAW

DataObjects as pages

If you are using data objects as pages then you may need to add in SEO fields for those data objects to do that it needs to decorate the data object with SEODataExtension

MyDataObject:
    extensions:
        SilverStripers\SEO\Extension\SEODataExtension

This will create the db fields and add the seo editor on to the CMS.

Within the controller you need to call override_seo_from function, and pass your data record for the module to grab the SEO details

use SilverStripers\SEO\Extension\SEODataExtension
...

class MyController extension Controller {

    ...

    public function view()
    {
        ...
        SEODataExtension::override_seo_from($record);
        ...
    }

}

Variables / Taxonomies

If you login to the CMS and go to Settings -> SEO -> Variables, there is a grid field where you can enter name value pair objects. These can have any names and any values and for any text field within the meta editor you can use these.

The variables will have respective buttons to click which will add them automatically on to the editors fields.

You can also type them in like this. {MyVariableName}

Meta Title Templates

For various websites there are different types of web pages which needs various types of meta titles.

eg: A product page will have a meta title like: ABC Product - Create the best value for money | XYZ Company

Meta titles templates lets you define these as

{MetaTitle} - Create the best value for money | {SiteTitle}

This then get the meta title from the page's meta title variable, and site title from the Site Config title. You can also use any of the variables you defined in the variables sections.

Structured Data

The module supports structured data and enabling takes only a few yml configurations.

E.G: The following makes a Page a Thing and maps the fields on to the Database fields.

Page:
  schema_type: 'Thing'
  schema:
    'name': 'MetaTitle'
    'description': 'MetaDescription'
    'Image': 'FacebookImage'

Supported Types

  • Article
  • Beach
  • BlogPosting
  • BreadcrumbList
  • ContactPoint
  • Corporation
  • CreativeWork
  • Duration
  • Event
  • GeoCoordinates
  • ImageObject
  • Invoice
  • ListItem
  • LocalBusiness
  • MusicAlbum
  • MusicGroup
  • MusicPlaylist
  • MusicRecording
  • NewsArticle
  • Offer
  • Order
  • Organization
  • Person
  • Place
  • PostalAddress
  • PriceSpeficication
  • Product
  • Rating
  • Review
  • SearchBox
  • Thing
  • VideoObject
  • WebPage

To view the config options for any type visit the page with adding ?structureddata_help=1 to the end of the URL

Enjoy!!

silverstripers/seo 适用场景与选型建议

silverstripers/seo 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 45.45k 次下载、GitHub Stars 达 11, 最近一次更新时间为 2017 年 12 月 11 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「module」 「seo」 「silverstripe」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 silverstripers/seo 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 silverstripers/seo 我们能提供哪些服务?
定制开发 / 二次开发

基于 silverstripers/seo 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 45.45k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 20
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-12-11