monomelodies/metaculous
最新稳定版本:1.3.2
Composer 安装命令:
composer require monomelodies/metaculous
包简介
Metadata helpers
README 文档
README
Metadata helpers
A few simple helpers to generically add metadata tag (description, keywords) to your HTML pages, based on page content.
Installation
Composer (recommended)
$ composer install --save monomelodies/metaculous
Manual
Download or clone the files, and add /path/to/metaculous/src to your
autoloader for classes in the Metaculous namespace.
Usage
Instantiate the Parser:
<?php use Metaculous\Parser; $parser = new Parser;
Generate a short description based on random text (e.g. page content from a database):
<?php echo '<meta name="description" content="'.$parser->description($bodyText).'">';
Generate top 10 keywords based on the same text:
<?php echo '<meta name="keywords" content="'.implode(', ', $parser->keywords($bodyText)).'">';
Of course, you could also use the keywords to e.g. display a tag cloud.
统计信息
- 总下载量: 202
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-06-08