vdaguenet/one-page-seo
最新稳定版本:v1.0
Composer 安装命令:
composer require vdaguenet/one-page-seo
包简介
Serve static content of a one-page website to crawlers (e.g. Facebook, Google or Twitter) using PhantomJS
README 文档
README
Serve static content of a one-page website to crawlers.
Installation
Via Composer
composer require vdaguenet/one-page-seo
Usage
Add the following line on top of your index.php
include_once __DIR__ . '/OnePage-SEO/BotDetector.php'; $detector = new BotDetector(); $detector->setServerOS($detector::LINUX); if($detector->isBot()) { $detector->displayStaticContent(); }
In your javascript, add the following line when you are sure your content is appended
if(typeof window.callPhantom === 'function') window.callPhantom();
What is included ?
PhantomJS:
- for mac in version 2.0.0
- for linux in version 1.9.8
You can download other build from official reposiory
统计信息
- 总下载量: 46
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-05