Skip to content

Commit cfbd8e4

Browse files
committed
Merge pull request #13 from nodegit/ol-new-jekyll-website
New jekyll website
2 parents 0239249 + 0eab7b2 commit cfbd8e4

File tree

333 files changed

+16508
-57684
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

333 files changed

+16508
-57684
lines changed

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
/api-viewer/bower_components/
2-
/api-viewer/node_modules/
1+
_site
2+
.sass-cache
3+
generate/nodegit
4+
node_modules/

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source 'https://rubygems.org'
2+
gem 'github-pages'

Gemfile.lock

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
RedCloth (4.2.9)
5+
activesupport (4.2.0)
6+
i18n (~> 0.7)
7+
json (~> 1.7, >= 1.7.7)
8+
minitest (~> 5.1)
9+
thread_safe (~> 0.3, >= 0.3.4)
10+
tzinfo (~> 1.1)
11+
blankslate (2.1.2.4)
12+
celluloid (0.16.0)
13+
timers (~> 4.0.0)
14+
classifier-reborn (2.0.3)
15+
fast-stemmer (~> 1.0)
16+
coffee-script (2.3.0)
17+
coffee-script-source
18+
execjs
19+
coffee-script-source (1.9.0)
20+
colorator (0.1)
21+
execjs (2.3.0)
22+
fast-stemmer (1.0.2)
23+
ffi (1.9.6)
24+
gemoji (2.1.0)
25+
github-pages (33)
26+
RedCloth (= 4.2.9)
27+
github-pages-health-check (~> 0.2)
28+
jekyll (= 2.4.0)
29+
jekyll-coffeescript (= 1.0.1)
30+
jekyll-mentions (= 0.2.1)
31+
jekyll-redirect-from (= 0.6.2)
32+
jekyll-sass-converter (= 1.2.0)
33+
jekyll-sitemap (= 0.6.3)
34+
jemoji (= 0.4.0)
35+
kramdown (= 1.5.0)
36+
liquid (= 2.6.1)
37+
maruku (= 0.7.0)
38+
mercenary (~> 0.3)
39+
pygments.rb (= 0.6.1)
40+
rdiscount (= 2.1.7)
41+
redcarpet (= 3.1.2)
42+
terminal-table (~> 1.4)
43+
github-pages-health-check (0.2.1)
44+
net-dns (~> 0.6)
45+
public_suffix (~> 1.4)
46+
hitimes (1.2.2)
47+
html-pipeline (1.9.0)
48+
activesupport (>= 2)
49+
nokogiri (~> 1.4)
50+
i18n (0.7.0)
51+
jekyll (2.4.0)
52+
classifier-reborn (~> 2.0)
53+
colorator (~> 0.1)
54+
jekyll-coffeescript (~> 1.0)
55+
jekyll-gist (~> 1.0)
56+
jekyll-paginate (~> 1.0)
57+
jekyll-sass-converter (~> 1.0)
58+
jekyll-watch (~> 1.1)
59+
kramdown (~> 1.3)
60+
liquid (~> 2.6.1)
61+
mercenary (~> 0.3.3)
62+
pygments.rb (~> 0.6.0)
63+
redcarpet (~> 3.1)
64+
safe_yaml (~> 1.0)
65+
toml (~> 0.1.0)
66+
jekyll-coffeescript (1.0.1)
67+
coffee-script (~> 2.2)
68+
jekyll-gist (1.1.0)
69+
jekyll-mentions (0.2.1)
70+
html-pipeline (~> 1.9.0)
71+
jekyll (~> 2.0)
72+
jekyll-paginate (1.1.0)
73+
jekyll-redirect-from (0.6.2)
74+
jekyll (~> 2.0)
75+
jekyll-sass-converter (1.2.0)
76+
sass (~> 3.2)
77+
jekyll-sitemap (0.6.3)
78+
jekyll-watch (1.2.1)
79+
listen (~> 2.7)
80+
jemoji (0.4.0)
81+
gemoji (~> 2.0)
82+
html-pipeline (~> 1.9)
83+
jekyll (~> 2.0)
84+
json (1.8.2)
85+
kramdown (1.5.0)
86+
liquid (2.6.1)
87+
listen (2.8.5)
88+
celluloid (>= 0.15.2)
89+
rb-fsevent (>= 0.9.3)
90+
rb-inotify (>= 0.9)
91+
maruku (0.7.0)
92+
mercenary (0.3.5)
93+
mini_portile (0.6.2)
94+
minitest (5.5.1)
95+
net-dns (0.8.0)
96+
nokogiri (1.6.6.2)
97+
mini_portile (~> 0.6.0)
98+
parslet (1.5.0)
99+
blankslate (~> 2.0)
100+
posix-spawn (0.3.9)
101+
public_suffix (1.4.6)
102+
pygments.rb (0.6.1)
103+
posix-spawn (~> 0.3.6)
104+
yajl-ruby (~> 1.2.0)
105+
rb-fsevent (0.9.4)
106+
rb-inotify (0.9.5)
107+
ffi (>= 0.5.0)
108+
rdiscount (2.1.7)
109+
redcarpet (3.1.2)
110+
safe_yaml (1.0.4)
111+
sass (3.4.11)
112+
terminal-table (1.4.5)
113+
thread_safe (0.3.4)
114+
timers (4.0.1)
115+
hitimes
116+
toml (0.1.2)
117+
parslet (~> 1.5.0)
118+
tzinfo (1.2.2)
119+
thread_safe (~> 0.1)
120+
yajl-ruby (1.2.1)
121+
122+
PLATFORMS
123+
ruby
124+
125+
DEPENDENCIES
126+
github-pages

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,19 @@
1-
`bower install`
2-
`http-server`
1+
`script/bootstrap`
2+
`script/server`
3+
`open http://localhost:4000`
4+
5+
## Generating the site
6+
7+
While in development, the generator will not clone the nodegit repo. You'll need to soft-link the nodegit repository into `generate/`.
8+
9+
```bash
10+
ln -s /path/to/nodegit generate/nodegit
11+
```
12+
13+
Once linked, generate the site.
14+
15+
```bash
16+
node generate
17+
```
18+
19+
If you're running `script/server` in another terminal tab, it will read the changes and regenerate the site.

TODO.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

_config.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Site settings
2+
title: NodeGit
3+
description: Asynchronous native Node bindings to libgit2
4+
url: "http://nodegit.org"
5+
date_format: "ordinal"
6+
current_nodegit_version: 0.3.0
7+
other_nodegit_versions:
8+
- HEAD
9+
- 0.2.7
10+
11+
# Build settings
12+
markdown: redcarpet
13+
redcarpet:
14+
extensions: [tables, no_intra_emphasis, autolink]
15+
highlighter: pygments
16+
permalink: pretty
17+
exclude: ["node_modules","generate","package.json","README.md"]

_includes/footer.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<footer class="site-footer">
2+
3+
<div class="wrapper">
4+
5+
6+
7+
</div>
8+
9+
</footer>

_includes/head.html

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<head>
2+
<meta charset="utf-8">
3+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
4+
<meta name="viewport" content="width=device-width, initial-scale=1">
5+
6+
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
7+
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
8+
9+
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
10+
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
11+
<link rel="alternate" type="application/atom+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
12+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
13+
<script src="/js/sticky.js"></script>
14+
<script>
15+
var headlines = [];
16+
$(function() {
17+
$(".outline").stick_in_parent({offset_top:30});
18+
$('a[name]').each(function() {
19+
headlines.push({el: $(this), top:$(this).offset().top});
20+
});
21+
22+
var selectHeadline = function() {
23+
if (headlines.length) {
24+
var top = $(window).scrollTop();
25+
var headline = headlines[0].el;
26+
for(var i=0;i<headlines.length;i++) {
27+
if (headlines[i].top <= top + 30) {
28+
headline = headlines[i].el;
29+
}
30+
}
31+
32+
var el = $("a[href='#" + headline.attr('name') + "']");
33+
if (!el.hasClass('selected')) {
34+
$('a[href^=#].selected').removeClass('selected');
35+
el.addClass('selected');
36+
}
37+
}
38+
}
39+
40+
$(window).on('scroll', selectHeadline);
41+
selectHeadline();
42+
});
43+
44+
$(document).on('click', 'a[href^=#]', function(e) {
45+
var tag = $(e.currentTarget).attr('href').replace(/^#/, '');
46+
var el = $("a[name='" + tag + "']");
47+
$('html,body').animate({scrollTop: el.offset().top-30});
48+
return false;
49+
});
50+
51+
$(document).on('click', '.hamburger', function() {
52+
$('.hamburger, nav').toggleClass('open');
53+
})
54+
</script>
55+
56+
</head>

_includes/header.html

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<header class="site-header">
2+
3+
<div class="wrapper">
4+
5+
<div class="site-info">
6+
<h1><a class="site-title" href="{{ site.baseurl }}/"><img src="/img/nodegit.svg" alt="{{ site.title }}" /></a></h1>
7+
<div class="hamburger"></div>
8+
<div class="version dropdown">
9+
{% if page.nodegit_version %}
10+
{{ page.nodegit_version }}
11+
{% else %}
12+
<span>Latest release:</span> {{ site.current_nodegit_version }}
13+
{% endif %}
14+
</div>
15+
<ul class="version-menu">
16+
<li><a href="{{ site.baseurl }}/"><span>Latest release:</span> {{ site.current_nodegit_version }}</a></li>
17+
{% for version in site.other_nodegit_versions %}
18+
<li><a href="{{ site.baseurl }}/{{version}}/">{{ version }}</a></li>
19+
{% endfor %}
20+
</ul>
21+
</div>
22+
23+
<nav>
24+
<ul>
25+
<li{% if page.menu_item == 'getting_started' %} class="active"{% endif %}><a href="{{ site.baseurl }}/{% if page.nodegit_version %}{{ page.nodegit_version }}/{% endif %}">Getting Started</a></li>
26+
<li{% if page.menu_item == 'guides' %} class="active"{% endif %}><a href="{{ site.baseurl }}/{% if page.nodegit_version %}{{ page.nodegit_version }}/{% endif %}guides/">Guides</a></li>
27+
<li{% if page.menu_item == 'api' %} class="active"{% endif %}><a href="{{ site.baseurl }}/{% if page.nodegit_version %}{{ page.nodegit_version }}/{% endif %}api/">API Documentation</a></li>
28+
<li><a href="https://github.com/nodegit/nodegit/{% if page.nodegit_version %}tree/{{ page.nodegit_version }}/{% endif %}">Source</a></li>
29+
<!--<li{% if page.menu_item == 'blog' %} class="active"{% endif %}><a href="{{ site.baseurl }}/blog/">Blog</a></li>-->
30+
</ul>
31+
</nav>
32+
33+
</div>
34+
</header>
35+
36+
<div class="banner">
37+
{% if page.url == '/' %}
38+
<div class="wrapper hero">
39+
<h2>{{ site.description}}</h2>
40+
<div class="buttons">
41+
<a href="{{ site.baseurl }}/guides/">Read the NodeGit Guides</a>
42+
<a href="https://github.com/nodegit/nodegit" class="secondary">Fork on GitHub</a>
43+
</div>
44+
<p>Latest release: {{ site.current_nodegit_version }} &mdash; <a href="{{ site.baseurl }}/changelog/">Changelog</a></p>
45+
</div>
46+
{% else %}
47+
<div class="wrapper">
48+
<h2>{{ page.title }}</h2>
49+
<p>{{ page.description }}</p>
50+
</div>
51+
{% endif %}
52+
</div>

_layouts/default.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
{% include head.html %}
5+
6+
<body>
7+
8+
{% include header.html %}
9+
10+
<div class="page-content">
11+
<div class="wrapper">
12+
<div class="outline">
13+
{% if page.return_to %}
14+
{% for section_hash in page.return_to %}
15+
<h5><a href="{{section_hash[1]}}">{{section_hash[0]}}</a></h5>
16+
{% endfor %}
17+
{% endif %}
18+
<ul>
19+
{% for section_hash in page.sections %}
20+
<li><a href="{{section_hash[1]}}">{{section_hash[0]}}</a></li>
21+
{% endfor %}
22+
</ul>
23+
</div>
24+
<div class="main">
25+
{{ content }}
26+
</div>
27+
</div>
28+
</div>
29+
30+
{% include footer.html %}
31+
32+
</body>
33+
34+
</html>

0 commit comments

Comments
 (0)