Jonny Wenmoth пре 11 година
родитељ
комит
25a06f0104

+ 6 - 6
_config.yml

@@ -20,12 +20,12 @@ description: Run PhantomJS scripts through PHP
 
 author:
   name: Jonny W
-  email:
-  github: 
-  twitter: 
-  pinterest: 
-  linkedin: 
-  email_md5: 
+
+github:
+  username: jonnnnyw
+  repo: php-phantomjs
+  watch: true
+  fork: true
 
 rss_path: feed.xml
 

+ 11 - 22
_includes/default.html

@@ -31,7 +31,7 @@
 	-->
 
 	<link rel="alternate" type="application/rss+xml" title="{{ site.name }}" href="{{ site.BASE_PATH }}/feed.xml">
-	
+
     <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -41,7 +41,7 @@
         ga('create', 'UA-53289013-1', 'auto');
         ga('send', 'pageview');
     </script>
-    
+
 </head>
 
 <body>
@@ -55,25 +55,16 @@
 				<span class="icon-bar"></span>
 			</button>
 			
-			<!--
-			{% if site.author.github %}
-			<a type="button" class="navbar-toggle nav-link" href="http://github.com/{{ site.author.github }}">
-				<i class="fa fa-github"></i>
-			</a>
-			{% endif %}
-			{% if site.author.twitter %}
-			<a type="button" class="navbar-toggle nav-link" href="http://twitter.com/{{ site.author.twitter }}">
-				<i class="fa fa-twitter"></i>
-			</a>
-			{% endif %}
-			{% if site.author.email %}
-			<a type="button" class="navbar-toggle nav-link" href="mailto:{{ site.author.email }}">
-				<i class="fa fa-envelope"></i>
-			</a>
-			{% endif %}
-			
-			-->
+			{% if site.github.fork %}
+            <iframe src="http://ghbtns.com/github-btn.html?user={{ site.github.username }}&repo={{ site.github.repo }}&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link last"></iframe>
+    		{% endif %}
 			
+			{% if site.github.watch %}
+            <iframe src="http://ghbtns.com/github-btn.html?user={{ site.github.username }}&repo={{ site.github.repo }}&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link"></iframe>
+    		{% endif %}
+    		
 			<a class="navbar-brand" href="{{ site.BASE_PATH }}/">
 				<img src="{{ site.BASE_PATH }}/assets/media/phantomjs-small.png" class="img-circle" />
 				{{ site.title }}
@@ -87,7 +78,6 @@
 				<li><a href="{{ site.BASE_PATH}}/installation.html">Installation</a></li>
 				<li><a href="{{ site.BASE_PATH}}/usage.html">Usage</a></li>
 				<li><a href="{{ site.BASE_PATH}}/advanced.html">Advanced</a></li>
-				<li><a href="{{ site.BASE_PATH}}/debugging.html">Debugging</a></li>
 				<li><a href="{{ site.BASE_PATH}}/troubleshooting.html">Troubleshooting</a></li>
 			</ul>
 		</div><!-- /.navbar-collapse -->
@@ -103,7 +93,6 @@
 			<li><a href="{{ site.BASE_PATH}}/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
 			<li><a href="{{ site.BASE_PATH}}/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
 			<li><a href="{{ site.BASE_PATH}}/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
-			<li><a href="{{ site.BASE_PATH}}/debugging.html"><i class="fa fa-folder"></i>Debugging</a></li>
 			<li><a href="{{ site.BASE_PATH}}/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
 			<li class="divider"></li>
 			<li><a href="#"><i class="fa fa-arrow-up"></i>Top of Page</a></li>

+ 12 - 15
_includes/post.html

@@ -13,21 +13,18 @@
     </div>
 
     <div class="clearfix"></div>
+    
+    <hr>
+    <ul class="pager">
+        {% if page.next %}
+        <li class="previous"><a href="{{ site.BASE_PATH }}{{ page.next.url }}" title="{{ page.next.title }}">&larr; {{ page.next.title }}</a></li>
+        {% endif %}
+        {% if page.previous %}
+        <li class="next"><a href="{{ site.BASE_PATH }}{{ page.previous.url }}" title="{{ page.previous.title }}">{{ page.previous.title }} &rarr;</a></li>
+        {% endif %}
+    </ul>
 
-		<ul class="pager">
-		  {% if page.previous %}
-		  <li class="previous"><a href="{{ site.BASE_PATH }}{{ page.previous.url }}" title="{{ page.previous.title }}">&larr; {{ page.previous.title }}</a></li>
-		  {% endif %}
-		  {% if page.next %}
-		  <li class="next"><a href="{{ site.BASE_PATH }}{{ page.next.url }}" title="{{ page.next.title }}">{{ page.next.title }} &rarr;</a></li>
-		  {% endif %}
-		</ul>
-
-		<hr>
-	</div>
-	
-	<div class="col-sm-2 sidebar-2">
 	
-	</div>
+    
 </article>
-<div class="clearfix"></div>
+

+ 8 - 38
_includes/sidebar.html

@@ -15,51 +15,21 @@
 {% endif %}
 
 <div id="contact-list" class="text-center">
-<!--
+
 	<ul class="list-unstyled list-inline">
-		{% if site.author.github %}
-		<li>
-			<a class="btn btn-default btn-sm" href="https://github.com/{{ site.author.github }}">
-				<i class="fa fa-github-alt fa-lg"></i>
-			</a>
-		</li>
-		{% endif %}
-		{% if site.author.twitter %}
-		<li>
-			<a class="btn btn-default btn-sm" href="https://twitter.com/{{ site.author.twitter }}">
-				<i class="fa fa-twitter fa-lg"></i>
-			</a>
-		</li>
-		{% endif %}
-		{% if site.author.email %}
+		{% if site.github.watch %}
 		<li>
-			<a class="btn btn-default btn-sm" href="mailto:{{ site.author.email }}">
-				<i class="fa fa-envelope fa-lg"></i>
-			</a>
+            <iframe src="http://ghbtns.com/github-btn.html?user={{ site.github.username }}&repo={{ site.github.repo }}&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
 		</li>
 		{% endif %}
-	</ul>
-	<ul id="contact-list-secondary" class="list-unstyled list-inline">
-		{% if site.author.pinterest %}
-		<li>
-			<a class="btn btn-default btn-sm" href="https://pinterest.com/{{ site.author.pinterest }}">
-				<i class="fa fa-pinterest fa-lg"></i>
-			</a>
-		</li>
-		{% endif %}
-		{% if site.author.linkedin %}
+		{% if site.github.fork %}
 		<li>
-			<a class="btn btn-default btn-sm" href="https://linkedin.com/in/{{ site.author.linkedin }}">
-				<i class="fa fa-linkedin fa-lg"></i>
-			</a>
+			<iframe src="http://ghbtns.com/github-btn.html?user={{ site.github.username }}&repo={{ site.github.repo }}&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
 		</li>
 		{% endif %}
-		<li>
-			<a class="btn btn-default btn-sm" href="{{ site.BASE_PATH }}/{{ site.rss_path }}">
-				<i class="fa fa-rss fa-lg"></i>
-			</a>
-		</li>
 	</ul>
--->
+
 </div>
 <! -- sidebar.html end -->

+ 0 - 11
_posts/2014-07-24-debugging.md

@@ -1,11 +0,0 @@
----
-layout: post
-title: Debugging
-categories: []
-tags: []
-fullview: true
----
-
-This documentation page will be up in the next couple of days.
-
-In the meantime, check out the [examples](https://github.com/jonnnnyw/php-phantomjs/tree/master/examples) in the Github repo.

+ 12 - 10
_posts/2014-07-25-advanced.md

@@ -7,7 +7,7 @@ fullview: true
 ---
 
 * [PhantomJS command line options](#phantomjs-command-line-options)
-* [Custom PhantomJS scripts](#custom-phantom-js-scripts)
+* [Custom PhantomJS scripts](#custom-phantomjs-scripts)
   * [Writing a custom script](#writing-a-custom-script)
   * [Using custom request parameters in your script](#using-custom-request-parameters-in-your-script)
   * [Loading your script](#loading-your-script)
@@ -141,14 +141,16 @@ A default request instance contains the following accessors:
 
 {% raw %}
 
-| Accessor             | Description                                 |  Twig example                    |
-| :------------------: | ------------------------------------------- | :------------------------------: |
-| getMethod()          | The request method e.g. GET.                | {{ request.getMethod() }}        |
-| getTimeout()         | The request timeout period in milliseconds. | {{ request.getTimeout() }}       |
-| getDelay()           | The page render delay in seconds.           | {{ request.getDelay() }}         |
-| getUrl()             | The request URL.                            | {{ request.getUrl() }}           |
-| getBody()            | The request body (POST, PUT).               | {{ request.getBody() }}          |
-| getHeaders(*format*) | The request headers.                        | {{ request.getHeaders('json') }} |
+| Accessor             | Description                                 |  Twig example                     |
+| :------------------: | ------------------------------------------- | :-------------------------------: |
+| getMethod()          | The request method e.g. GET.                | {{ request.getMethod() }}         |
+| getTimeout()         | The request timeout period in milliseconds. | {{ request.getTimeout() }}        |
+| getDelay()           | The page render delay in seconds.           | {{ request.getDelay() }}          |
+| getViewportWidth()   | The viewport width.                         | {{ request.getViewportWidth() }}  |
+| getViewportHeight()  | The viewport height.                        | {{ request.getViewportHeight() }} |
+| getUrl()             | The request URL.                            | {{ request.getUrl() }}            |
+| getBody()            | The request body (POST, PUT).               | {{ request.getBody() }}           |
+| getHeaders(*format*) | The request headers.                        | {{ request.getHeaders('json') }}  |
 
 {% endraw %}
 
@@ -323,4 +325,4 @@ Below is a full example for clarity:
 > #### Troubleshooting
 > If you find that your script isn't running or that you are receiving a status of '0' back in the response, chances are you have a syntax error in you script. It pays to turn debugging on in the client `$client->debug(true)` which will then give you access to some log information through `$client->getLog()`.
 
-See more detailed information about [debugging]({{ site.BASE_PATH }}/debugging.html).
+See more detailed information about [troubleshooting]({{ site.BASE_PATH }}/troubleshooting.html).

+ 1 - 1
_posts/2014-07-26-usage.md

@@ -150,7 +150,7 @@ A standard response gives you access to the following interface:
 | isRedirect()        | Will return true if the response was a redirect or false otherwise.                       | Boolean        |
 | getConsole()        | Returns an array of any javascript errors on the requested page along with a stack trace. | Array          |
 
-If the response contains a status code of 0, chances are the request failed. Check the request [debug log]({{ site.BASE_PATH }}/debugging.html) for more detailed information about what may have gone wrong.
+If the response contains a status code of 0, chances are the request failed. Check the request [debug log]({{ site.BASE_PATH }}/troubleshooting.html#debugging) for more detailed information about what may have gone wrong.
 
 Screen Captures
 ---------------

+ 4 - 0
_posts/2014-07-27-installation.md

@@ -32,6 +32,8 @@ Create a `composer.json` file in the root of your project:
 
 {% highlight yaml %}
 
+    #composer.json
+
     {
         "require": {
             "jonnyw/php-phantomjs": "3.*"
@@ -80,6 +82,8 @@ If you would like composer to install the PhantomJS executable to a custom locat
 
 {% highlight yaml %}
 
+    #composer.json
+
     {
         "config": {
             "bin-dir": "/path/to/your/projects/bin/dir"

+ 5 - 1
_posts/2014-07-28-introduction.md

@@ -34,6 +34,8 @@ Installation
 It is recommended that you use Composer to install PHP PhantomJS. First, add the following to your project’s `composer.json` file:
 
 {% highlight yaml %}
+    
+    #composer.json
 
     "scripts": {
         "post-install-cmd": [
@@ -49,7 +51,9 @@ It is recommended that you use Composer to install PHP PhantomJS. First, add the
 This will ensure the latest version of PhantomJS is installed for your system, in your bin folder. If you haven’t defined your bin folder in your composer.json, add the path:
 
 {% highlight yaml %}
-
+    
+    #composer.json
+    
     "config": {
         "bin-dir": "bin"
     }

+ 41 - 40
_site/404.html

@@ -15,10 +15,10 @@
 	<![endif]-->
 
 	<!-- Le styles -->
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/syntax/syntax.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/css/style.css" rel="stylesheet">
+	<link href="/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+	<link href="/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
+	<link href="/assets/resources/syntax/syntax.css" rel="stylesheet">
+	<link href="/assets/css/style.css" rel="stylesheet">
 
 	<!-- Le fav and touch icons -->
 	<!-- Update these with your own images
@@ -28,8 +28,8 @@
 	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
 	-->
 
-	<link rel="alternate" type="application/rss+xml" title="" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-	
+	<link rel="alternate" type="application/rss+xml" title="" href="/feed.xml">
+
     <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,7 +39,7 @@
         ga('create', 'UA-53289013-1', 'auto');
         ga('send', 'pageview');
     </script>
-    
+
 </head>
 
 <body>
@@ -53,15 +53,18 @@
 				<span class="icon-bar"></span>
 			</button>
 			
-			<!--
-			
 			
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link last"></iframe>
+    		
 			
 			
-			-->
-			
-			<a class="navbar-brand" href="http://jonnnnyw.github.io/php-phantomjs/">
-				<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs-small.png" class="img-circle" />
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link"></iframe>
+    		
+    		
+			<a class="navbar-brand" href="/">
+				<img src="/assets/media/phantomjs-small.png" class="img-circle" />
 				PHP PhantomJs
 			</a>
 		</div>
@@ -69,12 +72,11 @@
 		<!-- Collect the nav links, forms, and other content for toggling -->
 		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
 			<ul class="nav navbar-nav">
-				<li class="active"><a href="http://jonnnnyw.github.io/php-phantomjs/">Home</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">Installation</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">Usage</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">Advanced</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">Debugging</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html">Troubleshooting</a></li>
+				<li class="active"><a href="/">Home</a></li>
+				<li><a href="/installation.html">Installation</a></li>
+				<li><a href="/usage.html">Usage</a></li>
+				<li><a href="/advanced.html">Advanced</a></li>
+				<li><a href="/troubleshooting.html">Troubleshooting</a></li>
 			</ul>
 		</div><!-- /.navbar-collapse -->
 	</nav>
@@ -85,12 +87,11 @@
 			<i class="fa fa-bars"></i>
 		</button>
 		<ul class="dropdown-menu" role="menu">
-		    <li><a href="http://jonnnnyw.github.io/php-phantomjs/"><i class="fa fa-home"></i>Home</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html"><i class="fa fa-folder"></i>Debugging</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
+		    <li><a href="/"><i class="fa fa-home"></i>Home</a></li>
+			<li><a href="/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
+			<li><a href="/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
+			<li><a href="/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
+			<li><a href="/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
 			<li class="divider"></li>
 			<li><a href="#"><i class="fa fa-arrow-up"></i>Top of Page</a></li>
 		</ul>
@@ -99,11 +100,11 @@
 	<div class="col-sm-3 sidebar hidden-xs">
 		<! -- sidebar.html -->
 <header class="sidebar-header" role="banner">
-	<a href="http://jonnnnyw.github.io/php-phantomjs/">
-		<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs.png" class="img-circle" />
+	<a href="/">
+		<img src="/assets/media/phantomjs.png" class="img-circle" />
 	</a>
 	<h3 class="title">
-        <a href="http://jonnnnyw.github.io/php-phantomjs/">PHP PhantomJs</a>
+        <a href="/">PHP PhantomJs</a>
     </h3>
 </header>
 
@@ -114,22 +115,22 @@
 
 
 <div id="contact-list" class="text-center">
-<!--
+
 	<ul class="list-unstyled list-inline">
 		
-		
-		
-	</ul>
-	<ul id="contact-list-secondary" class="list-unstyled list-inline">
+		<li>
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
+		</li>
 		
 		
 		<li>
-			<a class="btn btn-default btn-sm" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-				<i class="fa fa-rss fa-lg"></i>
-			</a>
+			<iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
 		</li>
+		
 	</ul>
--->
+
 </div>
 <! -- sidebar.html end -->
 
@@ -197,9 +198,9 @@
 		</footer>
 	</div>
 
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/jquery/jquery.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/js/bootstrap.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/js/app.js"></script>
+	<script type="text/javascript" src="/assets/resources/jquery/jquery.min.js"></script>
+	<script type="text/javascript" src="/assets/resources/bootstrap/js/bootstrap.min.js"></script>
+	<script type="text/javascript" src="/assets/js/app.js"></script>
 	
 </body>
 </html>

+ 54 - 56
_site/advanced.html

@@ -15,10 +15,10 @@
 	<![endif]-->
 
 	<!-- Le styles -->
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/syntax/syntax.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/css/style.css" rel="stylesheet">
+	<link href="/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+	<link href="/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
+	<link href="/assets/resources/syntax/syntax.css" rel="stylesheet">
+	<link href="/assets/css/style.css" rel="stylesheet">
 
 	<!-- Le fav and touch icons -->
 	<!-- Update these with your own images
@@ -28,8 +28,8 @@
 	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
 	-->
 
-	<link rel="alternate" type="application/rss+xml" title="" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-	
+	<link rel="alternate" type="application/rss+xml" title="" href="/feed.xml">
+
     <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,7 +39,7 @@
         ga('create', 'UA-53289013-1', 'auto');
         ga('send', 'pageview');
     </script>
-    
+
 </head>
 
 <body>
@@ -53,15 +53,18 @@
 				<span class="icon-bar"></span>
 			</button>
 			
-			<!--
 			
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link last"></iframe>
+    		
 			
 			
-			
-			-->
-			
-			<a class="navbar-brand" href="http://jonnnnyw.github.io/php-phantomjs/">
-				<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs-small.png" class="img-circle" />
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link"></iframe>
+    		
+    		
+			<a class="navbar-brand" href="/">
+				<img src="/assets/media/phantomjs-small.png" class="img-circle" />
 				PHP PhantomJs
 			</a>
 		</div>
@@ -69,12 +72,11 @@
 		<!-- Collect the nav links, forms, and other content for toggling -->
 		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
 			<ul class="nav navbar-nav">
-				<li class="active"><a href="http://jonnnnyw.github.io/php-phantomjs/">Home</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">Installation</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">Usage</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">Advanced</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">Debugging</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html">Troubleshooting</a></li>
+				<li class="active"><a href="/">Home</a></li>
+				<li><a href="/installation.html">Installation</a></li>
+				<li><a href="/usage.html">Usage</a></li>
+				<li><a href="/advanced.html">Advanced</a></li>
+				<li><a href="/troubleshooting.html">Troubleshooting</a></li>
 			</ul>
 		</div><!-- /.navbar-collapse -->
 	</nav>
@@ -85,12 +87,11 @@
 			<i class="fa fa-bars"></i>
 		</button>
 		<ul class="dropdown-menu" role="menu">
-		    <li><a href="http://jonnnnyw.github.io/php-phantomjs/"><i class="fa fa-home"></i>Home</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html"><i class="fa fa-folder"></i>Debugging</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
+		    <li><a href="/"><i class="fa fa-home"></i>Home</a></li>
+			<li><a href="/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
+			<li><a href="/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
+			<li><a href="/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
+			<li><a href="/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
 			<li class="divider"></li>
 			<li><a href="#"><i class="fa fa-arrow-up"></i>Top of Page</a></li>
 		</ul>
@@ -99,11 +100,11 @@
 	<div class="col-sm-3 sidebar hidden-xs">
 		<! -- sidebar.html -->
 <header class="sidebar-header" role="banner">
-	<a href="http://jonnnnyw.github.io/php-phantomjs/">
-		<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs.png" class="img-circle" />
+	<a href="/">
+		<img src="/assets/media/phantomjs.png" class="img-circle" />
 	</a>
 	<h3 class="title">
-        <a href="http://jonnnnyw.github.io/php-phantomjs/">PHP PhantomJs</a>
+        <a href="/">PHP PhantomJs</a>
     </h3>
 </header>
 
@@ -114,22 +115,22 @@
 
 
 <div id="contact-list" class="text-center">
-<!--
+
 	<ul class="list-unstyled list-inline">
 		
-		
-		
-	</ul>
-	<ul id="contact-list-secondary" class="list-unstyled list-inline">
+		<li>
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
+		</li>
 		
 		
 		<li>
-			<a class="btn btn-default btn-sm" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-				<i class="fa fa-rss fa-lg"></i>
-			</a>
+			<iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
 		</li>
+		
 	</ul>
--->
+
 </div>
 <! -- sidebar.html end -->
 
@@ -461,31 +462,28 @@
   <p>If you find that your script isn’t running or that you are receiving a status of ‘0’ back in the response, chances are you have a syntax error in you script. It pays to turn debugging on in the client <code>$client-&gt;debug(true)</code> which will then give you access to some log information through <code>$client-&gt;getLog()</code>.</p>
 </blockquote>
 
-<p>See more detailed information about <a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">debugging</a>.</p>
+<p>See more detailed information about <a href="/debugging.html">debugging</a>.</p>
 
 	  </div>
 
     </div>
 
     <div class="clearfix"></div>
+    
+    <hr>
+    <ul class="pager">
+        
+        <li class="previous"><a href="/usage.html" title="Usage">&larr; Usage</a></li>
+        
+        
+        <li class="next"><a href="/troubleshooting.html" title="Troubleshooting">Troubleshooting &rarr;</a></li>
+        
+    </ul>
 
-		<ul class="pager">
-		  
-		  <li class="previous"><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html" title="Debugging">&larr; Debugging</a></li>
-		  
-		  
-		  <li class="next"><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html" title="Usage">Usage &rarr;</a></li>
-		  
-		</ul>
-
-		<hr>
-	</div>
-	
-	<div class="col-sm-2 sidebar-2">
 	
-	</div>
+    
 </article>
-<div class="clearfix"></div>
+
 
 
 
@@ -497,9 +495,9 @@
 		</footer>
 	</div>
 
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/jquery/jquery.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/js/bootstrap.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/js/app.js"></script>
+	<script type="text/javascript" src="/assets/resources/jquery/jquery.min.js"></script>
+	<script type="text/javascript" src="/assets/resources/bootstrap/js/bootstrap.min.js"></script>
+	<script type="text/javascript" src="/assets/js/app.js"></script>
 	
 </body>
 </html>

+ 8 - 7
_site/assets/css/style.css

@@ -26,15 +26,16 @@ body{
 	color: #fff;
 }
 
-a.nav-link {
-	padding-bottom: 5px;
-	padding-top: 7px;
-	color: #aaa;
+.nav-link {
+	position: relative;
+    float: right;
+    margin-top: 15px;
+    margin-bottom: 8px;
 }
-a.nav-link i{
-	font-size: 16px;
+
+.nav-link.last {
+    margin-right: 10px;
 }
-a.nav-link:hover { color: #777 }
 
 #bio {
 	font-family: "Courier New", Courier, monospace;

+ 0 - 192
_site/debugging.html

@@ -1,192 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="utf-8">
-	<title>Debugging</title>
-	
-	<meta name="author" content="Jonny W">
-
-	<!-- Enable responsive viewport -->
-	<meta name="viewport" content="width=device-width, initial-scale=1.0">
-
-	<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
-	<!--[if lt IE 9]>
-	<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
-	<![endif]-->
-
-	<!-- Le styles -->
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/syntax/syntax.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/css/style.css" rel="stylesheet">
-
-	<!-- Le fav and touch icons -->
-	<!-- Update these with your own images
-	<link rel="shortcut icon" href="images/favicon.ico">
-	<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
-	<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
-	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
-	-->
-
-	<link rel="alternate" type="application/rss+xml" title="" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-	
-    <script>
-        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
-        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
-        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
-        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
-        
-        ga('create', 'UA-53289013-1', 'auto');
-        ga('send', 'pageview');
-    </script>
-    
-</head>
-
-<body>
-	<nav class="navbar navbar-default visible-xs" role="navigation">
-		<!-- Brand and toggle get grouped for better mobile display -->
-		<div class="navbar-header">
-			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
-				<span class="sr-only">Toggle navigation</span>
-				<span class="icon-bar"></span>
-				<span class="icon-bar"></span>
-				<span class="icon-bar"></span>
-			</button>
-			
-			<!--
-			
-			
-			
-			
-			-->
-			
-			<a class="navbar-brand" href="http://jonnnnyw.github.io/php-phantomjs/">
-				<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs-small.png" class="img-circle" />
-				PHP PhantomJs
-			</a>
-		</div>
-
-		<!-- Collect the nav links, forms, and other content for toggling -->
-		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
-			<ul class="nav navbar-nav">
-				<li class="active"><a href="http://jonnnnyw.github.io/php-phantomjs/">Home</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">Installation</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">Usage</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">Advanced</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">Debugging</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html">Troubleshooting</a></li>
-			</ul>
-		</div><!-- /.navbar-collapse -->
-	</nav>
-
-	<!-- nav-menu-dropdown -->
-	<div class="btn-group hidden-xs" id="nav-menu">
-		<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
-			<i class="fa fa-bars"></i>
-		</button>
-		<ul class="dropdown-menu" role="menu">
-		    <li><a href="http://jonnnnyw.github.io/php-phantomjs/"><i class="fa fa-home"></i>Home</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html"><i class="fa fa-folder"></i>Debugging</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
-			<li class="divider"></li>
-			<li><a href="#"><i class="fa fa-arrow-up"></i>Top of Page</a></li>
-		</ul>
-	</div>
-
-	<div class="col-sm-3 sidebar hidden-xs">
-		<! -- sidebar.html -->
-<header class="sidebar-header" role="banner">
-	<a href="http://jonnnnyw.github.io/php-phantomjs/">
-		<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs.png" class="img-circle" />
-	</a>
-	<h3 class="title">
-        <a href="http://jonnnnyw.github.io/php-phantomjs/">PHP PhantomJs</a>
-    </h3>
-</header>
-
-
-<div id="bio" class="text-center">
-	Run PhantomJS scripts through PHP
-</div>
-
-
-<div id="contact-list" class="text-center">
-<!--
-	<ul class="list-unstyled list-inline">
-		
-		
-		
-	</ul>
-	<ul id="contact-list-secondary" class="list-unstyled list-inline">
-		
-		
-		<li>
-			<a class="btn btn-default btn-sm" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-				<i class="fa fa-rss fa-lg"></i>
-			</a>
-		</li>
-	</ul>
--->
-</div>
-<! -- sidebar.html end -->
-
-	</div>
-
-	<div class="col-sm-9 col-sm-offset-3">
-		<div class="page-header">
-  <h1>Debugging </h1>
-</div>
-	
-<article>
-
-	<div class="col-sm-10">
-	
-	  <div class="article_body">
-	  <p>This documentation page will be up in the next couple of days.</p>
-
-<p>In the meantime, check out the <a href="https://github.com/jonnnnyw/php-phantomjs/tree/master/examples">examples</a> in the Github repo.</p>
-
-	  </div>
-
-    </div>
-
-    <div class="clearfix"></div>
-
-		<ul class="pager">
-		  
-		  <li class="previous"><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html" title="Troubleshooting">&larr; Troubleshooting</a></li>
-		  
-		  
-		  <li class="next"><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html" title="Advanced Usage">Advanced Usage &rarr;</a></li>
-		  
-		</ul>
-
-		<hr>
-	</div>
-	
-	<div class="col-sm-2 sidebar-2">
-	
-	</div>
-</article>
-<div class="clearfix"></div>
-
-
-
-		<footer>
-			<hr/>
-			<p>
-				&copy; 2014 PHP PhantomJs. Theme: Modified <a href="https://github.com/dbtek/dbyll">dbyll</a> by dbtek.
-			</p>
-		</footer>
-	</div>
-
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/jquery/jquery.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/js/bootstrap.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/js/app.js"></script>
-	
-</body>
-</html>
-

+ 29 - 32
_site/feed.xml

@@ -3,8 +3,8 @@
 	<channel>
 		<title>PHP PhantomJs</title>
 		<description>Run PhantomJS scripts through PHP</description>
-		<link>http://jonnnnyw.github.io/php-phantomjs/</link>
-		<atom:link href="http://jonnnnyw.github.io/php-phantomjs/feed.xml" rel="self" type="application/rss+xml" />
+		<link>/</link>
+		<atom:link href="/feed.xml" rel="self" type="application/rss+xml" />
 		
 			<item>
 				<title>Introduction</title>
@@ -34,7 +34,9 @@ code etc.&lt;/li&gt;
 
 &lt;p&gt;It is recommended that you use Composer to install PHP PhantomJS. First, add the following to your project’s &lt;code&gt;composer.json&lt;/code&gt; file:&lt;/p&gt;
 
-&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-yaml&quot; data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;scripts&amp;quot;&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p-Indicator&quot;&gt;{&lt;/span&gt;
+&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-yaml&quot; data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;c1&quot;&gt;#composer.json&lt;/span&gt;
+
+    &lt;span class=&quot;s&quot;&gt;&amp;quot;scripts&amp;quot;&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p-Indicator&quot;&gt;{&lt;/span&gt;
         &lt;span class=&quot;s&quot;&gt;&amp;quot;post-install-cmd&amp;quot;&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p-Indicator&quot;&gt;[&lt;/span&gt;
             &lt;span class=&quot;s&quot;&gt;&amp;quot;PhantomInstaller\\Installer::installPhantomJS&amp;quot;&lt;/span&gt;
         &lt;span class=&quot;p-Indicator&quot;&gt;],&lt;/span&gt;
@@ -45,7 +47,9 @@ code etc.&lt;/li&gt;
 
 &lt;p&gt;This will ensure the latest version of PhantomJS is installed for your system, in your bin folder. If you haven’t defined your bin folder in your composer.json, add the path:&lt;/p&gt;
 
-&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-yaml&quot; data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;config&amp;quot;&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p-Indicator&quot;&gt;{&lt;/span&gt;
+&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-yaml&quot; data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;c1&quot;&gt;#composer.json&lt;/span&gt;
+    
+    &lt;span class=&quot;s&quot;&gt;&amp;quot;config&amp;quot;&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p-Indicator&quot;&gt;{&lt;/span&gt;
         &lt;span class=&quot;s&quot;&gt;&amp;quot;bin-dir&amp;quot;&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;bin&amp;quot;&lt;/span&gt;
     &lt;span class=&quot;p-Indicator&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 
@@ -55,7 +59,7 @@ code etc.&lt;/li&gt;
     
     &lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;composer require &lt;span class=&quot;s2&quot;&gt;&amp;quot;jonnyw/php-phantomjs:3.*&amp;quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 
-&lt;p&gt;If you would like to use another installation method or would like to see more detailed installation instructions, see the &lt;a href=&quot;http://jonnnnyw.github.io/php-phantomjs/installation.html&quot;&gt;installation&lt;/a&gt; documentation.&lt;/p&gt;
+&lt;p&gt;If you would like to use another installation method or would like to see more detailed installation instructions, see the &lt;a href=&quot;/installation.html&quot;&gt;installation&lt;/a&gt; documentation.&lt;/p&gt;
 
 &lt;h2 id=&quot;basic-usage&quot;&gt;Basic Usage&lt;/h2&gt;
 
@@ -108,12 +112,12 @@ code etc.&lt;/li&gt;
     &lt;span class=&quot;c1&quot;&gt;// Send the request&lt;/span&gt;
     &lt;span class=&quot;nv&quot;&gt;$client&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;send&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$request&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$response&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
 
-&lt;p&gt;For more detailed examples see the &lt;a href=&quot;http://jonnnnyw.github.io/php-phantomjs/usage.html&quot;&gt;usage&lt;/a&gt; section, or to create your own custom scripts check out the &lt;a href=&quot;http://jonnnnyw.github.io/php-phantomjs/advanced.html&quot;&gt;advanced&lt;/a&gt; documentation.&lt;/p&gt;
+&lt;p&gt;For more detailed examples see the &lt;a href=&quot;/usage.html&quot;&gt;usage&lt;/a&gt; section, or to create your own custom scripts check out the &lt;a href=&quot;/advanced.html&quot;&gt;advanced&lt;/a&gt; documentation.&lt;/p&gt;
 
 </description>
 				<pubDate>Mon, 28 Jul 2014 00:00:00 +0100</pubDate>
-				<link>http://jonnnnyw.github.io/php-phantomjs/introduction.html</link>
-				<guid isPermaLink="true">http://jonnnnyw.github.io/php-phantomjs/introduction.html</guid>
+				<link>/introduction.html</link>
+				<guid isPermaLink="true">/introduction.html</guid>
 			</item>
 		
 			<item>
@@ -139,7 +143,9 @@ code etc.&lt;/li&gt;
 
 &lt;p&gt;Create a &lt;code&gt;composer.json&lt;/code&gt; file in the root of your project:&lt;/p&gt;
 
-&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-yaml&quot; data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;p-Indicator&quot;&gt;{&lt;/span&gt;
+&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-yaml&quot; data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;c1&quot;&gt;#composer.json&lt;/span&gt;
+
+    &lt;span class=&quot;p-Indicator&quot;&gt;{&lt;/span&gt;
         &lt;span class=&quot;s&quot;&gt;&amp;quot;require&amp;quot;&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p-Indicator&quot;&gt;{&lt;/span&gt;
             &lt;span class=&quot;s&quot;&gt;&amp;quot;jonnyw/php-phantomjs&amp;quot;&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;3.*&amp;quot;&lt;/span&gt;
         &lt;span class=&quot;p-Indicator&quot;&gt;},&lt;/span&gt;
@@ -177,7 +183,9 @@ code etc.&lt;/li&gt;
 
 &lt;p&gt;If you would like composer to install the PhantomJS executable to a custom location when installing dependencies, set the bin dir location in your project’s &lt;code&gt;composer.json&lt;/code&gt; file:&lt;/p&gt;
 
-&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-yaml&quot; data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;p-Indicator&quot;&gt;{&lt;/span&gt;
+&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-yaml&quot; data-lang=&quot;yaml&quot;&gt;&lt;span class=&quot;c1&quot;&gt;#composer.json&lt;/span&gt;
+
+    &lt;span class=&quot;p-Indicator&quot;&gt;{&lt;/span&gt;
         &lt;span class=&quot;s&quot;&gt;&amp;quot;config&amp;quot;&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p-Indicator&quot;&gt;{&lt;/span&gt;
             &lt;span class=&quot;s&quot;&gt;&amp;quot;bin-dir&amp;quot;&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;/path/to/your/projects/bin/dir&amp;quot;&lt;/span&gt;
         &lt;span class=&quot;p-Indicator&quot;&gt;}&lt;/span&gt;
@@ -218,8 +226,8 @@ code etc.&lt;/li&gt;
 &lt;p&gt;Make sure the components are in your include path and that the PhantomJS executable is installed to your projects bin folder as mentioned in the &lt;a href=&quot;#custom-installation&quot;&gt;Custom Installation&lt;/a&gt; section.&lt;/p&gt;
 </description>
 				<pubDate>Sun, 27 Jul 2014 00:00:00 +0100</pubDate>
-				<link>http://jonnnnyw.github.io/php-phantomjs/installation.html</link>
-				<guid isPermaLink="true">http://jonnnnyw.github.io/php-phantomjs/installation.html</guid>
+				<link>/installation.html</link>
+				<guid isPermaLink="true">/installation.html</guid>
 			</item>
 		
 			<item>
@@ -237,7 +245,7 @@ code etc.&lt;/li&gt;
   &lt;li&gt;&lt;a href=&quot;#custom-run-options&quot;&gt;Custom Run Options&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 
-&lt;p&gt;For more advanced customization or to load your own PhantomJS scripts, see the &lt;a href=&quot;http://jonnnnyw.github.io/php-phantomjs/advanced.html&quot;&gt;advanced&lt;/a&gt; documentation.&lt;/p&gt;
+&lt;p&gt;For more advanced customization or to load your own PhantomJS scripts, see the &lt;a href=&quot;/advanced.html&quot;&gt;advanced&lt;/a&gt; documentation.&lt;/p&gt;
 
 &lt;h2 id=&quot;basic-request&quot;&gt;Basic Request&lt;/h2&gt;
 
@@ -398,7 +406,7 @@ code etc.&lt;/li&gt;
   &lt;/tbody&gt;
 &lt;/table&gt;
 
-&lt;p&gt;If the response contains a status code of 0, chances are the request failed. Check the request &lt;a href=&quot;http://jonnnnyw.github.io/php-phantomjs/debugging.html&quot;&gt;debug log&lt;/a&gt; for more detailed information about what may have gone wrong.&lt;/p&gt;
+&lt;p&gt;If the response contains a status code of 0, chances are the request failed. Check the request &lt;a href=&quot;/debugging.html&quot;&gt;debug log&lt;/a&gt; for more detailed information about what may have gone wrong.&lt;/p&gt;
 
 &lt;h2 id=&quot;screen-captures&quot;&gt;Screen Captures&lt;/h2&gt;
 
@@ -518,8 +526,8 @@ code etc.&lt;/li&gt;
 &lt;p&gt;See the &lt;a href=&quot;http://phantomjs.org/api/command-line.html&quot;&gt;PhantomJS Documentation&lt;/a&gt; for a full list of command line options.&lt;/p&gt;
 </description>
 				<pubDate>Sat, 26 Jul 2014 00:00:00 +0100</pubDate>
-				<link>http://jonnnnyw.github.io/php-phantomjs/usage.html</link>
-				<guid isPermaLink="true">http://jonnnnyw.github.io/php-phantomjs/usage.html</guid>
+				<link>/usage.html</link>
+				<guid isPermaLink="true">/usage.html</guid>
 			</item>
 		
 			<item>
@@ -840,22 +848,11 @@ code etc.&lt;/li&gt;
   &lt;p&gt;If you find that your script isn’t running or that you are receiving a status of ‘0’ back in the response, chances are you have a syntax error in you script. It pays to turn debugging on in the client &lt;code&gt;$client-&amp;gt;debug(true)&lt;/code&gt; which will then give you access to some log information through &lt;code&gt;$client-&amp;gt;getLog()&lt;/code&gt;.&lt;/p&gt;
 &lt;/blockquote&gt;
 
-&lt;p&gt;See more detailed information about &lt;a href=&quot;http://jonnnnyw.github.io/php-phantomjs/debugging.html&quot;&gt;debugging&lt;/a&gt;.&lt;/p&gt;
+&lt;p&gt;See more detailed information about &lt;a href=&quot;/debugging.html&quot;&gt;debugging&lt;/a&gt;.&lt;/p&gt;
 </description>
 				<pubDate>Fri, 25 Jul 2014 00:00:00 +0100</pubDate>
-				<link>http://jonnnnyw.github.io/php-phantomjs/advanced.html</link>
-				<guid isPermaLink="true">http://jonnnnyw.github.io/php-phantomjs/advanced.html</guid>
-			</item>
-		
-			<item>
-				<title>Debugging</title>
-				<description>&lt;p&gt;This documentation page will be up in the next couple of days.&lt;/p&gt;
-
-&lt;p&gt;In the meantime, check out the &lt;a href=&quot;https://github.com/jonnnnyw/php-phantomjs/tree/master/examples&quot;&gt;examples&lt;/a&gt; in the Github repo.&lt;/p&gt;
-</description>
-				<pubDate>Thu, 24 Jul 2014 00:00:00 +0100</pubDate>
-				<link>http://jonnnnyw.github.io/php-phantomjs/debugging.html</link>
-				<guid isPermaLink="true">http://jonnnnyw.github.io/php-phantomjs/debugging.html</guid>
+				<link>/advanced.html</link>
+				<guid isPermaLink="true">/advanced.html</guid>
 			</item>
 		
 			<item>
@@ -863,8 +860,8 @@ code etc.&lt;/li&gt;
 				<description>&lt;p&gt;This documentation page will be up in the next couple of days.&lt;/p&gt;
 </description>
 				<pubDate>Wed, 23 Jul 2014 00:00:00 +0100</pubDate>
-				<link>http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html</link>
-				<guid isPermaLink="true">http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html</guid>
+				<link>/troubleshooting.html</link>
+				<guid isPermaLink="true">/troubleshooting.html</guid>
 			</item>
 		
 	</channel>

+ 60 - 55
_site/index.html

@@ -15,10 +15,10 @@
 	<![endif]-->
 
 	<!-- Le styles -->
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/syntax/syntax.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/css/style.css" rel="stylesheet">
+	<link href="/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+	<link href="/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
+	<link href="/assets/resources/syntax/syntax.css" rel="stylesheet">
+	<link href="/assets/css/style.css" rel="stylesheet">
 
 	<!-- Le fav and touch icons -->
 	<!-- Update these with your own images
@@ -28,8 +28,8 @@
 	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
 	-->
 
-	<link rel="alternate" type="application/rss+xml" title="" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-	
+	<link rel="alternate" type="application/rss+xml" title="" href="/feed.xml">
+
     <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,7 +39,7 @@
         ga('create', 'UA-53289013-1', 'auto');
         ga('send', 'pageview');
     </script>
-    
+
 </head>
 
 <body>
@@ -53,15 +53,18 @@
 				<span class="icon-bar"></span>
 			</button>
 			
-			<!--
 			
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link last"></iframe>
+    		
 			
 			
-			
-			-->
-			
-			<a class="navbar-brand" href="http://jonnnnyw.github.io/php-phantomjs/">
-				<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs-small.png" class="img-circle" />
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link"></iframe>
+    		
+    		
+			<a class="navbar-brand" href="/">
+				<img src="/assets/media/phantomjs-small.png" class="img-circle" />
 				PHP PhantomJs
 			</a>
 		</div>
@@ -69,12 +72,11 @@
 		<!-- Collect the nav links, forms, and other content for toggling -->
 		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
 			<ul class="nav navbar-nav">
-				<li class="active"><a href="http://jonnnnyw.github.io/php-phantomjs/">Home</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">Installation</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">Usage</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">Advanced</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">Debugging</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html">Troubleshooting</a></li>
+				<li class="active"><a href="/">Home</a></li>
+				<li><a href="/installation.html">Installation</a></li>
+				<li><a href="/usage.html">Usage</a></li>
+				<li><a href="/advanced.html">Advanced</a></li>
+				<li><a href="/troubleshooting.html">Troubleshooting</a></li>
 			</ul>
 		</div><!-- /.navbar-collapse -->
 	</nav>
@@ -85,12 +87,11 @@
 			<i class="fa fa-bars"></i>
 		</button>
 		<ul class="dropdown-menu" role="menu">
-		    <li><a href="http://jonnnnyw.github.io/php-phantomjs/"><i class="fa fa-home"></i>Home</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html"><i class="fa fa-folder"></i>Debugging</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
+		    <li><a href="/"><i class="fa fa-home"></i>Home</a></li>
+			<li><a href="/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
+			<li><a href="/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
+			<li><a href="/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
+			<li><a href="/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
 			<li class="divider"></li>
 			<li><a href="#"><i class="fa fa-arrow-up"></i>Top of Page</a></li>
 		</ul>
@@ -99,11 +100,11 @@
 	<div class="col-sm-3 sidebar hidden-xs">
 		<! -- sidebar.html -->
 <header class="sidebar-header" role="banner">
-	<a href="http://jonnnnyw.github.io/php-phantomjs/">
-		<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs.png" class="img-circle" />
+	<a href="/">
+		<img src="/assets/media/phantomjs.png" class="img-circle" />
 	</a>
 	<h3 class="title">
-        <a href="http://jonnnnyw.github.io/php-phantomjs/">PHP PhantomJs</a>
+        <a href="/">PHP PhantomJs</a>
     </h3>
 </header>
 
@@ -114,22 +115,22 @@
 
 
 <div id="contact-list" class="text-center">
-<!--
+
 	<ul class="list-unstyled list-inline">
 		
-		
-		
-	</ul>
-	<ul id="contact-list-secondary" class="list-unstyled list-inline">
+		<li>
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
+		</li>
 		
 		
 		<li>
-			<a class="btn btn-default btn-sm" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-				<i class="fa fa-rss fa-lg"></i>
-			</a>
+			<iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
 		</li>
+		
 	</ul>
--->
+
 </div>
 <! -- sidebar.html end -->
 
@@ -173,7 +174,9 @@ code etc.</li>
 
 <p>It is recommended that you use Composer to install PHP PhantomJS. First, add the following to your project’s <code>composer.json</code> file:</p>
 
-<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="s">&quot;scripts&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
+<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="c1">#composer.json</span>
+
+    <span class="s">&quot;scripts&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
         <span class="s">&quot;post-install-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
             <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
         <span class="p-Indicator">],</span>
@@ -184,7 +187,9 @@ code etc.</li>
 
 <p>This will ensure the latest version of PhantomJS is installed for your system, in your bin folder. If you haven’t defined your bin folder in your composer.json, add the path:</p>
 
-<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="s">&quot;config&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
+<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="c1">#composer.json</span>
+    
+    <span class="s">&quot;config&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
         <span class="s">&quot;bin-dir&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;bin&quot;</span>
     <span class="p-Indicator">}</span></code></pre></div>
 
@@ -194,7 +199,7 @@ code etc.</li>
     
     <span class="nv">$ </span>composer require <span class="s2">&quot;jonnyw/php-phantomjs:3.*&quot;</span></code></pre></div>
 
-<p>If you would like to use another installation method or would like to see more detailed installation instructions, see the <a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">installation</a> documentation.</p>
+<p>If you would like to use another installation method or would like to see more detailed installation instructions, see the <a href="/installation.html">installation</a> documentation.</p>
 
 <h2 id="basic-usage">Basic Usage</h2>
 
@@ -247,27 +252,27 @@ code etc.</li>
     <span class="c1">// Send the request</span>
     <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
 
-<p>For more detailed examples see the <a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">usage</a> section, or to create your own custom scripts check out the <a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">advanced</a> documentation.</p>
+<p>For more detailed examples see the <a href="/usage.html">usage</a> section, or to create your own custom scripts check out the <a href="/advanced.html">advanced</a> documentation.</p>
 
 
     
   </div>
+  
+  <div class="clearfix"></div>
+  <hr/>
 
-</article>
-
-<hr/>
+  <ul class="pager"> 
+      
+      <li class="next">
+        <a href="/installation.html" title="Installation">Installation &rarr;</a>
+      </li>
+      
+  </ul>
 
-<ul class="pager"> 
+</article>
 
-  
 
-  
-  <li class="next">
-    <a href="http://jonnnnyw.github.io/php-phantomjs/page2">Next &rarr;</a>
-  </li>
-  
 
-</ul>
 
 
 
@@ -279,9 +284,9 @@ code etc.</li>
 		</footer>
 	</div>
 
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/jquery/jquery.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/js/bootstrap.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/js/app.js"></script>
+	<script type="text/javascript" src="/assets/resources/jquery/jquery.min.js"></script>
+	<script type="text/javascript" src="/assets/resources/bootstrap/js/bootstrap.min.js"></script>
+	<script type="text/javascript" src="/assets/js/app.js"></script>
 	
 </body>
 </html>

+ 59 - 57
_site/installation.html

@@ -15,10 +15,10 @@
 	<![endif]-->
 
 	<!-- Le styles -->
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/syntax/syntax.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/css/style.css" rel="stylesheet">
+	<link href="/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+	<link href="/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
+	<link href="/assets/resources/syntax/syntax.css" rel="stylesheet">
+	<link href="/assets/css/style.css" rel="stylesheet">
 
 	<!-- Le fav and touch icons -->
 	<!-- Update these with your own images
@@ -28,8 +28,8 @@
 	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
 	-->
 
-	<link rel="alternate" type="application/rss+xml" title="" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-	
+	<link rel="alternate" type="application/rss+xml" title="" href="/feed.xml">
+
     <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,7 +39,7 @@
         ga('create', 'UA-53289013-1', 'auto');
         ga('send', 'pageview');
     </script>
-    
+
 </head>
 
 <body>
@@ -53,15 +53,18 @@
 				<span class="icon-bar"></span>
 			</button>
 			
-			<!--
 			
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link last"></iframe>
+    		
 			
 			
-			
-			-->
-			
-			<a class="navbar-brand" href="http://jonnnnyw.github.io/php-phantomjs/">
-				<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs-small.png" class="img-circle" />
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link"></iframe>
+    		
+    		
+			<a class="navbar-brand" href="/">
+				<img src="/assets/media/phantomjs-small.png" class="img-circle" />
 				PHP PhantomJs
 			</a>
 		</div>
@@ -69,12 +72,11 @@
 		<!-- Collect the nav links, forms, and other content for toggling -->
 		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
 			<ul class="nav navbar-nav">
-				<li class="active"><a href="http://jonnnnyw.github.io/php-phantomjs/">Home</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">Installation</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">Usage</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">Advanced</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">Debugging</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html">Troubleshooting</a></li>
+				<li class="active"><a href="/">Home</a></li>
+				<li><a href="/installation.html">Installation</a></li>
+				<li><a href="/usage.html">Usage</a></li>
+				<li><a href="/advanced.html">Advanced</a></li>
+				<li><a href="/troubleshooting.html">Troubleshooting</a></li>
 			</ul>
 		</div><!-- /.navbar-collapse -->
 	</nav>
@@ -85,12 +87,11 @@
 			<i class="fa fa-bars"></i>
 		</button>
 		<ul class="dropdown-menu" role="menu">
-		    <li><a href="http://jonnnnyw.github.io/php-phantomjs/"><i class="fa fa-home"></i>Home</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html"><i class="fa fa-folder"></i>Debugging</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
+		    <li><a href="/"><i class="fa fa-home"></i>Home</a></li>
+			<li><a href="/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
+			<li><a href="/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
+			<li><a href="/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
+			<li><a href="/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
 			<li class="divider"></li>
 			<li><a href="#"><i class="fa fa-arrow-up"></i>Top of Page</a></li>
 		</ul>
@@ -99,11 +100,11 @@
 	<div class="col-sm-3 sidebar hidden-xs">
 		<! -- sidebar.html -->
 <header class="sidebar-header" role="banner">
-	<a href="http://jonnnnyw.github.io/php-phantomjs/">
-		<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs.png" class="img-circle" />
+	<a href="/">
+		<img src="/assets/media/phantomjs.png" class="img-circle" />
 	</a>
 	<h3 class="title">
-        <a href="http://jonnnnyw.github.io/php-phantomjs/">PHP PhantomJs</a>
+        <a href="/">PHP PhantomJs</a>
     </h3>
 </header>
 
@@ -114,22 +115,22 @@
 
 
 <div id="contact-list" class="text-center">
-<!--
+
 	<ul class="list-unstyled list-inline">
 		
-		
-		
-	</ul>
-	<ul id="contact-list-secondary" class="list-unstyled list-inline">
+		<li>
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
+		</li>
 		
 		
 		<li>
-			<a class="btn btn-default btn-sm" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-				<i class="fa fa-rss fa-lg"></i>
-			</a>
+			<iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
 		</li>
+		
 	</ul>
--->
+
 </div>
 <! -- sidebar.html end -->
 
@@ -166,7 +167,9 @@
 
 <p>Create a <code>composer.json</code> file in the root of your project:</p>
 
-<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="p-Indicator">{</span>
+<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="c1">#composer.json</span>
+
+    <span class="p-Indicator">{</span>
         <span class="s">&quot;require&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
             <span class="s">&quot;jonnyw/php-phantomjs&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;3.*&quot;</span>
         <span class="p-Indicator">},</span>
@@ -204,7 +207,9 @@
 
 <p>If you would like composer to install the PhantomJS executable to a custom location when installing dependencies, set the bin dir location in your project’s <code>composer.json</code> file:</p>
 
-<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="p-Indicator">{</span>
+<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="c1">#composer.json</span>
+
+    <span class="p-Indicator">{</span>
         <span class="s">&quot;config&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
             <span class="s">&quot;bin-dir&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;/path/to/your/projects/bin/dir&quot;</span>
         <span class="p-Indicator">}</span>
@@ -249,24 +254,21 @@
     </div>
 
     <div class="clearfix"></div>
+    
+    <hr>
+    <ul class="pager">
+        
+        <li class="previous"><a href="/introduction.html" title="Introduction">&larr; Introduction</a></li>
+        
+        
+        <li class="next"><a href="/usage.html" title="Usage">Usage &rarr;</a></li>
+        
+    </ul>
 
-		<ul class="pager">
-		  
-		  <li class="previous"><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html" title="Usage">&larr; Usage</a></li>
-		  
-		  
-		  <li class="next"><a href="http://jonnnnyw.github.io/php-phantomjs/introduction.html" title="Introduction">Introduction &rarr;</a></li>
-		  
-		</ul>
-
-		<hr>
-	</div>
-	
-	<div class="col-sm-2 sidebar-2">
 	
-	</div>
+    
 </article>
-<div class="clearfix"></div>
+
 
 
 
@@ -278,9 +280,9 @@
 		</footer>
 	</div>
 
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/jquery/jquery.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/js/bootstrap.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/js/app.js"></script>
+	<script type="text/javascript" src="/assets/resources/jquery/jquery.min.js"></script>
+	<script type="text/javascript" src="/assets/resources/bootstrap/js/bootstrap.min.js"></script>
+	<script type="text/javascript" src="/assets/js/app.js"></script>
 	
 </body>
 </html>

+ 59 - 57
_site/introduction.html

@@ -15,10 +15,10 @@
 	<![endif]-->
 
 	<!-- Le styles -->
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/syntax/syntax.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/css/style.css" rel="stylesheet">
+	<link href="/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+	<link href="/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
+	<link href="/assets/resources/syntax/syntax.css" rel="stylesheet">
+	<link href="/assets/css/style.css" rel="stylesheet">
 
 	<!-- Le fav and touch icons -->
 	<!-- Update these with your own images
@@ -28,8 +28,8 @@
 	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
 	-->
 
-	<link rel="alternate" type="application/rss+xml" title="" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-	
+	<link rel="alternate" type="application/rss+xml" title="" href="/feed.xml">
+
     <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,7 +39,7 @@
         ga('create', 'UA-53289013-1', 'auto');
         ga('send', 'pageview');
     </script>
-    
+
 </head>
 
 <body>
@@ -53,15 +53,18 @@
 				<span class="icon-bar"></span>
 			</button>
 			
-			<!--
 			
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link last"></iframe>
+    		
 			
 			
-			
-			-->
-			
-			<a class="navbar-brand" href="http://jonnnnyw.github.io/php-phantomjs/">
-				<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs-small.png" class="img-circle" />
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link"></iframe>
+    		
+    		
+			<a class="navbar-brand" href="/">
+				<img src="/assets/media/phantomjs-small.png" class="img-circle" />
 				PHP PhantomJs
 			</a>
 		</div>
@@ -69,12 +72,11 @@
 		<!-- Collect the nav links, forms, and other content for toggling -->
 		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
 			<ul class="nav navbar-nav">
-				<li class="active"><a href="http://jonnnnyw.github.io/php-phantomjs/">Home</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">Installation</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">Usage</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">Advanced</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">Debugging</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html">Troubleshooting</a></li>
+				<li class="active"><a href="/">Home</a></li>
+				<li><a href="/installation.html">Installation</a></li>
+				<li><a href="/usage.html">Usage</a></li>
+				<li><a href="/advanced.html">Advanced</a></li>
+				<li><a href="/troubleshooting.html">Troubleshooting</a></li>
 			</ul>
 		</div><!-- /.navbar-collapse -->
 	</nav>
@@ -85,12 +87,11 @@
 			<i class="fa fa-bars"></i>
 		</button>
 		<ul class="dropdown-menu" role="menu">
-		    <li><a href="http://jonnnnyw.github.io/php-phantomjs/"><i class="fa fa-home"></i>Home</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html"><i class="fa fa-folder"></i>Debugging</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
+		    <li><a href="/"><i class="fa fa-home"></i>Home</a></li>
+			<li><a href="/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
+			<li><a href="/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
+			<li><a href="/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
+			<li><a href="/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
 			<li class="divider"></li>
 			<li><a href="#"><i class="fa fa-arrow-up"></i>Top of Page</a></li>
 		</ul>
@@ -99,11 +100,11 @@
 	<div class="col-sm-3 sidebar hidden-xs">
 		<! -- sidebar.html -->
 <header class="sidebar-header" role="banner">
-	<a href="http://jonnnnyw.github.io/php-phantomjs/">
-		<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs.png" class="img-circle" />
+	<a href="/">
+		<img src="/assets/media/phantomjs.png" class="img-circle" />
 	</a>
 	<h3 class="title">
-        <a href="http://jonnnnyw.github.io/php-phantomjs/">PHP PhantomJs</a>
+        <a href="/">PHP PhantomJs</a>
     </h3>
 </header>
 
@@ -114,22 +115,22 @@
 
 
 <div id="contact-list" class="text-center">
-<!--
+
 	<ul class="list-unstyled list-inline">
 		
-		
-		
-	</ul>
-	<ul id="contact-list-secondary" class="list-unstyled list-inline">
+		<li>
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
+		</li>
 		
 		
 		<li>
-			<a class="btn btn-default btn-sm" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-				<i class="fa fa-rss fa-lg"></i>
-			</a>
+			<iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
 		</li>
+		
 	</ul>
--->
+
 </div>
 <! -- sidebar.html end -->
 
@@ -171,7 +172,9 @@ code etc.</li>
 
 <p>It is recommended that you use Composer to install PHP PhantomJS. First, add the following to your project’s <code>composer.json</code> file:</p>
 
-<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="s">&quot;scripts&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
+<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="c1">#composer.json</span>
+
+    <span class="s">&quot;scripts&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
         <span class="s">&quot;post-install-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
             <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
         <span class="p-Indicator">],</span>
@@ -182,7 +185,9 @@ code etc.</li>
 
 <p>This will ensure the latest version of PhantomJS is installed for your system, in your bin folder. If you haven’t defined your bin folder in your composer.json, add the path:</p>
 
-<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="s">&quot;config&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
+<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="c1">#composer.json</span>
+    
+    <span class="s">&quot;config&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
         <span class="s">&quot;bin-dir&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;bin&quot;</span>
     <span class="p-Indicator">}</span></code></pre></div>
 
@@ -192,7 +197,7 @@ code etc.</li>
     
     <span class="nv">$ </span>composer require <span class="s2">&quot;jonnyw/php-phantomjs:3.*&quot;</span></code></pre></div>
 
-<p>If you would like to use another installation method or would like to see more detailed installation instructions, see the <a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">installation</a> documentation.</p>
+<p>If you would like to use another installation method or would like to see more detailed installation instructions, see the <a href="/installation.html">installation</a> documentation.</p>
 
 <h2 id="basic-usage">Basic Usage</h2>
 
@@ -245,7 +250,7 @@ code etc.</li>
     <span class="c1">// Send the request</span>
     <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
 
-<p>For more detailed examples see the <a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">usage</a> section, or to create your own custom scripts check out the <a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">advanced</a> documentation.</p>
+<p>For more detailed examples see the <a href="/usage.html">usage</a> section, or to create your own custom scripts check out the <a href="/advanced.html">advanced</a> documentation.</p>
 
 
 	  </div>
@@ -253,22 +258,19 @@ code etc.</li>
     </div>
 
     <div class="clearfix"></div>
+    
+    <hr>
+    <ul class="pager">
+        
+        
+        <li class="next"><a href="/installation.html" title="Installation">Installation &rarr;</a></li>
+        
+    </ul>
 
-		<ul class="pager">
-		  
-		  <li class="previous"><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html" title="Installation">&larr; Installation</a></li>
-		  
-		  
-		</ul>
-
-		<hr>
-	</div>
-	
-	<div class="col-sm-2 sidebar-2">
 	
-	</div>
+    
 </article>
-<div class="clearfix"></div>
+
 
 
 
@@ -280,9 +282,9 @@ code etc.</li>
 		</footer>
 	</div>
 
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/jquery/jquery.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/js/bootstrap.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/js/app.js"></script>
+	<script type="text/javascript" src="/assets/resources/jquery/jquery.min.js"></script>
+	<script type="text/javascript" src="/assets/resources/bootstrap/js/bootstrap.min.js"></script>
+	<script type="text/javascript" src="/assets/js/app.js"></script>
 	
 </body>
 </html>

+ 122 - 119
_site/page2/index.html

@@ -15,10 +15,10 @@
 	<![endif]-->
 
 	<!-- Le styles -->
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/syntax/syntax.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/css/style.css" rel="stylesheet">
+	<link href="/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+	<link href="/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
+	<link href="/assets/resources/syntax/syntax.css" rel="stylesheet">
+	<link href="/assets/css/style.css" rel="stylesheet">
 
 	<!-- Le fav and touch icons -->
 	<!-- Update these with your own images
@@ -28,8 +28,8 @@
 	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
 	-->
 
-	<link rel="alternate" type="application/rss+xml" title="" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-	
+	<link rel="alternate" type="application/rss+xml" title="" href="/feed.xml">
+
     <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,7 +39,7 @@
         ga('create', 'UA-53289013-1', 'auto');
         ga('send', 'pageview');
     </script>
-    
+
 </head>
 
 <body>
@@ -53,15 +53,18 @@
 				<span class="icon-bar"></span>
 			</button>
 			
-			<!--
-			
-			
 			
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link last"></iframe>
+    		
 			
-			-->
 			
-			<a class="navbar-brand" href="http://jonnnnyw.github.io/php-phantomjs/">
-				<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs-small.png" class="img-circle" />
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link"></iframe>
+    		
+    		
+			<a class="navbar-brand" href="/">
+				<img src="/assets/media/phantomjs-small.png" class="img-circle" />
 				PHP PhantomJs
 			</a>
 		</div>
@@ -69,12 +72,11 @@
 		<!-- Collect the nav links, forms, and other content for toggling -->
 		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
 			<ul class="nav navbar-nav">
-				<li class="active"><a href="http://jonnnnyw.github.io/php-phantomjs/">Home</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">Installation</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">Usage</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">Advanced</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">Debugging</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html">Troubleshooting</a></li>
+				<li class="active"><a href="/">Home</a></li>
+				<li><a href="/installation.html">Installation</a></li>
+				<li><a href="/usage.html">Usage</a></li>
+				<li><a href="/advanced.html">Advanced</a></li>
+				<li><a href="/troubleshooting.html">Troubleshooting</a></li>
 			</ul>
 		</div><!-- /.navbar-collapse -->
 	</nav>
@@ -85,12 +87,11 @@
 			<i class="fa fa-bars"></i>
 		</button>
 		<ul class="dropdown-menu" role="menu">
-		    <li><a href="http://jonnnnyw.github.io/php-phantomjs/"><i class="fa fa-home"></i>Home</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html"><i class="fa fa-folder"></i>Debugging</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
+		    <li><a href="/"><i class="fa fa-home"></i>Home</a></li>
+			<li><a href="/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
+			<li><a href="/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
+			<li><a href="/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
+			<li><a href="/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
 			<li class="divider"></li>
 			<li><a href="#"><i class="fa fa-arrow-up"></i>Top of Page</a></li>
 		</ul>
@@ -99,11 +100,11 @@
 	<div class="col-sm-3 sidebar hidden-xs">
 		<! -- sidebar.html -->
 <header class="sidebar-header" role="banner">
-	<a href="http://jonnnnyw.github.io/php-phantomjs/">
-		<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs.png" class="img-circle" />
+	<a href="/">
+		<img src="/assets/media/phantomjs.png" class="img-circle" />
 	</a>
 	<h3 class="title">
-        <a href="http://jonnnnyw.github.io/php-phantomjs/">PHP PhantomJs</a>
+        <a href="/">PHP PhantomJs</a>
     </h3>
 </header>
 
@@ -114,22 +115,22 @@
 
 
 <div id="contact-list" class="text-center">
-<!--
+
 	<ul class="list-unstyled list-inline">
 		
-		
-		
-	</ul>
-	<ul id="contact-list-secondary" class="list-unstyled list-inline">
+		<li>
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
+		</li>
 		
 		
 		<li>
-			<a class="btn btn-default btn-sm" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-				<i class="fa fa-rss fa-lg"></i>
-			</a>
+			<iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
 		</li>
+		
 	</ul>
--->
+
 </div>
 <! -- sidebar.html end -->
 
@@ -140,136 +141,138 @@
 
 
 <div class="page-header">
-  <h1>Installation </h1>
+  <h1>Introduction </h1>
 </div>
 
 <article class="home">
 
   <div>
     
-    <ul>
-  <li><a href="#prerequisites">Prerequisites</a></li>
-  <li><a href="#installing-via-composer">Installing via Composer</a></li>
-  <li><a href="#custom-installation">Custom Installation</a></li>
-  <li><a href="#installing-from-tarball">Installing from tarball</a></li>
+    <p>PHP PhantomJS is a flexible PHP library to load pages through the PhantomJS headless browser and return the page response. It is handy for testing websites that demand javascript support and also supports screen captures.</p>
+
+<h2 id="feature-list">Feature List</h2>
+
+<ul>
+  <li>Load webpages through the PhantomJS headless browser</li>
+  <li>View detailed response data including page content, headers, status<br />
+code etc.</li>
+  <li>Handle redirects</li>
+  <li>View javascript console errors</li>
+  <li>View detailed PhantomJS debuged information</li>
+  <li>Save screen captures to local disk</li>
+  <li>Define screen capture x, y, width and height parameters</li>
+  <li>Delay page rendering for a specified time</li>
+  <li>Execute PhantomJS with command line options</li>
+  <li>Easily build and run custom PhantomJS scripts</li>
 </ul>
 
 <h2 id="prerequisites">Prerequisites</h2>
 
 <p>PHP PhantomJS requires PHP <strong>5.3.0</strong> or greater to run.</p>
 
-<h2 id="installing-via-composer">Installing via Composer</h2>
+<h2 id="installation">Installation</h2>
 
-<p>Install <a href="https://getcomposer.org/">Composer</a> for your project:</p>
+<p>It is recommended that you use Composer to install PHP PhantomJS. First, add the following to your project’s <code>composer.json</code> file:</p>
 
-<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c">#bash</span>
+<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="c1">#composer.json</span>
 
-    <span class="nv">$ </span>curl -s http://getcomposer.org/installer <span class="p">|</span> php</code></pre></div>
-
-<p>Create a <code>composer.json</code> file in the root of your project:</p>
-
-<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="p-Indicator">{</span>
-        <span class="s">&quot;require&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
-            <span class="s">&quot;jonnyw/php-phantomjs&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;3.*&quot;</span>
-        <span class="p-Indicator">},</span>
-        <span class="s">&quot;config&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
-            <span class="s">&quot;bin-dir&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;bin&quot;</span>
-        <span class="p-Indicator">},</span>
-        <span class="s">&quot;scripts&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
-            <span class="s">&quot;post-install-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
-                <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
-            <span class="p-Indicator">],</span>
-            <span class="s">&quot;post-update-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
-                <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
-            <span class="p-Indicator">]</span>
-        <span class="p-Indicator">}</span>
+    <span class="s">&quot;scripts&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
+        <span class="s">&quot;post-install-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
+            <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
+        <span class="p-Indicator">],</span>
+        <span class="s">&quot;post-update-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
+            <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
+        <span class="p-Indicator">]</span>
     <span class="p-Indicator">}</span></code></pre></div>
 
-<p>It is important that you have the ‘scripts’ section shown above in your <code>composer.json</code> file as it will install the latest version of PhantomJS for your system to your project’s bin folder. It is recommended that you create a bin folder in the root of your project as this is where the PHP PhantomJS library will look for your PhantomJS executable. If you would prefer to use a PhantomJS executable in a custom location, see the <a href="#custom-installation">Custom Installation</a> section.</p>
+<p>This will ensure the latest version of PhantomJS is installed for your system, in your bin folder. If you haven’t defined your bin folder in your composer.json, add the path:</p>
+
+<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="c1">#composer.json</span>
+    
+    <span class="s">&quot;config&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
+        <span class="s">&quot;bin-dir&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;bin&quot;</span>
+    <span class="p-Indicator">}</span></code></pre></div>
 
-<p>Finally, install the composer depedencies for your project:</p>
+<p>Finally, install PHP PhantomJS from the root of your project:</p>
 
 <div class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c">#bash</span>
     
-    <span class="nv">$ </span>php composer.phar install</code></pre></div>
+    <span class="nv">$ </span>composer require <span class="s2">&quot;jonnyw/php-phantomjs:3.*&quot;</span></code></pre></div>
 
-<h2 id="custom-installation">Custom Installation</h2>
+<p>If you would like to use another installation method or would like to see more detailed installation instructions, see the <a href="/installation.html">installation</a> documentation.</p>
 
-<p>If you would prefer to use a custom install location for the PhantomJS executable, you simply need to tell the client where to find the executable file:</p>
+<h2 id="basic-usage">Basic Usage</h2>
+
+<p>The following illustrates how to make a basic GET request and output the page content:</p>
 
 <div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
-    
+
     <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
 
     <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">setPhantomJs</span><span class="p">(</span><span class="s1">&#39;/path/to/phantomjs&#39;</span><span class="p">);</span></code></pre></div>
 
-<p>If you would like composer to install the PhantomJS executable to a custom location when installing dependencies, set the bin dir location in your project’s <code>composer.json</code> file:</p>
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\Request </span>
+<span class="sd">     **/</span>
+    <span class="nv">$request</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">,</span> <span class="s1">&#39;GET&#39;</span><span class="p">);</span>
 
-<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="p-Indicator">{</span>
-        <span class="s">&quot;config&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
-            <span class="s">&quot;bin-dir&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;/path/to/your/projects/bin/dir&quot;</span>
-        <span class="p-Indicator">}</span>
-    <span class="p-Indicator">}</span></code></pre></div>
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\Response </span>
+<span class="sd">     **/</span>
+    <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
 
-<p>You will need to make sure that this directory exists and is writable by Composer before running the composer install.</p>
+    <span class="c1">// Send the request</span>
+    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span>
 
-<p>Once you have updated your bin location run composer install to install PhantomJS:</p>
+    <span class="k">if</span><span class="p">(</span><span class="nv">$response</span><span class="o">-&gt;</span><span class="na">getStatus</span><span class="p">()</span> <span class="o">===</span> <span class="mi">200</span><span class="p">)</span> <span class="p">{</span>
 
-<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c">#bash</span>
-    
-    <span class="nv">$ </span>php composer.phar install</code></pre></div>
+        <span class="c1">// Dump the requested page content</span>
+        <span class="k">echo</span> <span class="nv">$response</span><span class="o">-&gt;</span><span class="na">getContent</span><span class="p">();</span>
+    <span class="p">}</span></code></pre></div>
 
-<p>This should install the correct PhantomJS executable for your system to the bin locaiton you defined in your <code>composer.json</code> file. As mentioned above, you will need to tell the client where to find your PhantomJS executable as it is not installed in the default location:</p>
+<p>And if you would like to save a screen capture to local disk:</p>
+
+<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
 
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span> 
-    
     <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
 
     <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">setPhantomJs</span><span class="p">(</span><span class="s1">&#39;/path/to/phantomjs&#39;</span><span class="p">);</span></code></pre></div>
 
-<h2 id="installing-from-tarball">Installing from tarball</h2>
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\CaptureRequest</span>
+<span class="sd">     **/</span>
+    <span class="nv">$request</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createCaptureRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">,</span> <span class="s1">&#39;GET&#39;</span><span class="p">);</span>
+    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setCaptureFile</span><span class="p">(</span><span class="s1">&#39;/path/to/save/capture/file.jpg&#39;</span><span class="p">);</span>
 
-<p>The PHP PhantomJS library contains several depedencies in order to function so it is recommended that you install it via composer as this will handle your dependencies for you. If you do wish to install it from a <a href="https://github.com/jonnnnyw/php-phantomjs/tags">tarball release</a> then you will need to install the dependencies manually.</p>
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\Response </span>
+<span class="sd">     **/</span>
+    <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
 
-<p>The PHP PhantomJS library currently requires the following depdencies:</p>
+    <span class="c1">// Send the request</span>
+    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
 
-<ul>
-  <li><a href="https://github.com/symfony/Config">Symfony Config Component</a> ~2.5</li>
-  <li><a href="https://github.com/symfony/Yaml">Symfony YAML Component</a> ~2.5</li>
-  <li><a href="https://github.com/symfony/DependencyInjection">Symfony Dependency Injection Component</a> ~2.5</li>
-  <li><a href="https://github.com/symfony/filesystem">Symfony Filesystem Component</a> ~2.5</li>
-  <li><a href="https://github.com/fabpot/Twig">Twig templating Component</a> ~1.16</li>
-  <li><a href="http://phantomjs.org/">PhantomJS</a> ~1.9</li>
-</ul>
+<p>For more detailed examples see the <a href="/usage.html">usage</a> section, or to create your own custom scripts check out the <a href="/advanced.html">advanced</a> documentation.</p>
 
-<p>Make sure the components are in your include path and that the PhantomJS executable is installed to your projects bin folder as mentioned in the <a href="#custom-installation">Custom Installation</a> section.</p>
 
     
   </div>
+  
+  <div class="clearfix"></div>
+  <hr/>
+
+  <ul class="pager"> 
+      
+      <li class="next">
+        <a href="/installation.html" title="Installation">Installation &rarr;</a>
+      </li>
+      
+  </ul>
 
 </article>
 
-<hr/>
 
-<ul class="pager"> 
 
-  
-  <li class="previous">
-    
-    <a href="http://jonnnnyw.github.io/php-phantomjs/">&larr; Previous</a>
-    
-  </li>
-  
-
-  
-  <li class="next">
-    <a href="http://jonnnnyw.github.io/php-phantomjs/page3">Next &rarr;</a>
-  </li>
-  
-
-</ul>
 
 
 
@@ -281,9 +284,9 @@
 		</footer>
 	</div>
 
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/jquery/jquery.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/js/bootstrap.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/js/app.js"></script>
+	<script type="text/javascript" src="/assets/resources/jquery/jquery.min.js"></script>
+	<script type="text/javascript" src="/assets/resources/bootstrap/js/bootstrap.min.js"></script>
+	<script type="text/javascript" src="/assets/js/app.js"></script>
 	
 </body>
 </html>

+ 117 - 308
_site/page3/index.html

@@ -15,10 +15,10 @@
 	<![endif]-->
 
 	<!-- Le styles -->
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/syntax/syntax.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/css/style.css" rel="stylesheet">
+	<link href="/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+	<link href="/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
+	<link href="/assets/resources/syntax/syntax.css" rel="stylesheet">
+	<link href="/assets/css/style.css" rel="stylesheet">
 
 	<!-- Le fav and touch icons -->
 	<!-- Update these with your own images
@@ -28,8 +28,8 @@
 	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
 	-->
 
-	<link rel="alternate" type="application/rss+xml" title="" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-	
+	<link rel="alternate" type="application/rss+xml" title="" href="/feed.xml">
+
     <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,7 +39,7 @@
         ga('create', 'UA-53289013-1', 'auto');
         ga('send', 'pageview');
     </script>
-    
+
 </head>
 
 <body>
@@ -53,15 +53,18 @@
 				<span class="icon-bar"></span>
 			</button>
 			
-			<!--
-			
 			
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link last"></iframe>
+    		
 			
 			
-			-->
-			
-			<a class="navbar-brand" href="http://jonnnnyw.github.io/php-phantomjs/">
-				<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs-small.png" class="img-circle" />
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link"></iframe>
+    		
+    		
+			<a class="navbar-brand" href="/">
+				<img src="/assets/media/phantomjs-small.png" class="img-circle" />
 				PHP PhantomJs
 			</a>
 		</div>
@@ -69,12 +72,11 @@
 		<!-- Collect the nav links, forms, and other content for toggling -->
 		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
 			<ul class="nav navbar-nav">
-				<li class="active"><a href="http://jonnnnyw.github.io/php-phantomjs/">Home</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">Installation</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">Usage</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">Advanced</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">Debugging</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html">Troubleshooting</a></li>
+				<li class="active"><a href="/">Home</a></li>
+				<li><a href="/installation.html">Installation</a></li>
+				<li><a href="/usage.html">Usage</a></li>
+				<li><a href="/advanced.html">Advanced</a></li>
+				<li><a href="/troubleshooting.html">Troubleshooting</a></li>
 			</ul>
 		</div><!-- /.navbar-collapse -->
 	</nav>
@@ -85,12 +87,11 @@
 			<i class="fa fa-bars"></i>
 		</button>
 		<ul class="dropdown-menu" role="menu">
-		    <li><a href="http://jonnnnyw.github.io/php-phantomjs/"><i class="fa fa-home"></i>Home</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html"><i class="fa fa-folder"></i>Debugging</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
+		    <li><a href="/"><i class="fa fa-home"></i>Home</a></li>
+			<li><a href="/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
+			<li><a href="/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
+			<li><a href="/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
+			<li><a href="/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
 			<li class="divider"></li>
 			<li><a href="#"><i class="fa fa-arrow-up"></i>Top of Page</a></li>
 		</ul>
@@ -99,11 +100,11 @@
 	<div class="col-sm-3 sidebar hidden-xs">
 		<! -- sidebar.html -->
 <header class="sidebar-header" role="banner">
-	<a href="http://jonnnnyw.github.io/php-phantomjs/">
-		<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs.png" class="img-circle" />
+	<a href="/">
+		<img src="/assets/media/phantomjs.png" class="img-circle" />
 	</a>
 	<h3 class="title">
-        <a href="http://jonnnnyw.github.io/php-phantomjs/">PHP PhantomJs</a>
+        <a href="/">PHP PhantomJs</a>
     </h3>
 </header>
 
@@ -114,22 +115,22 @@
 
 
 <div id="contact-list" class="text-center">
-<!--
+
 	<ul class="list-unstyled list-inline">
 		
-		
-		
-	</ul>
-	<ul id="contact-list-secondary" class="list-unstyled list-inline">
+		<li>
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
+		</li>
 		
 		
 		<li>
-			<a class="btn btn-default btn-sm" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-				<i class="fa fa-rss fa-lg"></i>
-			</a>
+			<iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
 		</li>
+		
 	</ul>
--->
+
 </div>
 <! -- sidebar.html end -->
 
@@ -140,330 +141,138 @@
 
 
 <div class="page-header">
-  <h1>Usage </h1>
+  <h1>Introduction </h1>
 </div>
 
 <article class="home">
 
   <div>
     
-    <p>This page contains some common examples of how to use the PHP PhantomJS library.</p>
+    <p>PHP PhantomJS is a flexible PHP library to load pages through the PhantomJS headless browser and return the page response. It is handy for testing websites that demand javascript support and also supports screen captures.</p>
+
+<h2 id="feature-list">Feature List</h2>
 
 <ul>
-  <li><a href="#basic-request">Basic Request</a></li>
-  <li><a href="#post-request">POST Request</a></li>
-  <li><a href="#other-request-methods">Other Request Methods</a></li>
-  <li><a href="#response-data">Response Data</a></li>
-  <li><a href="#screen-captures">Screen Captures</a></li>
-  <li><a href="#custom-timeout">Custom Timeout</a></li>
-  <li><a href="#delay-page-render">Delay Page Render</a></li>
-  <li><a href="#custom-run-options">Custom Run Options</a></li>
+  <li>Load webpages through the PhantomJS headless browser</li>
+  <li>View detailed response data including page content, headers, status<br />
+code etc.</li>
+  <li>Handle redirects</li>
+  <li>View javascript console errors</li>
+  <li>View detailed PhantomJS debuged information</li>
+  <li>Save screen captures to local disk</li>
+  <li>Define screen capture x, y, width and height parameters</li>
+  <li>Delay page rendering for a specified time</li>
+  <li>Execute PhantomJS with command line options</li>
+  <li>Easily build and run custom PhantomJS scripts</li>
 </ul>
 
-<p>For more advanced customization or to load your own PhantomJS scripts, see the <a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">advanced</a> documentation.</p>
+<h2 id="prerequisites">Prerequisites</h2>
 
-<h2 id="basic-request">Basic Request</h2>
+<p>PHP PhantomJS requires PHP <strong>5.3.0</strong> or greater to run.</p>
 
-<p>A basic GET request:</p>
+<h2 id="installation">Installation</h2>
 
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
-    
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    
-    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    
-    <span class="nv">$request</span>  <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">();</span>
-    <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
-    
-    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setMethod</span><span class="p">(</span><span class="s1">&#39;GET&#39;</span><span class="p">);</span>
-    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setUrl</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">);</span>
-    
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span>
-    
-    <span class="k">if</span><span class="p">(</span><span class="nv">$response</span><span class="o">-&gt;</span><span class="na">getStatus</span><span class="p">()</span> <span class="o">===</span> <span class="mi">200</span><span class="p">)</span> <span class="p">{</span>
-        <span class="k">echo</span> <span class="nv">$response</span><span class="o">-&gt;</span><span class="na">getContent</span><span class="p">();</span>
-    <span class="p">}</span></code></pre></div>
+<p>It is recommended that you use Composer to install PHP PhantomJS. First, add the following to your project’s <code>composer.json</code> file:</p>
 
-<p>You can also set the URL, request method and timeout period when creating a new request instance through the message factory:</p>
+<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="c1">#composer.json</span>
 
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
-     
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    
-    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    
-    <span class="nv">$request</span>  <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">,</span> <span class="s1">&#39;GET&#39;</span><span class="p">,</span> <span class="mi">5000</span><span class="p">);</span>
-    <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
-        
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span>
-    
-    <span class="k">if</span><span class="p">(</span><span class="nv">$response</span><span class="o">-&gt;</span><span class="na">getStatus</span><span class="p">()</span> <span class="o">===</span> <span class="mi">200</span><span class="p">)</span> <span class="p">{</span>
-        <span class="k">echo</span> <span class="nv">$response</span><span class="o">-&gt;</span><span class="na">getContent</span><span class="p">();</span>
-    <span class="p">}</span></code></pre></div>
-
-<h2 id="post-request">POST Request</h2>
+    <span class="s">&quot;scripts&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
+        <span class="s">&quot;post-install-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
+            <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
+        <span class="p-Indicator">],</span>
+        <span class="s">&quot;post-update-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
+            <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
+        <span class="p-Indicator">]</span>
+    <span class="p-Indicator">}</span></code></pre></div>
 
-<p>A basic POST request:</p>
+<p>This will ensure the latest version of PhantomJS is installed for your system, in your bin folder. If you haven’t defined your bin folder in your composer.json, add the path:</p>
 
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
-    
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    
-    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    
-    <span class="nv">$request</span>  <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">();</span>
-    <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
+<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="c1">#composer.json</span>
     
-    <span class="nv">$data</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
-        <span class="s1">&#39;param1&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Param 1&#39;</span><span class="p">,</span>
-        <span class="s1">&#39;param2&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Param 2&#39;</span>
-    <span class="p">);</span>
-    
-    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setMethod</span><span class="p">(</span><span class="s1">&#39;POST&#39;</span><span class="p">);</span>
-    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setUrl</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">);</span>
-    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setRequestData</span><span class="p">(</span><span class="nv">$data</span><span class="p">);</span> <span class="c1">// Set post data</span>
-    
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
-
-<h2 id="other-request-methods">Other Request Methods</h2>
+    <span class="s">&quot;config&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
+        <span class="s">&quot;bin-dir&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;bin&quot;</span>
+    <span class="p-Indicator">}</span></code></pre></div>
 
-<p>The PHP PhantomJS library supports the following request methods:</p>
+<p>Finally, install PHP PhantomJS from the root of your project:</p>
 
-<ul>
-  <li>OPTIONS</li>
-  <li>GET</li>
-  <li>HEAD</li>
-  <li>POST</li>
-  <li>PUT</li>
-  <li>DELETE</li>
-  <li>PATCH</li>
-</ul>
-
-<p>The request method can be set when creating a new request instance through the message factory:</p>
-
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
-
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    
-    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
+<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c">#bash</span>
     
-    <span class="nv">$request</span>  <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">,</span> <span class="s1">&#39;PUT&#39;</span><span class="p">);</span></code></pre></div>
+    <span class="nv">$ </span>composer require <span class="s2">&quot;jonnyw/php-phantomjs:3.*&quot;</span></code></pre></div>
 
-<p>Or on the request instance itself:</p>
+<p>If you would like to use another installation method or would like to see more detailed installation instructions, see the <a href="/installation.html">installation</a> documentation.</p>
 
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
+<h2 id="basic-usage">Basic Usage</h2>
 
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    
-    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    
-    <span class="nv">$request</span>  <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">();</span>
-    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setMethod</span><span class="p">(</span><span class="s1">&#39;PATCH&#39;</span><span class="p">);</span></code></pre></div>
-
-<h2 id="response-data">Response Data</h2>
-
-<p>A standard response gives you access to the following interface:</p>
-
-<table>
-  <thead>
-    <tr>
-      <th style="text-align: center">Accessor</th>
-      <th>Description</th>
-      <th style="text-align: center">Return Type</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td style="text-align: center">getHeaders()</td>
-      <td>Returns an array of all response headers.</td>
-      <td style="text-align: center">Array</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getHeader(<em>header</em>)</td>
-      <td>Returns the value for a specific response header e.g. Content-Type.</td>
-      <td style="text-align: center">Mixed</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getStatus()</td>
-      <td>The response status code e.g. 200.</td>
-      <td style="text-align: center">Int</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getContent()</td>
-      <td>The raw page content of the requested page.</td>
-      <td style="text-align: center">String</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getContentType()</td>
-      <td>The content type of the requested page.</td>
-      <td style="text-align: center">String</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getUrl()</td>
-      <td>The URL of the requested page.</td>
-      <td style="text-align: center">String</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getRedirectUrl()</td>
-      <td>If the response was a redirect, this will return the redirect URL.</td>
-      <td style="text-align: center">String</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">isRedirect()</td>
-      <td>Will return true if the response was a redirect or false otherwise.</td>
-      <td style="text-align: center">Boolean</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getConsole()</td>
-      <td>Returns an array of any javascript errors on the requested page along with a stack trace.</td>
-      <td style="text-align: center">Array</td>
-    </tr>
-  </tbody>
-</table>
-
-<p>If the response contains a status code of 0, chances are the request failed. Check the request <a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">debug log</a> for more detailed information about what may have gone wrong.</p>
-
-<h2 id="screen-captures">Screen Captures</h2>
-
-<p>You can save screen captures of a page to your local disk by creating a screen capture request and setting the path you wish to save the file to:</p>
+<p>The following illustrates how to make a basic GET request and output the page content:</p>
 
 <div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
 
     <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    
-    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    
-    <span class="nv">$request</span>  <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createCaptureRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">);</span>
-    <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
-    
-    <span class="nv">$file</span> <span class="o">=</span> <span class="s1">&#39;/path/to/save/your/screen/capture/file.jpg&#39;</span><span class="p">;</span>
-    
-    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setCaptureFile</span><span class="p">(</span><span class="nv">$file</span><span class="p">);</span>
-    
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
-
-<p>You will need to make sure the directory that you are saving the file to exists and is writable by your application.</p>
-
-<p>You can also set the width, height, x and y axis for your screen capture:</p>
-
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
 
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    
     <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    
-    <span class="nv">$request</span>  <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createCaptureRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">);</span>
-    <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
-    
-    <span class="nv">$file</span> <span class="o">=</span> <span class="s1">&#39;/path/to/save/your/screen/capture/file.jpg&#39;</span><span class="p">;</span>
-    
-    <span class="nv">$top</span>    <span class="o">=</span> <span class="mi">10</span><span class="p">;</span>
-    <span class="nv">$left</span>   <span class="o">=</span> <span class="mi">10</span><span class="p">;</span>
-    <span class="nv">$width</span>  <span class="o">=</span> <span class="mi">200</span><span class="p">;</span>
-    <span class="nv">$height</span> <span class="o">=</span> <span class="mi">400</span><span class="p">;</span>
-    
-    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setCaptureFile</span><span class="p">(</span><span class="nv">$file</span><span class="p">);</span>
-    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setCaptureDimensions</span><span class="p">(</span><span class="nv">$width</span><span class="p">,</span> <span class="nv">$height</span><span class="p">,</span> <span class="nv">$top</span><span class="p">,</span> <span class="nv">$left</span><span class="p">);</span>
-    
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
 
-<h2 id="custom-timeout">Custom Timeout</h2>
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\Request </span>
+<span class="sd">     **/</span>
+    <span class="nv">$request</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">,</span> <span class="s1">&#39;GET&#39;</span><span class="p">);</span>
 
-<p>By default, each request will timeout after 5 seconds. You can set a custom timeout period (in milliseconds) for each request:</p>
-
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
-
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    
-    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    
-    <span class="nv">$request</span>  <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">);</span>
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\Response </span>
+<span class="sd">     **/</span>
     <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
-    
-    <span class="nv">$timeout</span> <span class="o">=</span> <span class="mi">10000</span><span class="p">;</span> <span class="c1">// 10 seconds</span>
-    
-    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setTimeout</span><span class="p">(</span><span class="nv">$timeout</span><span class="p">);</span>
-    
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
-
-<h2 id="delay-page-render">Delay Page Render</h2>
-
-<p>Sometimes when taking screen captures you may want to wait until the page is completely loaded before saving the capture. In this instance you can set a page render delay (in seconds) for the request:</p>
 
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
-
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    
-    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    
-    <span class="nv">$request</span>  <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createCaptureRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">);</span>
-    <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
-    
-    <span class="nv">$delay</span> <span class="o">=</span> <span class="mi">5</span><span class="p">;</span> <span class="c1">// 5 seconds</span>
-    
-    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setDelay</span><span class="p">(</span><span class="nv">$delay</span><span class="p">);</span>
-    
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
+    <span class="c1">// Send the request</span>
+    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span>
 
-<p>You can set a page render delay for standard requests also.</p>
+    <span class="k">if</span><span class="p">(</span><span class="nv">$response</span><span class="o">-&gt;</span><span class="na">getStatus</span><span class="p">()</span> <span class="o">===</span> <span class="mi">200</span><span class="p">)</span> <span class="p">{</span>
 
-<h2 id="custom-run-options">Custom Run Options</h2>
+        <span class="c1">// Dump the requested page content</span>
+        <span class="k">echo</span> <span class="nv">$response</span><span class="o">-&gt;</span><span class="na">getContent</span><span class="p">();</span>
+    <span class="p">}</span></code></pre></div>
 
-<p>The PhantomJS API contains a range of command line options that can be passed when executing the PhantomJS executable. These can also be passed in via the client before a request:</p>
+<p>And if you would like to save a screen capture to local disk:</p>
 
 <div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
 
     <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    
-    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">addOption</span><span class="p">(</span><span class="s1">&#39;--load-images=true&#39;</span><span class="p">);</span>
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">addOption</span><span class="p">(</span><span class="s1">&#39;--ignore-ssl-errors=true&#39;</span><span class="p">);</span>
-    
-    <span class="nv">$request</span>  <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">);</span>
-    <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
 
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
+    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
 
-<p>You can also set a path to a JSON configuration file that contains multiple PhantomJS options:</p>
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\CaptureRequest</span>
+<span class="sd">     **/</span>
+    <span class="nv">$request</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createCaptureRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">,</span> <span class="s1">&#39;GET&#39;</span><span class="p">);</span>
+    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setCaptureFile</span><span class="p">(</span><span class="s1">&#39;/path/to/save/capture/file.jpg&#39;</span><span class="p">);</span>
 
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
-
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    
-    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">addOption</span><span class="p">(</span><span class="s1">&#39;--config=/path/to/config.json&#39;</span><span class="p">);</span>
-    
-    <span class="nv">$request</span>  <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">);</span>
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\Response </span>
+<span class="sd">     **/</span>
     <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
 
+    <span class="c1">// Send the request</span>
     <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
 
-<p>See the <a href="http://phantomjs.org/api/command-line.html">PhantomJS Documentation</a> for a full list of command line options.</p>
+<p>For more detailed examples see the <a href="/usage.html">usage</a> section, or to create your own custom scripts check out the <a href="/advanced.html">advanced</a> documentation.</p>
+
 
     
   </div>
+  
+  <div class="clearfix"></div>
+  <hr/>
 
-</article>
-
-<hr/>
+  <ul class="pager"> 
+      
+      <li class="next">
+        <a href="/installation.html" title="Installation">Installation &rarr;</a>
+      </li>
+      
+  </ul>
 
-<ul class="pager"> 
+</article>
 
-  
-  <li class="previous">
-    
-    <a href="http://jonnnnyw.github.io/php-phantomjs/page2">&larr; Previous</a>
-    
-  </li>
-  
 
-  
-  <li class="next">
-    <a href="http://jonnnnyw.github.io/php-phantomjs/page4">Next &rarr;</a>
-  </li>
-  
 
-</ul>
 
 
 
@@ -475,9 +284,9 @@
 		</footer>
 	</div>
 
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/jquery/jquery.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/js/bootstrap.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/js/app.js"></script>
+	<script type="text/javascript" src="/assets/resources/jquery/jquery.min.js"></script>
+	<script type="text/javascript" src="/assets/resources/bootstrap/js/bootstrap.min.js"></script>
+	<script type="text/javascript" src="/assets/js/app.js"></script>
 	
 </body>
 </html>

+ 120 - 336
_site/page4/index.html

@@ -15,10 +15,10 @@
 	<![endif]-->
 
 	<!-- Le styles -->
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/syntax/syntax.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/css/style.css" rel="stylesheet">
+	<link href="/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+	<link href="/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
+	<link href="/assets/resources/syntax/syntax.css" rel="stylesheet">
+	<link href="/assets/css/style.css" rel="stylesheet">
 
 	<!-- Le fav and touch icons -->
 	<!-- Update these with your own images
@@ -28,8 +28,8 @@
 	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
 	-->
 
-	<link rel="alternate" type="application/rss+xml" title="" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-	
+	<link rel="alternate" type="application/rss+xml" title="" href="/feed.xml">
+
     <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,7 +39,7 @@
         ga('create', 'UA-53289013-1', 'auto');
         ga('send', 'pageview');
     </script>
-    
+
 </head>
 
 <body>
@@ -53,15 +53,18 @@
 				<span class="icon-bar"></span>
 			</button>
 			
-			<!--
 			
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link last"></iframe>
+    		
 			
 			
-			
-			-->
-			
-			<a class="navbar-brand" href="http://jonnnnyw.github.io/php-phantomjs/">
-				<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs-small.png" class="img-circle" />
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link"></iframe>
+    		
+    		
+			<a class="navbar-brand" href="/">
+				<img src="/assets/media/phantomjs-small.png" class="img-circle" />
 				PHP PhantomJs
 			</a>
 		</div>
@@ -69,12 +72,11 @@
 		<!-- Collect the nav links, forms, and other content for toggling -->
 		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
 			<ul class="nav navbar-nav">
-				<li class="active"><a href="http://jonnnnyw.github.io/php-phantomjs/">Home</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">Installation</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">Usage</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">Advanced</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">Debugging</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html">Troubleshooting</a></li>
+				<li class="active"><a href="/">Home</a></li>
+				<li><a href="/installation.html">Installation</a></li>
+				<li><a href="/usage.html">Usage</a></li>
+				<li><a href="/advanced.html">Advanced</a></li>
+				<li><a href="/troubleshooting.html">Troubleshooting</a></li>
 			</ul>
 		</div><!-- /.navbar-collapse -->
 	</nav>
@@ -85,12 +87,11 @@
 			<i class="fa fa-bars"></i>
 		</button>
 		<ul class="dropdown-menu" role="menu">
-		    <li><a href="http://jonnnnyw.github.io/php-phantomjs/"><i class="fa fa-home"></i>Home</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html"><i class="fa fa-folder"></i>Debugging</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
+		    <li><a href="/"><i class="fa fa-home"></i>Home</a></li>
+			<li><a href="/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
+			<li><a href="/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
+			<li><a href="/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
+			<li><a href="/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
 			<li class="divider"></li>
 			<li><a href="#"><i class="fa fa-arrow-up"></i>Top of Page</a></li>
 		</ul>
@@ -99,11 +100,11 @@
 	<div class="col-sm-3 sidebar hidden-xs">
 		<! -- sidebar.html -->
 <header class="sidebar-header" role="banner">
-	<a href="http://jonnnnyw.github.io/php-phantomjs/">
-		<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs.png" class="img-circle" />
+	<a href="/">
+		<img src="/assets/media/phantomjs.png" class="img-circle" />
 	</a>
 	<h3 class="title">
-        <a href="http://jonnnnyw.github.io/php-phantomjs/">PHP PhantomJs</a>
+        <a href="/">PHP PhantomJs</a>
     </h3>
 </header>
 
@@ -114,22 +115,22 @@
 
 
 <div id="contact-list" class="text-center">
-<!--
+
 	<ul class="list-unstyled list-inline">
 		
-		
-		
-	</ul>
-	<ul id="contact-list-secondary" class="list-unstyled list-inline">
+		<li>
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
+		</li>
 		
 		
 		<li>
-			<a class="btn btn-default btn-sm" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-				<i class="fa fa-rss fa-lg"></i>
-			</a>
+			<iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
 		</li>
+		
 	</ul>
--->
+
 </div>
 <! -- sidebar.html end -->
 
@@ -140,355 +141,138 @@
 
 
 <div class="page-header">
-  <h1>Advanced Usage </h1>
+  <h1>Introduction </h1>
 </div>
 
 <article class="home">
 
   <div>
     
-    <ul>
-  <li><a href="#phantomjs-command-line-options">PhantomJS command line options</a></li>
-  <li><a href="#custom-phantom-js-scripts">Custom PhantomJS scripts</a>
-    <ul>
-      <li><a href="#writing-a-custom-script">Writing a custom script</a></li>
-      <li><a href="#using-custom-request-parameters-in-your-script">Using custom request parameters in your script</a></li>
-      <li><a href="#loading-your-script">Loading your script</a></li>
-    </ul>
-  </li>
+    <p>PHP PhantomJS is a flexible PHP library to load pages through the PhantomJS headless browser and return the page response. It is handy for testing websites that demand javascript support and also supports screen captures.</p>
+
+<h2 id="feature-list">Feature List</h2>
+
+<ul>
+  <li>Load webpages through the PhantomJS headless browser</li>
+  <li>View detailed response data including page content, headers, status<br />
+code etc.</li>
+  <li>Handle redirects</li>
+  <li>View javascript console errors</li>
+  <li>View detailed PhantomJS debuged information</li>
+  <li>Save screen captures to local disk</li>
+  <li>Define screen capture x, y, width and height parameters</li>
+  <li>Delay page rendering for a specified time</li>
+  <li>Execute PhantomJS with command line options</li>
+  <li>Easily build and run custom PhantomJS scripts</li>
 </ul>
 
-<h2 id="phantomjs-command-line-options">PhantomJS command line options</h2>
+<h2 id="prerequisites">Prerequisites</h2>
 
-<p>The PhantomJS API contains a range of command line options that can be passed when executing the PhantomJS executable. These can also be passed in via the client before a request:</p>
+<p>PHP PhantomJS requires PHP <strong>5.3.0</strong> or greater to run.</p>
 
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
+<h2 id="installation">Installation</h2>
 
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    
-    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">addOption</span><span class="p">(</span><span class="s1">&#39;--load-images=true&#39;</span><span class="p">);</span>
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">addOption</span><span class="p">(</span><span class="s1">&#39;--ignore-ssl-errors=true&#39;</span><span class="p">);</span>
-    
-    <span class="nv">$request</span>  <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">);</span>
-    <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
+<p>It is recommended that you use Composer to install PHP PhantomJS. First, add the following to your project’s <code>composer.json</code> file:</p>
 
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
+<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="c1">#composer.json</span>
 
-<p>You can also set a path to a JSON configuration file that contains multiple PhantomJS options:</p>
+    <span class="s">&quot;scripts&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
+        <span class="s">&quot;post-install-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
+            <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
+        <span class="p-Indicator">],</span>
+        <span class="s">&quot;post-update-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
+            <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
+        <span class="p-Indicator">]</span>
+    <span class="p-Indicator">}</span></code></pre></div>
 
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
+<p>This will ensure the latest version of PhantomJS is installed for your system, in your bin folder. If you haven’t defined your bin folder in your composer.json, add the path:</p>
 
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    
-    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">addOption</span><span class="p">(</span><span class="s1">&#39;--config=/path/to/config.json&#39;</span><span class="p">);</span>
+<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="c1">#composer.json</span>
     
-    <span class="nv">$request</span>  <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">);</span>
-    <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
+    <span class="s">&quot;config&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
+        <span class="s">&quot;bin-dir&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;bin&quot;</span>
+    <span class="p-Indicator">}</span></code></pre></div>
 
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
+<p>Finally, install PHP PhantomJS from the root of your project:</p>
 
-<p>See the <a href="http://phantomjs.org/api/command-line.html">PhantomJS Documentation</a> for a full list of command line options.</p>
+<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c">#bash</span>
+    
+    <span class="nv">$ </span>composer require <span class="s2">&quot;jonnyw/php-phantomjs:3.*&quot;</span></code></pre></div>
 
-<h2 id="custom-phantomjs-scripts">Custom PhantomJS scripts</h2>
+<p>If you would like to use another installation method or would like to see more detailed installation instructions, see the <a href="/installation.html">installation</a> documentation.</p>
 
-<p>In most instances you shouldn’t need to worry about the javascript files that run the PHP PhantomJS library but there may be times when you want to execute your own custom PhantomJS scripts through the client. This can be easily achieved by using the built in script loader.</p>
+<h2 id="basic-usage">Basic Usage</h2>
 
-<p>Script files or ‘procedures’ as they are referred to in the application are closely mapped to requests. When you create a default request instance, you are essentially running the default javascript procedure that comes bundled with the application. When you create a capture request you are running the capture procedure.</p>
+<p>The following illustrates how to make a basic GET request and output the page content:</p>
 
 <div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
 
     <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">();</span> <span class="c1">// ~/Resources/procedures/default.proc</span>
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createCaptureRequest</span><span class="p">();</span> <span class="c1">// ~/Resources/procedures/capture.proc</span></code></pre></div>
-
-<h3 id="writing-a-custom-script">Writing a custom script</h3>
-
-<p>The first step in creating your script is to create a procedure file somewhere. For the purpose of this guide we will refer to it as <code>my_procedure.proc</code> but in reality it can be called anything you like. The only requirement is that the file extension must be <code>.proc</code>.</p>
-
-<p>Create the file somewhere and make sure it can be read by your application. Make a note of the path to the directory where your file is created as you will need this when loading your script which is explained later in this guide.</p>
-
-<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c">#bash</span>
-    
-    <span class="nv">$ </span>touch my_procedure.proc
-    <span class="nv">$ </span>chmod <span class="m">755</span> my_procedure.proc</code></pre></div>
-
-<p>Next open your procedure file in your text editor and write your PhantomJS script. The <a href="http://phantomjs.org/quick-start.html">PhantomJS documentation</a> has more detailed information on writing custom scripts.</p>
 
-<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="c1">// my_procedure.proc</span>
-
-    <span class="kd">var</span> <span class="nx">page</span>  <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="s1">&#39;webpage&#39;</span><span class="p">).</span><span class="nx">create</span><span class="p">();</span>
-    
-    <span class="nx">page</span><span class="p">.</span><span class="nx">open</span> <span class="p">(</span><span class="s1">&#39;{{ request.getUrl() }}&#39;</span><span class="p">,</span> <span class="s1">&#39;{{ request.getMethod() }}&#39;</span><span class="p">,</span> <span class="s1">&#39;{{ request.getBody() }}&#39;</span><span class="p">,</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">status</span><span class="p">)</span> <span class="p">{</span>
-         
-        <span class="c1">// It is important that you exit PhantomJS</span>
-        <span class="c1">// when your script has run or when you</span>
-        <span class="c1">// encounter an error</span>
-        <span class="nx">phantom</span><span class="p">.</span><span class="nx">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
-    <span class="p">});</span>
-    
-    <span class="p">...</span></code></pre></div>
-
-<blockquote>
-  <h4 id="important">Important</h4>
-  <p>Make sure that <code>phantom.exit(1);</code> is always called after your script has run or if you encounter an error. This requires you to take care when handling PhantomJS errors to ensure that you exit the PhantomJS script, whether the script was successfully executed or not. If you do not call <code>phantom.exit(1);</code> then PhantomJS will continue to run until your PHP script times out. If you find that your custom script is hanging then this is most likely the cause.</p>
-</blockquote>
+    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
 
-<p>It is a good practice to create a global error handler in your script that exits PhantomJS:</p>
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\Request </span>
+<span class="sd">     **/</span>
+    <span class="nv">$request</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">,</span> <span class="s1">&#39;GET&#39;</span><span class="p">);</span>
 
-<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="c1">// my_procedure.proc</span>
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\Response </span>
+<span class="sd">     **/</span>
+    <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
 
-    <span class="nx">phantom</span><span class="p">.</span><span class="nx">onError</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">msg</span><span class="p">,</span> <span class="nx">trace</span><span class="p">)</span> <span class="p">{</span>
-  
-        <span class="nx">phantom</span><span class="p">.</span><span class="nx">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
-    <span class="p">};</span>
-    
-    <span class="p">...</span></code></pre></div>
-
-<h3 id="using-custom-request-parameters-in-your-script">Using custom request parameters in your script</h3>
-
-<p>Before a procedure is executed by the application it is parsed through a template parser. The PHP PhantomJS library uses the popular <a href="https://github.com/fabpot/Twig">Twig templating engine</a>. This gives you access to all the <a href="http://twig.sensiolabs.org/doc/templates.html">Twig niceness</a> which you can use in your custom scripts.</p>
-
-<p>You may have noticed in the example above that we have used some Twig template tags referencing a request object e.g. <code>{{ request.getUrl() }}</code>. This is in fact the PHP request instance that you created and passed to the client when sending your request, which is injected into the Twig template parser. As a result you gain full access to all the data contained within the request instance, via the data accessor methods.</p>
-
-<p>A default request instance contains the following accessors:</p>
-
-<table>
-  <thead>
-    <tr>
-      <th style="text-align: center">Accessor</th>
-      <th>Description</th>
-      <th style="text-align: center">Twig example</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td style="text-align: center">getMethod()</td>
-      <td>The request method e.g. GET.</td>
-      <td style="text-align: center">{{ request.getMethod() }}</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getTimeout()</td>
-      <td>The request timeout period in milliseconds.</td>
-      <td style="text-align: center">{{ request.getTimeout() }}</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getDelay()</td>
-      <td>The page render delay in seconds.</td>
-      <td style="text-align: center">{{ request.getDelay() }}</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getUrl()</td>
-      <td>The request URL.</td>
-      <td style="text-align: center">{{ request.getUrl() }}</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getBody()</td>
-      <td>The request body (POST, PUT).</td>
-      <td style="text-align: center">{{ request.getBody() }}</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getHeaders(<em>format</em>)</td>
-      <td>The request headers.</td>
-      <td style="text-align: center">{{ request.getHeaders(‘json’) }}</td>
-    </tr>
-  </tbody>
-</table>
-
-<p>A capture request contains a few additional ones:</p>
-
-<table>
-  <thead>
-    <tr>
-      <th style="text-align: center">Accessor</th>
-      <th>Description</th>
-      <th style="text-align: center">Twig example</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr>
-      <td style="text-align: center">getRectTop()</td>
-      <td>The x coordinate of the capture region.</td>
-      <td style="text-align: center">{{ request.getRectTop() }}</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getRectLeft()</td>
-      <td>The y coordinate of the capture region.</td>
-      <td style="text-align: center">{{ request.getRectLeft() }}</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getRectWidth()</td>
-      <td>The width of the capture region.</td>
-      <td style="text-align: center">{{ request.getRectWidth() }}</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getRectHeight()</td>
-      <td>The height of the capture region.</td>
-      <td style="text-align: center">{{ request.getRectHeight() }}</td>
-    </tr>
-    <tr>
-      <td style="text-align: center">getCaptureFile()</td>
-      <td>The file to save the capture to.</td>
-      <td style="text-align: center">{{ request.getCaptureFile() }}</td>
-    </tr>
-  </tbody>
-</table>
-
-<p>If you would like to inject additional data into your script through custom accessors, simply extend the request class with your own:</p>
+    <span class="c1">// Send the request</span>
+    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span>
 
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
+    <span class="k">if</span><span class="p">(</span><span class="nv">$response</span><span class="o">-&gt;</span><span class="na">getStatus</span><span class="p">()</span> <span class="o">===</span> <span class="mi">200</span><span class="p">)</span> <span class="p">{</span>
 
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Message\Request</span><span class="p">;</span>
-    
-    <span class="k">class</span> <span class="nc">CustomRequest</span> <span class="k">extends</span> <span class="nx">Request</span>
-    <span class="p">{</span>
-    
-        <span class="k">public</span> <span class="k">function</span> <span class="nf">getSomething</span><span class="p">()</span>
-        <span class="p">{</span>
-            <span class="k">return</span> <span class="s1">&#39;Something!&#39;</span><span class="p">;</span>
-        <span class="p">}</span>
+        <span class="c1">// Dump the requested page content</span>
+        <span class="k">echo</span> <span class="nv">$response</span><span class="o">-&gt;</span><span class="na">getContent</span><span class="p">();</span>
     <span class="p">}</span></code></pre></div>
 
-<p>Now you will be able to access the data in your custom script when using your custom request:</p>
-
-<div class="highlight"><pre><code class="language-javascript" data-lang="javascript"><span class="c1">// my_procedure.proc</span>
-
-    <span class="kd">var</span> <span class="nx">something</span> <span class="o">=</span> <span class="s1">&#39;{{ request.getSomething() }}&#39;</span><span class="p">;</span> <span class="c1">// Get something</span>
-    
-    <span class="p">...</span></code></pre></div>
-
-<p>And to use your custom request simply create a new instance of it and pass it to the client:</p>
+<p>And if you would like to save a screen capture to local disk:</p>
 
 <div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
 
     <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    
-    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    
-    <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
-    
-    <span class="nv">$request</span>  <span class="o">=</span> <span class="k">new</span> <span class="nx">CustomRequest</span><span class="p">();</span>
-    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setMethod</span><span class="p">(</span><span class="s1">&#39;GET&#39;</span><span class="p">);</span>
-    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setUrl</span><span class="p">(</span><span class="s1">&#39;http://www.google.com&#39;</span><span class="p">);</span>
-    
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
-
-<h3 id="loading-your-script">Loading your script</h3>
-
-<p>Now that you have your custom script and you’ve added your custom request parameters, you may be wondering how to tell the client to actually load your script. This is done by creating a procedure loader and telling it where to find your script files.</p>
-
-<p>The service container has a factory that makes creating a new procedure loader easy:</p>
-
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
-    
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\DependencyInjection\ServiceContainer</span><span class="p">;</span>
-    
-    <span class="nv">$location</span> <span class="o">=</span> <span class="s1">&#39;/path/to/your/procedure/directory&#39;</span><span class="p">;</span>
-    
-    <span class="nv">$serviceContainer</span> <span class="o">=</span> <span class="nx">ServiceContainer</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    
-    <span class="nv">$procedureLoader</span> <span class="o">=</span> <span class="nv">$serviceContainer</span><span class="o">-&gt;</span><span class="na">get</span><span class="p">(</span><span class="s1">&#39;procedure_loader_factory&#39;</span><span class="p">)</span>
-        <span class="o">-&gt;</span><span class="na">createProcedureLoader</span><span class="p">(</span><span class="nv">$location</span><span class="p">);</span>
-        
-    <span class="o">...</span></code></pre></div>
 
-<p>The client contains a chain procedure loader which lets you set multiple loaders at the same time. Ultimately this means that you can load your custom scripts while still maintaining the ability to load the default scripts if you choose. </p>
-
-<p>Now add your procedure loader to the chain loader:</p>
-
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
-
-    <span class="o">...</span>
-    
     <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getProcedureLoader</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">addLoader</span><span class="p">(</span><span class="nv">$procedureLoader</span><span class="p">);</span>
-    
-    <span class="o">...</span></code></pre></div>
-
-<p>The last thing you need to do is to tell the request which script you want to load for that request. This is done by setting the request type to the name of your procedure file, minus the extension:</p>
-
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
-
-    <span class="o">...</span>
-    
-   <span class="nv">$request</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">();</span>
-   <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setType</span><span class="p">(</span><span class="s1">&#39;my_procedure&#39;</span><span class="p">);</span>
-    
-    <span class="o">...</span></code></pre></div>
-
-<p>Or if you are using a custom request as outlined in the <a href="#using-custom-request-parameters-in-your-script">custom request parameters</a> section, you can implement a <code>getType()</code> method which returns the name of your procedure, eliminating the need to set the request type for each request:</p>
-
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
 
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Message\Request</span><span class="p">;</span>
-    
-    <span class="k">class</span> <span class="nc">CustomRequest</span> <span class="k">extends</span> <span class="nx">Request</span>
-    <span class="p">{</span>
-    
-        <span class="k">public</span> <span class="k">function</span> <span class="nf">getType</span><span class="p">()</span>
-        <span class="p">{</span>
-            <span class="k">return</span> <span class="s1">&#39;my_procedure&#39;</span><span class="p">;</span>
-        <span class="p">}</span>
-    <span class="p">}</span></code></pre></div>
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\CaptureRequest</span>
+<span class="sd">     **/</span>
+    <span class="nv">$request</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createCaptureRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">,</span> <span class="s1">&#39;GET&#39;</span><span class="p">);</span>
+    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setCaptureFile</span><span class="p">(</span><span class="s1">&#39;/path/to/save/capture/file.jpg&#39;</span><span class="p">);</span>
 
-<p>Below is a full example for clarity:</p>
-
-<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
-    
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
-    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\DependencyInjection\ServiceContainer</span><span class="p">;</span>
-    
-    <span class="nv">$location</span> <span class="o">=</span> <span class="s1">&#39;/path/to/your/procedure/directory&#39;</span><span class="p">;</span>
-    
-    <span class="nv">$serviceContainer</span> <span class="o">=</span> <span class="nx">ServiceContainer</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    
-    <span class="nv">$procedureLoader</span> <span class="o">=</span> <span class="nv">$serviceContainer</span><span class="o">-&gt;</span><span class="na">get</span><span class="p">(</span><span class="s1">&#39;procedure_loader_factory&#39;</span><span class="p">)</span>
-        <span class="o">-&gt;</span><span class="na">createProcedureLoader</span><span class="p">(</span><span class="nv">$location</span><span class="p">);</span>
-        
-    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
-    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getProcedureLoader</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">addLoader</span><span class="p">(</span><span class="nv">$procedureLoader</span><span class="p">);</span>
-    
-    <span class="nv">$request</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">();</span>
-    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setType</span><span class="p">(</span><span class="s1">&#39;my_procedure&#39;</span><span class="p">);</span>
-    
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\Response </span>
+<span class="sd">     **/</span>
     <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
-    
+
+    <span class="c1">// Send the request</span>
     <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
 
-<blockquote>
-  <h4 id="troubleshooting">Troubleshooting</h4>
-  <p>If you find that your script isn’t running or that you are receiving a status of ‘0’ back in the response, chances are you have a syntax error in you script. It pays to turn debugging on in the client <code>$client-&gt;debug(true)</code> which will then give you access to some log information through <code>$client-&gt;getLog()</code>.</p>
-</blockquote>
+<p>For more detailed examples see the <a href="/usage.html">usage</a> section, or to create your own custom scripts check out the <a href="/advanced.html">advanced</a> documentation.</p>
 
-<p>See more detailed information about <a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">debugging</a>.</p>
 
     
   </div>
+  
+  <div class="clearfix"></div>
+  <hr/>
 
-</article>
-
-<hr/>
+  <ul class="pager"> 
+      
+      <li class="next">
+        <a href="/installation.html" title="Installation">Installation &rarr;</a>
+      </li>
+      
+  </ul>
 
-<ul class="pager"> 
+</article>
 
-  
-  <li class="previous">
-    
-    <a href="http://jonnnnyw.github.io/php-phantomjs/page3">&larr; Previous</a>
-    
-  </li>
-  
 
-  
-  <li class="next">
-    <a href="http://jonnnnyw.github.io/php-phantomjs/page5">Next &rarr;</a>
-  </li>
-  
 
-</ul>
 
 
 
@@ -500,9 +284,9 @@
 		</footer>
 	</div>
 
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/jquery/jquery.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/js/bootstrap.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/js/app.js"></script>
+	<script type="text/javascript" src="/assets/resources/jquery/jquery.min.js"></script>
+	<script type="text/javascript" src="/assets/resources/bootstrap/js/bootstrap.min.js"></script>
+	<script type="text/javascript" src="/assets/js/app.js"></script>
 	
 </body>
 </html>

+ 156 - 58
_site/page5/index.html

@@ -15,10 +15,10 @@
 	<![endif]-->
 
 	<!-- Le styles -->
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/syntax/syntax.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/css/style.css" rel="stylesheet">
+	<link href="/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+	<link href="/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
+	<link href="/assets/resources/syntax/syntax.css" rel="stylesheet">
+	<link href="/assets/css/style.css" rel="stylesheet">
 
 	<!-- Le fav and touch icons -->
 	<!-- Update these with your own images
@@ -28,8 +28,8 @@
 	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
 	-->
 
-	<link rel="alternate" type="application/rss+xml" title="" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-	
+	<link rel="alternate" type="application/rss+xml" title="" href="/feed.xml">
+
     <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,7 +39,7 @@
         ga('create', 'UA-53289013-1', 'auto');
         ga('send', 'pageview');
     </script>
-    
+
 </head>
 
 <body>
@@ -53,15 +53,18 @@
 				<span class="icon-bar"></span>
 			</button>
 			
-			<!--
 			
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link last"></iframe>
+    		
 			
 			
-			
-			-->
-			
-			<a class="navbar-brand" href="http://jonnnnyw.github.io/php-phantomjs/">
-				<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs-small.png" class="img-circle" />
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link"></iframe>
+    		
+    		
+			<a class="navbar-brand" href="/">
+				<img src="/assets/media/phantomjs-small.png" class="img-circle" />
 				PHP PhantomJs
 			</a>
 		</div>
@@ -69,12 +72,11 @@
 		<!-- Collect the nav links, forms, and other content for toggling -->
 		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
 			<ul class="nav navbar-nav">
-				<li class="active"><a href="http://jonnnnyw.github.io/php-phantomjs/">Home</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">Installation</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">Usage</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">Advanced</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">Debugging</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html">Troubleshooting</a></li>
+				<li class="active"><a href="/">Home</a></li>
+				<li><a href="/installation.html">Installation</a></li>
+				<li><a href="/usage.html">Usage</a></li>
+				<li><a href="/advanced.html">Advanced</a></li>
+				<li><a href="/troubleshooting.html">Troubleshooting</a></li>
 			</ul>
 		</div><!-- /.navbar-collapse -->
 	</nav>
@@ -85,12 +87,11 @@
 			<i class="fa fa-bars"></i>
 		</button>
 		<ul class="dropdown-menu" role="menu">
-		    <li><a href="http://jonnnnyw.github.io/php-phantomjs/"><i class="fa fa-home"></i>Home</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html"><i class="fa fa-folder"></i>Debugging</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
+		    <li><a href="/"><i class="fa fa-home"></i>Home</a></li>
+			<li><a href="/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
+			<li><a href="/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
+			<li><a href="/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
+			<li><a href="/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
 			<li class="divider"></li>
 			<li><a href="#"><i class="fa fa-arrow-up"></i>Top of Page</a></li>
 		</ul>
@@ -99,11 +100,11 @@
 	<div class="col-sm-3 sidebar hidden-xs">
 		<! -- sidebar.html -->
 <header class="sidebar-header" role="banner">
-	<a href="http://jonnnnyw.github.io/php-phantomjs/">
-		<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs.png" class="img-circle" />
+	<a href="/">
+		<img src="/assets/media/phantomjs.png" class="img-circle" />
 	</a>
 	<h3 class="title">
-        <a href="http://jonnnnyw.github.io/php-phantomjs/">PHP PhantomJs</a>
+        <a href="/">PHP PhantomJs</a>
     </h3>
 </header>
 
@@ -114,22 +115,22 @@
 
 
 <div id="contact-list" class="text-center">
-<!--
+
 	<ul class="list-unstyled list-inline">
 		
-		
-		
-	</ul>
-	<ul id="contact-list-secondary" class="list-unstyled list-inline">
+		<li>
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
+		</li>
 		
 		
 		<li>
-			<a class="btn btn-default btn-sm" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-				<i class="fa fa-rss fa-lg"></i>
-			</a>
+			<iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
 		</li>
+		
 	</ul>
--->
+
 </div>
 <! -- sidebar.html end -->
 
@@ -140,41 +141,138 @@
 
 
 <div class="page-header">
-  <h1>Debugging </h1>
+  <h1>Introduction </h1>
 </div>
 
 <article class="home">
 
   <div>
     
-    <p>This documentation page will be up in the next couple of days.</p>
+    <p>PHP PhantomJS is a flexible PHP library to load pages through the PhantomJS headless browser and return the page response. It is handy for testing websites that demand javascript support and also supports screen captures.</p>
+
+<h2 id="feature-list">Feature List</h2>
+
+<ul>
+  <li>Load webpages through the PhantomJS headless browser</li>
+  <li>View detailed response data including page content, headers, status<br />
+code etc.</li>
+  <li>Handle redirects</li>
+  <li>View javascript console errors</li>
+  <li>View detailed PhantomJS debuged information</li>
+  <li>Save screen captures to local disk</li>
+  <li>Define screen capture x, y, width and height parameters</li>
+  <li>Delay page rendering for a specified time</li>
+  <li>Execute PhantomJS with command line options</li>
+  <li>Easily build and run custom PhantomJS scripts</li>
+</ul>
 
-<p>In the meantime, check out the <a href="https://github.com/jonnnnyw/php-phantomjs/tree/master/examples">examples</a> in the Github repo.</p>
+<h2 id="prerequisites">Prerequisites</h2>
 
-    
-  </div>
+<p>PHP PhantomJS requires PHP <strong>5.3.0</strong> or greater to run.</p>
 
-</article>
+<h2 id="installation">Installation</h2>
 
-<hr/>
+<p>It is recommended that you use Composer to install PHP PhantomJS. First, add the following to your project’s <code>composer.json</code> file:</p>
 
-<ul class="pager"> 
+<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="c1">#composer.json</span>
 
-  
-  <li class="previous">
+    <span class="s">&quot;scripts&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
+        <span class="s">&quot;post-install-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
+            <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
+        <span class="p-Indicator">],</span>
+        <span class="s">&quot;post-update-cmd&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span>
+            <span class="s">&quot;PhantomInstaller\\Installer::installPhantomJS&quot;</span>
+        <span class="p-Indicator">]</span>
+    <span class="p-Indicator">}</span></code></pre></div>
+
+<p>This will ensure the latest version of PhantomJS is installed for your system, in your bin folder. If you haven’t defined your bin folder in your composer.json, add the path:</p>
+
+<div class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="c1">#composer.json</span>
     
-    <a href="http://jonnnnyw.github.io/php-phantomjs/page4">&larr; Previous</a>
+    <span class="s">&quot;config&quot;</span><span class="p-Indicator">:</span> <span class="p-Indicator">{</span>
+        <span class="s">&quot;bin-dir&quot;</span><span class="p-Indicator">:</span> <span class="s">&quot;bin&quot;</span>
+    <span class="p-Indicator">}</span></code></pre></div>
+
+<p>Finally, install PHP PhantomJS from the root of your project:</p>
+
+<div class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="c">#bash</span>
     
-  </li>
-  
+    <span class="nv">$ </span>composer require <span class="s2">&quot;jonnyw/php-phantomjs:3.*&quot;</span></code></pre></div>
 
+<p>If you would like to use another installation method or would like to see more detailed installation instructions, see the <a href="/installation.html">installation</a> documentation.</p>
+
+<h2 id="basic-usage">Basic Usage</h2>
+
+<p>The following illustrates how to make a basic GET request and output the page content:</p>
+
+<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
+
+    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
+
+    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
+
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\Request </span>
+<span class="sd">     **/</span>
+    <span class="nv">$request</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">,</span> <span class="s1">&#39;GET&#39;</span><span class="p">);</span>
+
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\Response </span>
+<span class="sd">     **/</span>
+    <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
+
+    <span class="c1">// Send the request</span>
+    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span>
+
+    <span class="k">if</span><span class="p">(</span><span class="nv">$response</span><span class="o">-&gt;</span><span class="na">getStatus</span><span class="p">()</span> <span class="o">===</span> <span class="mi">200</span><span class="p">)</span> <span class="p">{</span>
+
+        <span class="c1">// Dump the requested page content</span>
+        <span class="k">echo</span> <span class="nv">$response</span><span class="o">-&gt;</span><span class="na">getContent</span><span class="p">();</span>
+    <span class="p">}</span></code></pre></div>
+
+<p>And if you would like to save a screen capture to local disk:</p>
+
+<div class="highlight"><pre><code class="language-php" data-lang="php"><span class="cp">&lt;?php</span>
+
+    <span class="k">use</span> <span class="nx">JonnyW\PhantomJs\Client</span><span class="p">;</span>
+
+    <span class="nv">$client</span> <span class="o">=</span> <span class="nx">Client</span><span class="o">::</span><span class="na">getInstance</span><span class="p">();</span>
+
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\CaptureRequest</span>
+<span class="sd">     **/</span>
+    <span class="nv">$request</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createCaptureRequest</span><span class="p">(</span><span class="s1">&#39;http://google.com&#39;</span><span class="p">,</span> <span class="s1">&#39;GET&#39;</span><span class="p">);</span>
+    <span class="nv">$request</span><span class="o">-&gt;</span><span class="na">setCaptureFile</span><span class="p">(</span><span class="s1">&#39;/path/to/save/capture/file.jpg&#39;</span><span class="p">);</span>
+
+    <span class="sd">/** </span>
+<span class="sd">     * @see JonnyW\PhantomJs\Message\Response </span>
+<span class="sd">     **/</span>
+    <span class="nv">$response</span> <span class="o">=</span> <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">getMessageFactory</span><span class="p">()</span><span class="o">-&gt;</span><span class="na">createResponse</span><span class="p">();</span>
+
+    <span class="c1">// Send the request</span>
+    <span class="nv">$client</span><span class="o">-&gt;</span><span class="na">send</span><span class="p">(</span><span class="nv">$request</span><span class="p">,</span> <span class="nv">$response</span><span class="p">);</span></code></pre></div>
+
+<p>For more detailed examples see the <a href="/usage.html">usage</a> section, or to create your own custom scripts check out the <a href="/advanced.html">advanced</a> documentation.</p>
+
+
+    
+  </div>
   
-  <li class="next">
-    <a href="http://jonnnnyw.github.io/php-phantomjs/page6">Next &rarr;</a>
-  </li>
-  
+  <div class="clearfix"></div>
+  <hr/>
+
+  <ul class="pager"> 
+      
+      <li class="next">
+        <a href="/installation.html" title="Installation">Installation &rarr;</a>
+      </li>
+      
+  </ul>
+
+</article>
+
+
 
-</ul>
 
 
 
@@ -186,9 +284,9 @@
 		</footer>
 	</div>
 
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/jquery/jquery.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/js/bootstrap.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/js/app.js"></script>
+	<script type="text/javascript" src="/assets/resources/jquery/jquery.min.js"></script>
+	<script type="text/javascript" src="/assets/resources/bootstrap/js/bootstrap.min.js"></script>
+	<script type="text/javascript" src="/assets/js/app.js"></script>
 	
 </body>
 </html>

+ 0 - 189
_site/page6/index.html

@@ -1,189 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-	<meta charset="utf-8">
-	<title>PHP PhantomJS</title>
-	
-	<meta name="author" content="Jonny W">
-
-	<!-- Enable responsive viewport -->
-	<meta name="viewport" content="width=device-width, initial-scale=1.0">
-
-	<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
-	<!--[if lt IE 9]>
-	<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
-	<![endif]-->
-
-	<!-- Le styles -->
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/syntax/syntax.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/css/style.css" rel="stylesheet">
-
-	<!-- Le fav and touch icons -->
-	<!-- Update these with your own images
-	<link rel="shortcut icon" href="images/favicon.ico">
-	<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
-	<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
-	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
-	-->
-
-	<link rel="alternate" type="application/rss+xml" title="" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-	
-    <script>
-        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
-        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
-        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
-        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
-        
-        ga('create', 'UA-53289013-1', 'auto');
-        ga('send', 'pageview');
-    </script>
-    
-</head>
-
-<body>
-	<nav class="navbar navbar-default visible-xs" role="navigation">
-		<!-- Brand and toggle get grouped for better mobile display -->
-		<div class="navbar-header">
-			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
-				<span class="sr-only">Toggle navigation</span>
-				<span class="icon-bar"></span>
-				<span class="icon-bar"></span>
-				<span class="icon-bar"></span>
-			</button>
-			
-			<!--
-			
-			
-			
-			
-			-->
-			
-			<a class="navbar-brand" href="http://jonnnnyw.github.io/php-phantomjs/">
-				<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs-small.png" class="img-circle" />
-				PHP PhantomJs
-			</a>
-		</div>
-
-		<!-- Collect the nav links, forms, and other content for toggling -->
-		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
-			<ul class="nav navbar-nav">
-				<li class="active"><a href="http://jonnnnyw.github.io/php-phantomjs/">Home</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">Installation</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">Usage</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">Advanced</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">Debugging</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html">Troubleshooting</a></li>
-			</ul>
-		</div><!-- /.navbar-collapse -->
-	</nav>
-
-	<!-- nav-menu-dropdown -->
-	<div class="btn-group hidden-xs" id="nav-menu">
-		<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
-			<i class="fa fa-bars"></i>
-		</button>
-		<ul class="dropdown-menu" role="menu">
-		    <li><a href="http://jonnnnyw.github.io/php-phantomjs/"><i class="fa fa-home"></i>Home</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html"><i class="fa fa-folder"></i>Debugging</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
-			<li class="divider"></li>
-			<li><a href="#"><i class="fa fa-arrow-up"></i>Top of Page</a></li>
-		</ul>
-	</div>
-
-	<div class="col-sm-3 sidebar hidden-xs">
-		<! -- sidebar.html -->
-<header class="sidebar-header" role="banner">
-	<a href="http://jonnnnyw.github.io/php-phantomjs/">
-		<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs.png" class="img-circle" />
-	</a>
-	<h3 class="title">
-        <a href="http://jonnnnyw.github.io/php-phantomjs/">PHP PhantomJs</a>
-    </h3>
-</header>
-
-
-<div id="bio" class="text-center">
-	Run PhantomJS scripts through PHP
-</div>
-
-
-<div id="contact-list" class="text-center">
-<!--
-	<ul class="list-unstyled list-inline">
-		
-		
-		
-	</ul>
-	<ul id="contact-list-secondary" class="list-unstyled list-inline">
-		
-		
-		<li>
-			<a class="btn btn-default btn-sm" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-				<i class="fa fa-rss fa-lg"></i>
-			</a>
-		</li>
-	</ul>
--->
-</div>
-<! -- sidebar.html end -->
-
-	</div>
-
-	<div class="col-sm-9 col-sm-offset-3">
-		
-
-
-<div class="page-header">
-  <h1>Troubleshooting </h1>
-</div>
-
-<article class="home">
-
-  <div>
-    
-    <p>This documentation page will be up in the next couple of days.</p>
-
-    
-  </div>
-
-</article>
-
-<hr/>
-
-<ul class="pager"> 
-
-  
-  <li class="previous">
-    
-    <a href="http://jonnnnyw.github.io/php-phantomjs/page5">&larr; Previous</a>
-    
-  </li>
-  
-
-  
-
-</ul>
-
-
-
-		<footer>
-			<hr/>
-			<p>
-				&copy; 2014 PHP PhantomJs. Theme: Modified <a href="https://github.com/dbtek/dbyll">dbyll</a> by dbtek.
-			</p>
-		</footer>
-	</div>
-
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/jquery/jquery.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/js/bootstrap.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/js/app.js"></script>
-	
-</body>
-</html>
-

+ 51 - 53
_site/troubleshooting.html

@@ -15,10 +15,10 @@
 	<![endif]-->
 
 	<!-- Le styles -->
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/syntax/syntax.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/css/style.css" rel="stylesheet">
+	<link href="/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+	<link href="/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
+	<link href="/assets/resources/syntax/syntax.css" rel="stylesheet">
+	<link href="/assets/css/style.css" rel="stylesheet">
 
 	<!-- Le fav and touch icons -->
 	<!-- Update these with your own images
@@ -28,8 +28,8 @@
 	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
 	-->
 
-	<link rel="alternate" type="application/rss+xml" title="" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-	
+	<link rel="alternate" type="application/rss+xml" title="" href="/feed.xml">
+
     <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,7 +39,7 @@
         ga('create', 'UA-53289013-1', 'auto');
         ga('send', 'pageview');
     </script>
-    
+
 </head>
 
 <body>
@@ -53,15 +53,18 @@
 				<span class="icon-bar"></span>
 			</button>
 			
-			<!--
 			
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link last"></iframe>
+    		
 			
 			
-			
-			-->
-			
-			<a class="navbar-brand" href="http://jonnnnyw.github.io/php-phantomjs/">
-				<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs-small.png" class="img-circle" />
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link"></iframe>
+    		
+    		
+			<a class="navbar-brand" href="/">
+				<img src="/assets/media/phantomjs-small.png" class="img-circle" />
 				PHP PhantomJs
 			</a>
 		</div>
@@ -69,12 +72,11 @@
 		<!-- Collect the nav links, forms, and other content for toggling -->
 		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
 			<ul class="nav navbar-nav">
-				<li class="active"><a href="http://jonnnnyw.github.io/php-phantomjs/">Home</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">Installation</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">Usage</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">Advanced</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">Debugging</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html">Troubleshooting</a></li>
+				<li class="active"><a href="/">Home</a></li>
+				<li><a href="/installation.html">Installation</a></li>
+				<li><a href="/usage.html">Usage</a></li>
+				<li><a href="/advanced.html">Advanced</a></li>
+				<li><a href="/troubleshooting.html">Troubleshooting</a></li>
 			</ul>
 		</div><!-- /.navbar-collapse -->
 	</nav>
@@ -85,12 +87,11 @@
 			<i class="fa fa-bars"></i>
 		</button>
 		<ul class="dropdown-menu" role="menu">
-		    <li><a href="http://jonnnnyw.github.io/php-phantomjs/"><i class="fa fa-home"></i>Home</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html"><i class="fa fa-folder"></i>Debugging</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
+		    <li><a href="/"><i class="fa fa-home"></i>Home</a></li>
+			<li><a href="/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
+			<li><a href="/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
+			<li><a href="/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
+			<li><a href="/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
 			<li class="divider"></li>
 			<li><a href="#"><i class="fa fa-arrow-up"></i>Top of Page</a></li>
 		</ul>
@@ -99,11 +100,11 @@
 	<div class="col-sm-3 sidebar hidden-xs">
 		<! -- sidebar.html -->
 <header class="sidebar-header" role="banner">
-	<a href="http://jonnnnyw.github.io/php-phantomjs/">
-		<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs.png" class="img-circle" />
+	<a href="/">
+		<img src="/assets/media/phantomjs.png" class="img-circle" />
 	</a>
 	<h3 class="title">
-        <a href="http://jonnnnyw.github.io/php-phantomjs/">PHP PhantomJs</a>
+        <a href="/">PHP PhantomJs</a>
     </h3>
 </header>
 
@@ -114,22 +115,22 @@
 
 
 <div id="contact-list" class="text-center">
-<!--
+
 	<ul class="list-unstyled list-inline">
 		
-		
-		
-	</ul>
-	<ul id="contact-list-secondary" class="list-unstyled list-inline">
+		<li>
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
+		</li>
 		
 		
 		<li>
-			<a class="btn btn-default btn-sm" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-				<i class="fa fa-rss fa-lg"></i>
-			</a>
+			<iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
 		</li>
+		
 	</ul>
--->
+
 </div>
 <! -- sidebar.html end -->
 
@@ -152,22 +153,19 @@
     </div>
 
     <div class="clearfix"></div>
+    
+    <hr>
+    <ul class="pager">
+        
+        <li class="previous"><a href="/advanced.html" title="Advanced Usage">&larr; Advanced Usage</a></li>
+        
+        
+    </ul>
 
-		<ul class="pager">
-		  
-		  
-		  <li class="next"><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html" title="Debugging">Debugging &rarr;</a></li>
-		  
-		</ul>
-
-		<hr>
-	</div>
-	
-	<div class="col-sm-2 sidebar-2">
 	
-	</div>
+    
 </article>
-<div class="clearfix"></div>
+
 
 
 
@@ -179,9 +177,9 @@
 		</footer>
 	</div>
 
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/jquery/jquery.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/js/bootstrap.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/js/app.js"></script>
+	<script type="text/javascript" src="/assets/resources/jquery/jquery.min.js"></script>
+	<script type="text/javascript" src="/assets/resources/bootstrap/js/bootstrap.min.js"></script>
+	<script type="text/javascript" src="/assets/js/app.js"></script>
 	
 </body>
 </html>

+ 55 - 57
_site/usage.html

@@ -15,10 +15,10 @@
 	<![endif]-->
 
 	<!-- Le styles -->
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/resources/syntax/syntax.css" rel="stylesheet">
-	<link href="http://jonnnnyw.github.io/php-phantomjs/assets/css/style.css" rel="stylesheet">
+	<link href="/assets/resources/bootstrap/css/bootstrap.min.css" rel="stylesheet">
+	<link href="/assets/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
+	<link href="/assets/resources/syntax/syntax.css" rel="stylesheet">
+	<link href="/assets/css/style.css" rel="stylesheet">
 
 	<!-- Le fav and touch icons -->
 	<!-- Update these with your own images
@@ -28,8 +28,8 @@
 	<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
 	-->
 
-	<link rel="alternate" type="application/rss+xml" title="" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-	
+	<link rel="alternate" type="application/rss+xml" title="" href="/feed.xml">
+
     <script>
         (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
         (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,7 +39,7 @@
         ga('create', 'UA-53289013-1', 'auto');
         ga('send', 'pageview');
     </script>
-    
+
 </head>
 
 <body>
@@ -53,15 +53,18 @@
 				<span class="icon-bar"></span>
 			</button>
 			
-			<!--
 			
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link last"></iframe>
+    		
 			
 			
-			
-			-->
-			
-			<a class="navbar-brand" href="http://jonnnnyw.github.io/php-phantomjs/">
-				<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs-small.png" class="img-circle" />
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="85" height="20" class="nav-link"></iframe>
+    		
+    		
+			<a class="navbar-brand" href="/">
+				<img src="/assets/media/phantomjs-small.png" class="img-circle" />
 				PHP PhantomJs
 			</a>
 		</div>
@@ -69,12 +72,11 @@
 		<!-- Collect the nav links, forms, and other content for toggling -->
 		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
 			<ul class="nav navbar-nav">
-				<li class="active"><a href="http://jonnnnyw.github.io/php-phantomjs/">Home</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html">Installation</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html">Usage</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">Advanced</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">Debugging</a></li>
-				<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html">Troubleshooting</a></li>
+				<li class="active"><a href="/">Home</a></li>
+				<li><a href="/installation.html">Installation</a></li>
+				<li><a href="/usage.html">Usage</a></li>
+				<li><a href="/advanced.html">Advanced</a></li>
+				<li><a href="/troubleshooting.html">Troubleshooting</a></li>
 			</ul>
 		</div><!-- /.navbar-collapse -->
 	</nav>
@@ -85,12 +87,11 @@
 			<i class="fa fa-bars"></i>
 		</button>
 		<ul class="dropdown-menu" role="menu">
-		    <li><a href="http://jonnnnyw.github.io/php-phantomjs/"><i class="fa fa-home"></i>Home</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html"><i class="fa fa-folder"></i>Debugging</a></li>
-			<li><a href="http://jonnnnyw.github.io/php-phantomjs/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
+		    <li><a href="/"><i class="fa fa-home"></i>Home</a></li>
+			<li><a href="/installation.html"><i class="fa fa-folder"></i>Installation</a></li>
+			<li><a href="/usage.html"><i class="fa fa-folder"></i>Usage</a></li>
+			<li><a href="/advanced.html"><i class="fa fa-folder"></i>Advanced</a></li>
+			<li><a href="/troubleshooting.html"><i class="fa fa-folder"></i>Troubleshooting</a></li>
 			<li class="divider"></li>
 			<li><a href="#"><i class="fa fa-arrow-up"></i>Top of Page</a></li>
 		</ul>
@@ -99,11 +100,11 @@
 	<div class="col-sm-3 sidebar hidden-xs">
 		<! -- sidebar.html -->
 <header class="sidebar-header" role="banner">
-	<a href="http://jonnnnyw.github.io/php-phantomjs/">
-		<img src="http://jonnnnyw.github.io/php-phantomjs/assets/media/phantomjs.png" class="img-circle" />
+	<a href="/">
+		<img src="/assets/media/phantomjs.png" class="img-circle" />
 	</a>
 	<h3 class="title">
-        <a href="http://jonnnnyw.github.io/php-phantomjs/">PHP PhantomJs</a>
+        <a href="/">PHP PhantomJs</a>
     </h3>
 </header>
 
@@ -114,22 +115,22 @@
 
 
 <div id="contact-list" class="text-center">
-<!--
+
 	<ul class="list-unstyled list-inline">
 		
-		
-		
-	</ul>
-	<ul id="contact-list-secondary" class="list-unstyled list-inline">
+		<li>
+            <iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=watch&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
+		</li>
 		
 		
 		<li>
-			<a class="btn btn-default btn-sm" href="http://jonnnnyw.github.io/php-phantomjs/feed.xml">
-				<i class="fa fa-rss fa-lg"></i>
-			</a>
+			<iframe src="http://ghbtns.com/github-btn.html?user=jonnnnyw&repo=php-phantomjs&type=fork&count=true"
+                allowtransparency="true" frameborder="0" scrolling="0" width="83" height="20"></iframe>
 		</li>
+		
 	</ul>
--->
+
 </div>
 <! -- sidebar.html end -->
 
@@ -158,7 +159,7 @@
   <li><a href="#custom-run-options">Custom Run Options</a></li>
 </ul>
 
-<p>For more advanced customization or to load your own PhantomJS scripts, see the <a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html">advanced</a> documentation.</p>
+<p>For more advanced customization or to load your own PhantomJS scripts, see the <a href="/advanced.html">advanced</a> documentation.</p>
 
 <h2 id="basic-request">Basic Request</h2>
 
@@ -319,7 +320,7 @@
   </tbody>
 </table>
 
-<p>If the response contains a status code of 0, chances are the request failed. Check the request <a href="http://jonnnnyw.github.io/php-phantomjs/debugging.html">debug log</a> for more detailed information about what may have gone wrong.</p>
+<p>If the response contains a status code of 0, chances are the request failed. Check the request <a href="/debugging.html">debug log</a> for more detailed information about what may have gone wrong.</p>
 
 <h2 id="screen-captures">Screen Captures</h2>
 
@@ -443,24 +444,21 @@
     </div>
 
     <div class="clearfix"></div>
+    
+    <hr>
+    <ul class="pager">
+        
+        <li class="previous"><a href="/installation.html" title="Installation">&larr; Installation</a></li>
+        
+        
+        <li class="next"><a href="/advanced.html" title="Advanced Usage">Advanced Usage &rarr;</a></li>
+        
+    </ul>
 
-		<ul class="pager">
-		  
-		  <li class="previous"><a href="http://jonnnnyw.github.io/php-phantomjs/advanced.html" title="Advanced Usage">&larr; Advanced Usage</a></li>
-		  
-		  
-		  <li class="next"><a href="http://jonnnnyw.github.io/php-phantomjs/installation.html" title="Installation">Installation &rarr;</a></li>
-		  
-		</ul>
-
-		<hr>
-	</div>
-	
-	<div class="col-sm-2 sidebar-2">
 	
-	</div>
+    
 </article>
-<div class="clearfix"></div>
+
 
 
 
@@ -472,9 +470,9 @@
 		</footer>
 	</div>
 
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/jquery/jquery.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/resources/bootstrap/js/bootstrap.min.js"></script>
-	<script type="text/javascript" src="http://jonnnnyw.github.io/php-phantomjs/assets/js/app.js"></script>
+	<script type="text/javascript" src="/assets/resources/jquery/jquery.min.js"></script>
+	<script type="text/javascript" src="/assets/resources/bootstrap/js/bootstrap.min.js"></script>
+	<script type="text/javascript" src="/assets/js/app.js"></script>
 	
 </body>
 </html>

+ 8 - 7
assets/css/style.css

@@ -26,15 +26,16 @@ body{
 	color: #fff;
 }
 
-a.nav-link {
-	padding-bottom: 5px;
-	padding-top: 7px;
-	color: #aaa;
+.nav-link {
+	position: relative;
+    float: right;
+    margin-top: 15px;
+    margin-bottom: 8px;
 }
-a.nav-link i{
-	font-size: 16px;
+
+.nav-link.last {
+    margin-right: 10px;
 }
-a.nav-link:hover { color: #777 }
 
 #bio {
 	font-family: "Courier New", Courier, monospace;

+ 12 - 21
index.html

@@ -3,7 +3,7 @@ layout: page
 tagline:
 ---
 
-{% for post in paginator.posts %}
+{% for post in site.posts limit: 1 %}
 
 <div class="page-header">
   <h1>{{ post.title }} {% if post.tagline %} <small>{{ post.tagline }}</small>{% endif %}</h1>
@@ -24,27 +24,18 @@ tagline:
     {% endif %}
     {% endif %}
   </div>
+  
+  <div class="clearfix"></div>
+  <hr/>
+
+  <ul class="pager"> 
+      {% if site.posts[1] %}
+      <li class="next">
+        <a href="{{ site.BASE_PATH }}{{ site.posts[1].url }}" title="{{ site.posts[1].title }}">{{ site.posts[1].title }} &rarr;</a>
+      </li>
+      {% endif %}
+  </ul>
 
 </article>
 {% endfor %}
-<hr/>
 
-<ul class="pager"> 
-
-  {% if paginator.previous_page %}
-  <li class="previous">
-    {% if paginator.previous_page == 1 %}
-    <a href="{{ site.BASE_PATH }}/">&larr; Previous</a>
-    {% else %}
-    <a href="{{ site.BASE_PATH }}/{{ site.paginate_path | replace: ':num', paginator.previous_page }}">&larr; Previous</a>
-    {% endif %}
-  </li>
-  {% endif %}
-
-  {% if paginator.next_page %}
-  <li class="next">
-    <a href="{{ site.BASE_PATH }}/{{ site.paginate_path | replace: ':num', paginator.next_page }}">Next &rarr;</a>
-  </li>
-  {% endif %}
-
-</ul>