monomelodies/metaculous 问题修复 & 功能扩展

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

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

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.

Website Full documentation

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-08