diff --git a/.gitignore b/.gitignore
index b828360..bd9f092 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
.jekyll-assets-cache/
.sass-cache/
+npm-debug.log
_site/
bower_components/
-content/
+node_modules/
diff --git a/.travis.yml b/.travis.yml
index a9b9055..9f4db46 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,16 +1,21 @@
---
-language: [ ruby, node_js ]
-rvm: [ 2.2.2 ]
-node_js: [ iojs ]
+language:
+ - ruby
+ - node_js
+rvm:
+ - 2.2.2
+node_js:
+ - iojs
cache:
bundler: true
directories:
- bower_components
+ - node_modules
sudo: false
before_script:
- - npm install -g bower
- - bower install
+ - npm install
+ - npm run install
# Install the travis gem.
# Create a deploy key and encrypt it with:
diff --git a/404.html b/404.html
new file mode 100644
index 0000000..17c7ab2
--- /dev/null
+++ b/404.html
@@ -0,0 +1,6 @@
+---
+layout: body
+title: Page Not Found
+---
+
+Sorry, but the page you were trying to view does not exist.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0f5b996..3196946 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,9 +5,13 @@
- Switch to using [rake-jekyll] for git based deployment.
You may now set the `SOURCE_BRANCH` environment variable
to enable testing on all other branches.
+- Split main body content out from the default layout
+ and into a new body layout.
- Use gist-aysnc bower package.
- Remove Sub-content feature.
- Add staging environment support for Travis CI builds.
+- Add 404 page.
+- Optimize Travis build by adding bower to package.json.
[rake-jekyll]: https://github.com/jirutka/rake-jekyll
diff --git a/Gemfile.lock b/Gemfile.lock
index 799ca4b..4945382 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -2,7 +2,7 @@ GEM
remote: https://rubygems.org/
specs:
addressable (2.3.8)
- bibtex-ruby (4.0.13)
+ bibtex-ruby (4.0.14)
latex-decode (~> 0.0)
blankslate (2.1.2.4)
celluloid (0.16.0)
@@ -33,7 +33,7 @@ GEM
sass (>= 3.3.0, < 3.5)
compass-import-once (1.0.5)
sass (>= 3.2, < 3.5)
- csl (1.4.2)
+ csl (1.4.3)
namae (~> 0.7)
csl-styles (1.0.1.6)
csl (~> 1.0)
@@ -45,11 +45,11 @@ GEM
fast-stemmer (1.0.2)
fastimage (1.7.0)
addressable (~> 2.3, >= 2.3.5)
- ffi (1.9.8)
+ ffi (1.9.10)
formatador (0.2.5)
- guard (2.12.5)
+ guard (2.13.0)
formatador (>= 0.2.4)
- listen (~> 2.7)
+ listen (>= 2.7, <= 4.0)
lumberjack (~> 1.0)
nenv (~> 0.1)
notiffany (~> 0.0)
@@ -99,12 +99,12 @@ GEM
jekyll (~> 2.0)
jekyll-watch (1.2.1)
listen (~> 2.7)
- json (1.8.2)
- kramdown (1.7.0)
+ json (1.8.3)
+ kramdown (1.8.0)
latex-decode (0.2.2)
unicode (~> 0.4)
- liquid (2.6.2)
- listen (2.10.0)
+ liquid (2.6.3)
+ listen (2.10.1)
celluloid (~> 0.16.0)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
@@ -112,10 +112,10 @@ GEM
mercenary (0.3.5)
method_source (0.8.2)
mini_magick (4.2.7)
- multi_json (1.11.0)
+ multi_json (1.11.2)
namae (0.10.1)
nenv (0.2.0)
- notiffany (0.0.6)
+ notiffany (0.0.7)
nenv (~> 0.1)
shellany (~> 0.0)
parslet (1.5.0)
@@ -128,25 +128,25 @@ GEM
pygments.rb (0.6.3)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.2.0)
- rack (1.6.1)
+ rack (1.6.4)
rake (10.4.2)
- rake-jekyll (1.0.3)
+ rake-jekyll (1.0.4)
rake (~> 10.0)
rb-fsevent (0.9.5)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
- redcarpet (3.2.3)
+ redcarpet (3.3.2)
safe_yaml (1.0.4)
- sass (3.4.14)
+ sass (3.4.16)
shellany (0.0.1)
slop (3.6.0)
- sprockets (2.12.3)
+ sprockets (2.12.4)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sprockets-helpers (1.1.0)
- sprockets (~> 2.0)
+ sprockets-helpers (1.2.1)
+ sprockets (>= 2.2)
sprockets-sass (1.3.1)
sprockets (~> 2.0)
tilt (~> 1.1)
@@ -176,3 +176,6 @@ DEPENDENCIES
rake (~> 10.4.2)
rake-jekyll (~> 1.0.3)
uglifier (~> 2.7.0)
+
+BUNDLED WITH
+ 1.10.6
diff --git a/README.md b/README.md
index a2e245b..05f21b3 100644
--- a/README.md
+++ b/README.md
@@ -181,7 +181,7 @@ $ git push
### Staging site
-If the environment variable `JEKYLL_STAGING_URL` is set,
+If the environment variable `STAGING_URL` is set,
then this value will be used to set `domain`, `baseurl`, and the assets `baseurl`.
This is useful when you want to setup a staging site
on a separate development repository.
diff --git a/Rakefile b/Rakefile
index fb45bc5..8a7373d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -22,19 +22,29 @@ def spawn *cmd
switch = true
Signal.trap 'SIGINT' do
- Process.kill( :QUIT, pid ) && Process.wait
+ Process.kill(:QUIT, pid) && Process.wait
switch = false
end
while switch do sleep 1 end
end
+# Generate a staging config if staging URL is set.
+def generate_staging_config(url, config)
+ staging = {'domain' => url, 'baseurl' => url,
+ 'assets' => {'baseurl' => "#{url}/assets"}}
+ File.open(config, 'w') { |f| f.write staging.to_yaml }
+end
+
# Command to build static site to destination (as an Array).
-def build_site_command(destination=nil)
+def build_site_command(destination=nil, staging_url='')
+ config = '_config.staging.yml'
+ generate_staging_config(staging_url, config) unless staging_url.empty?
+
args = []
args.concat ['--destination', destination] unless destination.nil?
- if File.exists? '_config.staging.yml'
- args.concat ['--config', '_config.yml,_config.staging.yml']
+ if File.exists? config
+ args.concat ['--config', "_config.yml,#{config}"]
end
['bundle', 'exec', 'jekyll', 'build', *args]
@@ -43,7 +53,11 @@ end
# rake build
desc 'Generate the site'
task :build do
- sh(*build_site_command)
+ staging_url = ENV['STAGING_URL'].to_s
+ sh(*build_site_command(nil, staging_url))
+ if File.exists?('_config.staging.yml') && !staging_url.empty?
+ File.delete '_config.staging.yml'
+ end
end
# rake test
@@ -126,7 +140,7 @@ Rake::Jekyll::GitDeployTask.new(:publish) do |t|
}
t.jekyll_build = -> (dest_dir) {
- Rake.sh(*build_site_command(dest_dir))
+ Rake.sh(*build_site_command(dest_dir, ENV['STAGING_URL'].to_s))
}
t.skip_commit = -> {
@@ -139,15 +153,6 @@ end
# rake travis_env
desc 'Prepare the Travis CI build environment'
task :travis_env do
- # Generate a staging config if staging URL is set.
- url = ENV['JEKYLL_STAGING_URL'].to_s
- unless url.empty?
- puts 'Creating _config.staging.yml.'
- staging = {'domain' => url, 'baseurl' => url,
- 'assets' => {'baseurl' => "#{url}/assets"}}
- File.open('_config.staging.yml','w') { |f| f.write staging.to_yaml }
- end
-
# Setup the deploy key.
puts 'Adding deploy key.'
verbose false do
diff --git a/_assets/javascripts/app.js.coffee.erb b/_assets/javascripts/app.js.coffee.erb
index c9563d3..b884888 100644
--- a/_assets/javascripts/app.js.coffee.erb
+++ b/_assets/javascripts/app.js.coffee.erb
@@ -12,7 +12,7 @@
# Require JavaScript for responsive images.
<% case site.config['picture']['markup']
when 'picturefill'
- require_asset 'vendor/picturefill'
+ require_asset 'picturefill'
when 'interchange'
require_asset 'foundation/js/foundation/foundation.interchange'
end unless site.config['picture'].nil?
diff --git a/_assets/javascripts/vendor/picturefill.js b/_assets/javascripts/vendor/picturefill.js
deleted file mode 100644
index be55714..0000000
--- a/_assets/javascripts/vendor/picturefill.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/*! Picturefill - Responsive Images that work today. (and mimic the proposed Picture element with span elements). Author: Scott Jehl, Filament Group, 2012 | License: MIT/GPLv2 */
-
-(function( w ){
-
- // Enable strict mode
- "use strict";
-
- w.picturefill = function() {
- var ps = w.document.getElementsByTagName( "span" );
-
- // Loop the pictures
- for( var i = 0, il = ps.length; i < il; i++ ){
- if( ps[ i ].getAttribute( "data-picture" ) !== null ){
-
- var sources = ps[ i ].getElementsByTagName( "span" ),
- matches = [];
-
- // See if which sources match
- for( var j = 0, jl = sources.length; j < jl; j++ ){
- var media = sources[ j ].getAttribute( "data-media" );
- // if there's no media specified, OR w.matchMedia is supported
- if( !media || ( w.matchMedia && w.matchMedia( media ).matches ) ){
- matches.push( sources[ j ] );
- }
- }
-
- // Find any existing img element in the picture element
- var picImg = ps[ i ].getElementsByTagName( "img" )[ 0 ];
-
- if( matches.length ){
- var matchedEl = matches.pop();
- if( !picImg || picImg.parentNode.nodeName === "NOSCRIPT" ){
- picImg = w.document.createElement( "img" );
- picImg.alt = ps[ i ].getAttribute( "data-alt" );
- }
-
- picImg.src = matchedEl.getAttribute( "data-src" );
- matchedEl.appendChild( picImg );
- }
- else if( picImg ){
- picImg.parentNode.removeChild( picImg );
- }
- }
- }
- };
-
- // Run on resize and domready (w.load as a fallback)
- if( w.addEventListener ){
- w.addEventListener( "resize", w.picturefill, false );
- w.addEventListener( "DOMContentLoaded", function(){
- w.picturefill();
- // Run once only
- w.removeEventListener( "load", w.picturefill, false );
- }, false );
- w.addEventListener( "load", w.picturefill, false );
- }
- else if( w.attachEvent ){
- w.attachEvent( "onload", w.picturefill );
- }
-
-}( this ));
diff --git a/_assets/stylesheets/_settings.sass b/_assets/stylesheets/_settings.sass
index 64a21bd..94e87f0 100644
--- a/_assets/stylesheets/_settings.sass
+++ b/_assets/stylesheets/_settings.sass
@@ -399,7 +399,7 @@ $header-font-weight: 300
// $block-grid-default-spacing: rem-calc(20)
// $align-block-grid-to-grid: false
-// @if $align-block-grid-to-grid {$block-grid-default-spacing: $column-gutter;}
+// @if $align-block-grid-to-grid {$block-grid-default-spacing: $column-gutter}
// Enables media queries for block-grid classes. Set to false if writing semantic HTML.
$block-grid-media-queries: false
@@ -914,7 +914,7 @@ $block-grid-media-queries: false
// $orbit-caption-bg: rgba(51,51,51, .8)
// $orbit-caption-font-color: $white
// $orbit-caption-font-size: rem-calc(14)
-// $orbit-caption-position: "bottom"; // Supported values: "bottom", "under"
+// $orbit-caption-position: "bottom" // Supported values: "bottom", "under"
// $orbit-caption-padding: rem-calc(10 14)
// $orbit-caption-height: auto
@@ -1415,7 +1415,7 @@ $sub-nav-active-bg: $clr_waves
// $topbar-link-color-active-hover: $white
// $topbar-link-weight: $font-weight-normal
// $topbar-link-font-size: rem-calc(13)
-// $topbar-link-hover-lightness: -10%; // Darken by 10%
+// $topbar-link-hover-lightness: -10% // Darken by 10%
// $topbar-link-bg: $topbar-bg
// $topbar-link-bg-hover: $jet
// $topbar-link-bg-color-hover: $charcoal
@@ -1454,12 +1454,12 @@ $sub-nav-active-bg: $clr_waves
// $topbar-menu-icon-color: $white
// $topbar-menu-link-color-toggled: $jumbo
// $topbar-menu-icon-color-toggled: $jumbo
-// $topbar-menu-icon-position: $opposite-direction; // Change to $default-float for a left menu icon
+// $topbar-menu-icon-position: $opposite-direction // Change to $default-float for a left menu icon
// Transitions and breakpoint styles
// $topbar-transition-speed: 300ms
// Using rem-calc for the below breakpoint causes issues with top bar
-// $topbar-breakpoint: #{lower-bound($medium-range)}; // Change to 9999px for always mobile layout
+// $topbar-breakpoint: #{lower-bound($medium-range)} // Change to 9999px for always mobile layout
// $topbar-media-query: "#{$screen} and (min-width:#{lower-bound($topbar-breakpoint)})"
// Top-bar input styles
@@ -1471,8 +1471,8 @@ $sub-nav-active-bg: $clr_waves
// Sticky Class
// $topbar-sticky-class: ".sticky"
-// $topbar-arrows: true; //Set false to remove the triangle icon from the menu item
-// $topbar-dropdown-arrows: true; //Set false to remove the \00bb >> text from dropdown subnavigation li//
+// $topbar-arrows: true //Set false to remove the triangle icon from the menu item
+// $topbar-dropdown-arrows: true //Set false to remove the \00bb >> text from dropdown subnavigation li//
// 36. Visibility Classes
// - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/_assets/stylesheets/app.css.sass.erb b/_assets/stylesheets/app.css.sass.erb
index b8772b9..c800f92 100644
--- a/_assets/stylesheets/app.css.sass.erb
+++ b/_assets/stylesheets/app.css.sass.erb
@@ -4,9 +4,7 @@
// Make sure the charset is set appropriately.
@charset "UTF-8"
-//
// Fonts
-//
@import fonts
// Compass
diff --git a/_layouts/body.html b/_layouts/body.html
new file mode 100644
index 0000000..05bb951
--- /dev/null
+++ b/_layouts/body.html
@@ -0,0 +1,22 @@
+---
+layout: default
+---
+
+Evan Sosenko
+ {% include personal_links.html %}
+