vdlp/oc-schemaorg-plugin 问题修复 & 功能扩展

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

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

vdlp/oc-schemaorg-plugin

最新稳定版本:1.4.0

Composer 安装命令:

composer require vdlp/oc-schemaorg-plugin

包简介

Provides the rendering of structured data.

README 文档

README

Provides the rendering of structured data on your October CMS powered website.

What is structured data?

Structured data is code in a specific format, written in such a way that search engines understand it. Search engines read the code and use it to display search results in a specific and much richer way. You can easily put this piece of code on your website.

There are all kinds of structured data. Structured data is always a code format. There’s structured data for books, for reviews, for movies, and for products in your online store, for instance. In all cases, structured data adds more details to your snippet in the search results.

Browse Google’s Search Gallery to see which rich results are powered by structured data.

Source: yoast.com

Requirements

  • PHP 8.0 or higher
  • October CMS 3.0 or higher

Installation

composer require vdlp/oc-schemaorg-plugin

Usage

To render structured data from a component you can listen to the Vdlp\SchemaOrg\Classes\Events\FetchStructuredData event.

Example:

/** @var \Illuminate\Contracts\Events\Dispatcher $eventDispatcher */
$eventDispatcher = resolve(\Illuminate\Contracts\Events\Dispatcher::class);

$eventDispatcher->listen(\Vdlp\SchemaOrg\Classes\Events\FetchStructuredData::class, static function () {
    return \Spatie\SchemaOrg\Schema::localBusiness()
        ->name('VDLP')
        ->email('octobercms@vdlp.nl')
        ->contactPoint(\Spatie\SchemaOrg\Schema::contactPoint()->areaServed('Worldwide'));
});

Add the vdlpStructuredData component to your page or layout to render the structured data.

Issues

If you have issues using this plugin. Please create an issue on GitHub or contact us at octobercms@vdlp.nl.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 9
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2019-12-02