Move to staticmatic generated static HTML instead of relying on Jekyll (or server-side Jekyll)

This commit is contained in:
Davis W. Frank 2011-01-25 13:13:32 -08:00
parent 225494c82c
commit a5b292f59b
10 changed files with 89 additions and 141 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
.idea/
_site/
site/

3
Gemfile Normal file
View File

@ -0,0 +1,3 @@
source :rubygems
gem "staticmatic"

17
Gemfile.lock Normal file
View File

@ -0,0 +1,17 @@
GEM
remote: http://rubygems.org/
specs:
compass (0.10.6)
haml (>= 3.0.4)
haml (3.0.25)
rack (1.2.1)
staticmatic (0.11.1)
compass (>= 0.10.0)
haml (>= 2.0.0)
rack (>= 1.0)
PLATFORMS
ruby
DEPENDENCIES
staticmatic

5
Rakefile Normal file
View File

@ -0,0 +1,5 @@
desc "build the site"
task :site do
system("staticmatic build .")
system("cp -r site/ .")
end

View File

@ -1,53 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{% if page.title %}{{ page.title }} | {% endif %}{{site.title}}</title>
<!--[if IE]>
<script type="text/javascript" src="js/html5.js"/>
<![endif]-->
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
<link rel="stylesheet" type="text/css" media="screen, projection" href="/jasmine/css/screen.css"/>
<link rel="stylesheet" type="text/css" media="screen, projection" href="/jasmine/css/pygments.css"/>
</head>
<body>
<a href="http://github.com/pivotal/jasmine"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
<div id="wrap" class="container_16">
<header class="grid_16 alpha omega">
<h1><a href="/jasmine/"><img src="/jasmine/images/jasmine_logo.png" alt="Jasmine"/></a></h1>
</header>
<div class="clear"></div>
<section class="grid_5 alpha">
{% capture toc %} {% include toc.html %} {% endcapture %}
{{ toc | textilize }}
</section>
<section class="grid_11 omega">
{{ content }}
</section>
<div class="clear"></div>
<footer>
<div class="grid_16 alpha omega">
<span class="small">Powered by &nbsp;
<a href="http://pivotallabs.com/">
<img src="/jasmine/images/pivotal_logo.gif" alt="Pivotal Labs, Inc."/>
</a>
</span>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-17547473-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</footer>
<div class="clear"></div>
</div>
<!-- .container_16 -->
</body>
</html>

View File

@ -24,6 +24,15 @@ body
font-size:87.5%; /* 16px * 0.875 = 14px */
line-height: 137.5%; /* 16px * 1.375 = 22px */
}
.content {
margin: 32px;
}
.copy {
margin-top: 24px;
}
a
{
color: #55862e;

View File

@ -1,51 +0,0 @@
---
layout: default
title: Downloads
---
## Downloads
These files are for the standalone release, meant for inclusion on a static HTML page and manual management of files.
For a using Jasmine with Ruby on Rails, other Ruby frameworks, within continuous integration environments, or to gain
more dynamic source and test file loading, see [Using the Jasmine Gem](gem.html).
<table id="standalone-downloads">
<tr>
<th></th>
<th>Version</th>
<th>Size</th>
<th>Date</th>
<th>SHA1</th>
</tr>
<!-- START_DOWNLOADS -->
<tr>
<td class="link"><a href="downloads/jasmine-standalone-1.0.1.zip">jasmine-standalone-1.0.1.zip</a></td>
<td class="version">1.0.1</td>
<td class="size">20k</td>
<td class="date">2010/10/05 13:37:01 PDT</td>
<td class="sha">b2b3d00a7cb8d5ccd65a3356bb5ae15775328119</td>
</tr>
<tr>
<td class="link"><a href="downloads/jasmine-standalone-1.0.0.zip">jasmine-standalone-1.0.0.zip</a></td>
<td class="version">1.0.0</td>
<td class="size">20k</td>
<td class="date">2010/09/14 12:54:38 PDT</td>
<td class="sha">1866f654a3ad0ab9109393ce31d6613c77916607</td>
</tr>
<tr class="rc">
<td class="link"><a href="downloads/jasmine-standalone-1.0.0.rc1.zip">jasmine-standalone-1.0.0.rc1.zip</a></td>
<td class="version">1.0.0.rc1</td>
<td class="size">19k</td>
<td class="date">2010/08/26 13:09:41 PDT</td>
<td class="sha">20e7da22bc7ce3433331a5ad44eb199f4ff34065</td>
</tr>
<tr>
<td class="link"><a href="downloads/jasmine-standalone-0.11.1.zip">jasmine-standalone-0.11.1.zip</a></td>
<td class="version">0.11.1</td>
<td class="size">18k</td>
<td class="date">2010/06/25 16:05:30 PDT</td>
<td class="sha">26998c7ca047e47f84c382a4efeb1dc5cb8661a6</td>
</tr>
<!-- END_DOWNLOADS -->
</table>

View File

@ -1,37 +0,0 @@
---
layout: default
title: "Jasmine: BDD for Javascript"
---
# BDD for your JavaScript
Jasmine is a behavior-driven development framework for testing your JavaScript code. It does not depend on any other
JavaScript frameworks. It does not require a DOM. And it has a clean, obvious syntax so that you can easily write tests.
{% highlight javascript %}
describe("Jasmine", function() {
it("makes testing JavaScript awesome!", function() {
expect(yourCode).toBeLotsBetter();
});
});
{% endhighlight %}
## Adding Jasmine to your Rails project
{% highlight sh %}
$ gem install jasmine
$ script/generate jasmine
$ rake spec
{% endhighlight %}
Jasmine can be run on a static web page, in your continuous integration environment, or with [node.js](http://nodejs.org).
See more in the documentation.
## Support
__Discussion:__ [Google Group](http://groups.google.com/group/jasmine-js)<br/>
__Group email:__ [jasmine-js@googlegroups.com](mailto:jasmine-js@googlegroups.com)<br/>
__Current Build Status:__ [Jasmine at Pivotal Labs CI](http://ci.pivotallabs.com)<br/>
__Report bugs__ at [GitHub](http://github.com/pivotal/jasmine/issues)<br/>
__Project Backlog:__ [Jasmine on Pivotal Tracker](http://www.pivotaltracker.com/projects/10606)<br/>
__Twitter:__ <img src="http://twitter-badges.s3.amazonaws.com/t_mini-c.png" alt=""/>[@JasmineBDD](http://twitter.com/JasmineBDD)<br/>

View File

@ -0,0 +1,9 @@
module SnippetHelper
def snippet
"<span class='nx'>describe</span><span class='p'>(</span><span class='s2'>&quot;Jasmine&quot;</span><span class='p'>,</span> <span class='kd'>function</span><span class='p'>()</span> <span class='p'>{</span>
<span class='nx'>it</span><span class='p'>(</span><span class='s2'>&quot;makes testing JavaScript awesome!&quot;</span><span class='p'>,</span> <span class='kd'>function</span><span class='p'>()</span> <span class='p'>{</span>
<span class='nx'>expect</span><span class='p'>(</span><span class='nx'>yourCode</span><span class='p'>).</span><span class='nx'>toBeLotsBetter</span><span class='p'>();</span>
<span class='p'>});</span>
<span class='p'>});</span>"
end
end

45
src/pages/download.haml Normal file
View File

@ -0,0 +1,45 @@
.copy
These files are for the standalone release, meant for inclusion on a static HTML page and manual management of files.
.copy
For a using Jasmine with Ruby on Rails, other Ruby frameworks, within continuous integration environments, or to gain more dynamic source and test file loading, see
= link "Using the Jasmine Gem", "http://github.com/pivotal/jasmine/wiki" + '.'
%table#standalone-downloads
%tr
%th
%th Version
%th Size
%th Date
%th SHA1
%tr
%td.link= link "downloads/jasmine-standalone-1.0.1.zip", "jasmine-standalone-1.0.1.zip"
%td.version 1.0.1
%td.size 20k
%td.date 2010/10/05 13:37:01 PDT
%td.sha b2b3d00a7cb8d5ccd65a3356bb5ae15775328119
%tr
%td.link= link "downloads/jasmine-standalone-1.0.0.zip", "jasmine-standalone-1.0.0.zip"
%td.version 1.0.0
%td.size 20k
%td.date 2010/09/14 12:54:38 PDT
%td.sha 1866f654a3ad0ab9109393ce31d6613c77916607
%tr.rc
%td.link= link "downloads/jasmine-standalone-1.0.0.rc1.zip", "jasmine-standalone-1.0.0.rc1.zip"
%td.version 1.0.0.rc1
%td.size 19k
%td.date 2010/08/26 13:09:41 PDT
%td.sha 20e7da22bc7ce3433331a5ad44eb199f4ff34065
%tr
%td.link= link "downloads/jasmine-standalone-0.11.1.zip", "jasmine-standalone-0.11.1.zip"
%td.version 0.11.1
%td.size 18k
%td.date 2010/06/25 16:05:30 PDT
%td.sha 26998c7ca047e47f84c382a4efeb1dc5cb8661a6