Skip to content

Commit 9539dfc

Browse files
author
Tim Branyen
committed
Updates to pages
1 parent 670aa78 commit 9539dfc

File tree

3 files changed

+44
-5
lines changed

3 files changed

+44
-5
lines changed

css/common.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
body {
22
font-family: Georgia, sans-serif;
33
}
4+
body .boston {
5+
padding: 20px;
6+
position: relative;
7+
left: 50%;
8+
margin-top: 20px;
9+
margin-left: -120px;
10+
}
411

512
.forkme {
613
position: absolute;
@@ -41,6 +48,16 @@ pre {
4148
font-size: 200%;
4249
}
4350

51+
#container .branding .small a {
52+
text-decoration: none;
53+
}
54+
55+
#container .command, #container code {
56+
-moz-box-shadow: 0px 0px 14px #CCC;
57+
-webkit-box-shadow: 0px 0px 14px #CCC;
58+
box-shadow: 0px 0px 14px #CCC;
59+
}
60+
4461
#container .command {
4562
padding: 10px;
4663
background-color: #333;

img/boston.gif

3.69 KB
Loading

index.html

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,16 @@
3333
</section>
3434

3535
<div class="description">
36-
<span class="version">Version 0.0.1</span> Node.js libgit2 asynchronous native bindings
36+
<span class="version">Version 0.0.2</span> Node.js libgit2 asynchronous native bindings
3737
</div>
3838

3939
<p>A collection of non-blocking Node.js libgit2 bindings, raw api, convenience api, unit tests, documentation and accomodations to make contributing easier.</p>
4040

41-
<h2>dependencies</h2>
41+
<h2>require</h2>
4242
<p>
4343
<ul>
4444
<li><a href="http://nodejs.org/" target="_blank">Node.js 0.4.2 or latest</a></li>
45+
<li><a href="http://npmjs.org/" target="_blank">NPM</a> <em>( if you want the premiere install experience )</em></li>
4546
<li><a href="http://git-scm.com/" target="_blank">Git</a> <em>( if you want to unit test )</em></li>
4647
</ul>
4748
</p>
@@ -52,8 +53,7 @@ <h2>install</h2>
5253
</p>
5354

5455
<h2>use</h2>
55-
<p>
56-
<em>emulate `git log`</em>
56+
<p><em>emulate `git log`</em></p>
5757
<pre><code>
5858
// Load in the module
5959
var git = require( 'nodegit' );
@@ -78,7 +78,27 @@ <h2>use</h2>
7878
});
7979
</code>
8080
</pre>
81-
</p>
81+
82+
<p><em>view commit tree and blob information</em></p>
83+
<pre><code>
84+
// Load in the module
85+
var git = require( 'nodegit' );
86+
// Open a repository for reading
87+
git.repo( '.git', function( err, repo ) {
88+
// Success is always 0, failure is always an error string
89+
if( err ) { throw err; }
90+
// Use the master branch
91+
repo.branch( 'master', function( err, branch ) {
92+
if( err ) { throw err; }
93+
// Iterate over the revision history
94+
branch.tree().each( function( i, entry ) {
95+
console.log( entry.name );
96+
console.log( entry.content );
97+
});
98+
});
99+
});
100+
</code>
101+
</pre>
82102

83103

84104
<h2>download</h2>
@@ -106,6 +126,8 @@ <h2>download</h2>
106126

107127
</div>
108128

129+
<a target="_blank" href="http://bostonbuilt.org"><img class="boston" src="img/boston.gif" alt="Built in Boston USA"></a>
130+
109131
<script src="js/highlight.pack.js"></script>
110132
<script>
111133
hljs.tabReplace = ' ';

0 commit comments

Comments
 (0)