Skip to content

Commit 028c717

Browse files
committed
more info
1 parent b3af17a commit 028c717

File tree

4 files changed

+47
-8
lines changed

4 files changed

+47
-8
lines changed

Diff for: css/theme.css

+5
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@
88
.showseo-output {
99
width: 100%;
1010
height: 300px;
11+
}
12+
13+
code {
14+
margin-bottom: 10px;
15+
display: inline-block;
1116
}

Diff for: index.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5-
<title>Seo Server</title>
5+
<title>Seo Server - Enabled SEO for your Javascript applications</title>
66
<meta name="viewport" content="width=device-width,initial-scale=1">
7-
<meta name="description" content="">
7+
<meta name="description" content="Seo Server is a command line tool that runs a server that allows GoogleBot(any any other crawlers) to crawl your heavily Javascript built websites.">
88
<meta name="fragment" content="!">
9+
<base href="/repos/seoserver-site/" />
910
<link rel="stylesheet" href="css/styles.css">
1011
<script data-main="js/main" src="js/libs/require/require.js" type="text/javascript"></script>
1112
</head>

Diff for: templates/home/page.html

+37-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,41 @@
11
<div class="well">
2-
Welcome
2+
<h3>Welcome!</h3>
3+
<p>Seo Server is a command line tool that runs a server that allows GoogleBot(any any other crawlers) to crawl your heavily Javascript built websites. The tool works with very little changes to your server or client side code.</p>
4+
<p><i>This entire site is driven by Javascript(view the source). Click the `What does Google see?` button at the bottom of each page to see Seo Server in action.</i></p>
35

4-
<hr />
5-
<button class="btn btn-info showseo">What does Google see?</button>
6+
<h3>How it works</h3>
7+
<img src="http://yuml.me/5b1b60bb" /><br /><br />
8+
<p>Seo Server runs <a href="http://phantomjs.org/">PhantomJs</a>(headless webkit browser) which renders the page fully and returns the fully executed code to GoogleBot.</p>
9+
10+
<h3>Getting started</h3>
11+
<p>Seo Server is an NPM module so install via</p>
12+
<code>sudo npm install -g seoserver</code>
13+
<p>Now we have access to the Seo Server command line tool</p>
14+
<code>seoserver start</code>
15+
<p>Which starts an Express server on port 3000 or</p>
16+
<code> seoserver -p 4000 start</code>
17+
<h3>Telling GoogleBot to fetch from Seo Server</h3>
18+
<p>To tell GoogleBot that we are using ajaxed content we simply add to our sites index.html file the Google specific <a href="https://developers.google.com/webmasters/ajax-crawling/docs/specification">meta tag</a>. If you view the source of this page you can see we have included the tag below. </p>
19+
<code>&lt;meta name="fragment" content="!"&gt;</code>
20+
<p>Now whenever GoogleBot visits any of our pages it will try to load <code>?_escaped_fragment_=pathname</code></p>
21+
<p>So if we were using Apache with mod rewrite and mod proxy, we can include in our .htaccess</p>
22+
<code>
23+
RewriteCond %{QUERY_STRING} ^_escaped_fragment_=(.*)$<br />
24+
RewriteRule (.*) http://address-of-seoserver:3000/%1? [P]
25+
</code>
26+
<p>Now all request from GoogleBot will be returned fully rendered.</p>
27+
<h3>For other crawlers</h3>
28+
<p>
29+
Using mod rewrite, we can send other crawlers to Seo Server also
30+
</p>
31+
<code>
32+
RewriteCond %{HTTP_USER_AGENT} ^DuckDuckBot/1.0;<br />
33+
RewriteRule (.*) http://address-of-seoserver:3000/%1? [P]
34+
35+
</code>
36+
<hr />
37+
<button class="btn btn-info showseo">What does Google see?</button>
638
<hr />
739
<textarea class="showseo-output" disabled="disabled"></textarea>
8-
</div>
40+
</div>
41+

Diff for: templates/menu.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="well sidebar-nav">
22
<ul class="nav nav-list">
3-
<li class="active"><a href="#">Home</a></li>
4-
<li><a href="#">Docs</a></li>
3+
<li class="active"><a href="">Home</a></li>
4+
<li><a href="docs">Docs</a></li>
55
<li class="nav-header">Examples</li>
66
<li><a href="#">HTML Templates</a></li>
77
<li><a href="#">AJAX Data</a></li>

0 commit comments

Comments
 (0)