Skip to content

Commit

Permalink
Build infrastructure and skeleton for all resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew McCullough committed Jan 2, 2014
1 parent 5191384 commit 2fa5f6b
Show file tree
Hide file tree
Showing 34 changed files with 5,948 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
source "https://rubygems.org"

gem 'compass'
gem 'github-pages'
gem 'html-proofer'
gem 'jekyll'
gem 'rack-contrib', '~> 1.1.0'
gem 'rake'
gem 'rdiscount'
gem 'sass'
78 changes: 78 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
GEM
remote: https://rubygems.org/
specs:
classifier (1.3.3)
fast-stemmer (>= 1.0.0)
colorator (0.1)
colored (1.2)
commander (4.1.5)
highline (= 1.6.20)
compass (0.12.2)
ethon (0.6.1)
ffi (>= 1.3.0)
mime-types (~> 1.18)
fast-stemmer (1.0.2)
ffi (1.9.3)
github-pages (10)
kramdown (= 1.2.0)
highline (1.6.20)
html-proofer (0.3.0)
colored (~> 1.2)
mercenary (~> 0.2.0)
nokogiri (~> 1.6.0)
typhoeus (~> 0.6.3)
jekyll (1.3.1)
classifier (~> 1.3)
colorator (~> 0.1)
commander (~> 4.1.3)
liquid (= 2.5.4)
listen (~> 1.3)
maruku (~> 0.6.0)
pygments.rb (~> 0.5.0)
redcarpet (~> 2.3.0)
safe_yaml (~> 0.9.7)
kramdown (1.2.0)
liquid (2.5.4)
listen (1.3.1)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
maruku (0.6.1)
syntax (>= 1.0.0)
mercenary (0.2.0)
mime-types (1.25.1)
mini_portile (0.5.2)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
posix-spawn (0.3.6)
pygments.rb (0.5.4)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
rack-contrib (1.1.0)
rake (10.1.0)
rb-fsevent (0.9.3)
rb-inotify (0.9.2)
ffi (>= 0.5.0)
rb-kqueue (0.2.0)
ffi (>= 0.5.0)
rdiscount (2.1.7)
redcarpet (2.3.0)
safe_yaml (0.9.7)
sass (3.2.8)
syntax (1.0.0)
typhoeus (0.6.6)
ethon (~> 0.6.1)
yajl-ruby (1.1.0)

PLATFORMS
ruby

DEPENDENCIES
compass
github-pages
html-proofer
jekyll
rack-contrib (~> 1.1.0)
rake
rdiscount
sass
103 changes: 103 additions & 0 deletions LICENSE.md

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
require 'html/proofer'

desc 'Clean up generated site'
task :clean do
sh 'rm -rf _site'
end

task :test do
sh 'bundle exec sass _stylesheets/cheatsheet.scss:_stylesheets/cheatsheet.css'
sh 'bundle exec sass _stylesheets/outline.scss:_stylesheets/outline.css'
sh 'bundle exec sass _stylesheets/page.scss:_stylesheets/page.css'
sh 'bundle exec sass _stylesheets/slide.scss:_stylesheets/slide.css'
sh 'bundle exec jekyll build'

# HTML::Proofer.new("./_site").run
end

task default: :test
14 changes: 14 additions & 0 deletions _buildscripts/bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

set -e
export CC=gcc

echo "==> Installing gem dependencies…"

bundle check --path vendor/gems 2>&1 > /dev/null || {
bundle install --binstubs bin --path vendor/gems
}

echo "==> Cloning into submodules"
git submodule init
git submodule update
17 changes: 17 additions & 0 deletions _buildscripts/cibuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

set -e

# setup environment
export PATH="/usr/share/rbenv/shims:$PATH"
export RBENV_VERSION="2.0.0"

# write some debug info
ruby -v
echo "hostname: $(hostname)"
echo "pwd: $(pwd)"
git --version

_buildscripts/bootstrap

bundle exec rake test
6 changes: 6 additions & 0 deletions _buildscripts/server
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

_buildscripts/update
_buildscripts/cibuild

bundle exec jekyll serve --watch "$@"
8 changes: 8 additions & 0 deletions _buildscripts/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

set -e
export CC=gcc

_buildscripts/bootstrap

echo "==> The app is now ready to go!"
6 changes: 6 additions & 0 deletions _buildscripts/update
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

set -e
export CC=gcc

_buildscripts/bootstrap
26 changes: 26 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# For Atom Feed
domain: training.github.com
author: GitHub Training Team
email: [email protected]
title: GitHub Training

# standard jekyll configuration

permalink: /articles/:title
pygments: true
exclude:
- bin
- config.rb
- Gemfile
- Gemfile.lock
- gems
- Procfile
- Rakefile
- README.md
- script
- vendor

include:
- _stylesheets

markdown: rdiscount
13 changes: 13 additions & 0 deletions _includes/analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- google analytics async -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-3769691-19']);
_gaq.push(['_setDomainName', 'github.com']);
_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>
27 changes: 27 additions & 0 deletions _layouts/cheatsheet.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<title>{% if page.title %}{{ page.title }} • {% endif %}{{ site.title }}</title>
{% if page.description %}
<meta name="description" content="{{ page.description }}" />
{% endif %}
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<link rel="stylesheet" media="screen" href="/_stylesheets/cheatsheet.css" type="text/css" />

{% include analytics.html %}
</head>
<body>
<div class="top">
<header>
<div class="logo"><a href ="/">GitHub Training</a></div>
<a href="https://github.com/github/training-materials" class="mini-button"><span>R</span>Source on GitHub</a>
</header>
</div>

<div id="content-wrapper">
<h1>{{ page.title }}</h1>
{{ content }}
</div>
</body>
</html>
27 changes: 27 additions & 0 deletions _layouts/outline.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<title>{% if page.title %}{{ page.title }} • {% endif %}{{ site.title }}</title>
{% if page.description %}
<meta name="description" content="{{ page.description }}" />
{% endif %}
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<link rel="stylesheet" media="screen" href="/_stylesheets/outline.css" type="text/css" />

{% include analytics.html %}
</head>
<body>
<div class="top">
<header>
<div class="logo"><a href ="/">GitHub Training</a></div>
<a href="https://github.com/github/training-materials" class="mini-button"><span>R</span>Source on GitHub</a>
</header>
</div>

<div id="content-wrapper">
<h1>{{ page.title }}</h1>
{{ content }}
</div>
</body>
</html>
27 changes: 27 additions & 0 deletions _layouts/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<title>{% if page.title %}{{ page.title }} • {% endif %}{{ site.title }}</title>
{% if page.description %}
<meta name="description" content="{{ page.description }}" />
{% endif %}
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<link rel="stylesheet" media="screen" href="/_stylesheets/page.css" type="text/css" />

{% include analytics.html %}
</head>
<body>
<div class="top">
<header>
<div class="logo"><a href ="/">GitHub Training</a></div>
<a href="https://github.com/github/training-materials" class="mini-button"><span>R</span>Source on GitHub</a>
</header>
</div>

<div id="content-wrapper">
<h1>{{ page.title }}</h1>
{{ content }}
</div>
</body>
</html>
27 changes: 27 additions & 0 deletions _layouts/slide.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<title>{% if page.title %}{{ page.title }} • {% endif %}{{ site.title }}</title>
{% if page.description %}
<meta name="description" content="{{ page.description }}" />
{% endif %}
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<link rel="stylesheet" media="screen" href="/_stylesheets/slide.css" type="text/css" />

{% include analytics.html %}
</head>
<body>
<div class="top">
<header>
<div class="logo"><a href ="/">GitHub Training</a></div>
<a href="https://github.com/github/training-materials" class="mini-button"><span>R</span>Source on GitHub</a>
</header>
</div>

<div id="content-wrapper">
<h1>{{ page.title }}</h1>
{{ content }}
</div>
</body>
</html>
Loading

0 comments on commit 2fa5f6b

Please sign in to comment.