vdaguenet/one-page-seo

This package is abandoned and no longer maintained. No replacement package was suggested.

Serve static content of a one-page website to crawlers (e.g. Facebook, Google or Twitter) using PhantomJS

Installs: 46

Dependents: 0

Suggesters: 0

Security: 0

Stars: 7

Watchers: 2

Forks: 1

Open Issues: 0

pkg:composer/vdaguenet/one-page-seo

v1.0 2015-07-20 18:25 UTC

This package is not auto-updated.

Last update: 2023-10-28 12:20:43 UTC


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