Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ac0d08c
Showing
57 changed files
with
2,056 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_drafts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source 'http://rubygems.org' | ||
gem 'bundler' | ||
gem 'sinatra' | ||
gem 'rack-canonical-host' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
rack (1.2.2) | ||
rack-canonical-host (0.0.3) | ||
rack (>= 1.0.0) | ||
sinatra (1.2.7) | ||
rack (~> 1.1) | ||
tilt (>= 1.2.2, < 2.0) | ||
tilt (1.3.3) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
bundler | ||
rack-canonical-host | ||
sinatra |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright (c) 2012, Worldly Wisdom Ventures LLC. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
heroku-jekyll-blog | ||
================== | ||
|
||
This repo contains a template for an SEO-friendly two-column blog-style website using the jekyll static website generator. The template is ready for customization and deployment on Heroku's Bamboo stack. | ||
|
||
Setup Instructions | ||
------------------ | ||
|
||
Clone the repo: | ||
|
||
$ git clone git@github.com:eurekaoverdrive/heroku-jekyll-blog.git | ||
|
||
Install all required Gems | ||
|
||
$ bundle install | ||
|
||
Edit <code>_config.yml</code>, content pages, layouts, includes, and <code>application.rb</code> settings as desired. | ||
|
||
|
||
Deploy to Heroku | ||
---------------- | ||
|
||
Add all files to a new Git repo: | ||
|
||
$ git init . | ||
|
||
$ git add -A | ||
|
||
$ git commit -m "Initial commit" | ||
|
||
Create a new Heroku application: | ||
|
||
$ heroku create yourappname | ||
|
||
Push the master Git branch to Heroku: | ||
|
||
$ git push heroku master | ||
|
||
Open your new Codex: | ||
|
||
$ heroku open | ||
|
||
Rake Utilities | ||
-------------- | ||
|
||
The included Rakefile includes several commands that make life easier: | ||
|
||
**Create a draft post:** | ||
|
||
$ rake draft["Post Title"] | ||
|
||
When you're ready to publish, move the file into the "_posts" folder. | ||
|
||
**Preview the website locally on your computer:** | ||
|
||
$ rake draft["Post Title"] | ||
|
||
This command runs <code>jekyll --server --auto</code>, which allows you to preview the site at http://localhost:5000. | ||
|
||
**Compile and commit the latest changes:** | ||
|
||
$ rake generate | ||
|
||
This command runs <code>jekyll</code>, <code>git add -A</code>, and <code>git commit -m "Committing latest jekyll build"</code>. | ||
|
||
**Push the compiled site to Heroku:** | ||
|
||
$ rake deploy | ||
|
||
This command runs <code>git push heroku master</code>, which will publish the site. | ||
|
||
Enjoy! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
desc 'Running Jekyll with --server --auto option' | ||
task :dev do | ||
system('jekyll --server --auto') | ||
end | ||
|
||
desc 'Rebuild site with Jekyll' | ||
task :generate do | ||
system('jekyll') | ||
system('git add -A') | ||
system('git commit -m "Committing latest jekyll build"') | ||
end | ||
|
||
desc 'Deploy to Heroku' | ||
task :deploy do | ||
system('git push heroku master') | ||
end | ||
|
||
desc "Given the arguments, create a new post file in _drafts" | ||
task :draft, [:title] do |t, args| | ||
filename = "#{Time.now.strftime('%Y-%m-%d')}-#{args.title.gsub(/\&/, '').gsub(/\s/, '-').gsub(/---/, '-').gsub(/--/, '-').downcase}.md" | ||
path = File.join("_drafts", filename) | ||
if File.exist? path; raise RuntimeError.new("FILE EXISTS at #{path}"); end | ||
File.open(path, 'w') do |file| | ||
file.write <<-EOS | ||
--- | ||
layout: post | ||
title: #{args.title.sub(/[&]/, 'and')} | ||
permalink: /#{args.title.gsub(/\&/, '').gsub(/\s/, '-').gsub(/---/, '-').gsub(/--/, '-').downcase}/ | ||
category: blog | ||
date: #{Time.now.strftime('%Y-%m-%d %k:%M:%S')} | ||
published: true | ||
--- | ||
Body Text | ||
EOS | ||
end | ||
puts "Here's the path to your draft: #{path}" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
markdown: rdiscount | ||
pygments: no | ||
permalink: /:title/ | ||
|
||
source: . | ||
destination: ./_site | ||
includes: ./_includes | ||
plugins: ./_plugins | ||
|
||
base_url: / | ||
main_title: "Title" | ||
main_description: "Description" | ||
main_keywords: "Keyword" | ||
author: "Author" | ||
copyright: "20XX" | ||
|
||
exclude: ['application.rb', 'config.ru', 'Rakefile', 'Gemfile', 'Gemfile.lock', 'public', 'tmp'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div id="footer"> | ||
<center> | ||
<p>Copyright © {{ site.copyright }}, {{ site.author }}. All Rights Reserved. <br/><a href="/privacy/">Privacy Policy</a>. <a href="/disclosures/">Disclosures</a>. <a href="/sitemap.xml">Sitemap</a>. <a href="/contact/">Contact</a>.</p> | ||
</center> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div class="title"> | ||
<a href="/">{{ site.main_title }}</a> | ||
<a class="extra" href="/about/">about</a> | ||
<a class="extra" href="/contact/">contact</a> | ||
<a class="cta" href="/blog/">blog</a> | ||
<a class="extra" href="/feed/"><img src="/images/rss.png" border="0" align="right"></a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>Copyright © {{ site.copyright }}, {{ site.author }}. All Rights Reserved.</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<div id="sidebar"> | ||
<h2>This is the sidebar.</h2> | ||
<p>Add some text!</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div id="topbar"> | ||
Put a call-to-action here! <a href="#" target="_blank">Read more...</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
<div id="home"> | ||
<h1>{{ page.title }}</h1> | ||
<h5 class="byline">By <a href="/about/">{{ site.author }}</a></h5> | ||
{{ content }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
<title>{{ page.title }}</title> | ||
<meta name="author" content="{{ site.author }}" /> | ||
{% if page.description %}<meta name="description" content="{{page.description}}" />{% else %}<meta name="description" content="{{site.main_description}}" />{% endif %} | ||
{% if page.kewords %}<meta name="keywords" content="{{page.keywords | join: ','}}" />{% else %}<meta name="keywords" content="{{site.main_keywords | join: ','}}" />{% endif %} | ||
<link rel="canonical" href="{{ site.base_url }}{{ page.url | canonical_url }}" /> | ||
<meta name="robots" content="noodp, noydir" /> | ||
<link href="{{ site.base_url }}/feed/" rel="alternate" title="RSS Title" type="application/atom+xml" /> | ||
<link rel="stylesheet" href="/css/style.css" type="text/css" media="screen, projection" /> | ||
</head> | ||
<body> | ||
{% include topbar.html %} | ||
<div class="site"> | ||
{% include nav.html %} | ||
<div class="wrapper"> | ||
<div id="content"> | ||
{{ content }} | ||
</div> | ||
<div id="sidebar"> | ||
{% include sidebar.html %} | ||
</div> | ||
</div> | ||
{% include footer.html %} | ||
</div> | ||
</div> | ||
|
||
<!-- Insert jQuery CSS classes --> | ||
<script type="text/javascript"> | ||
/* <![CDATA[ */ | ||
$(document).ready(function() { | ||
$('.external').attr('target', '_blank'); | ||
$('#booklist ul').addClass('post-list'); | ||
}); | ||
/* ]]> */ | ||
</script> | ||
|
||
<!-- Add analytics scripts here... --> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
<div id="post"> | ||
<h1>{{ page.title }}</h1> | ||
<h5 class="byline">By <a href="/about/">{{ site.author }}</a></h5> | ||
{{ content }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
<div id="post"> | ||
<h1>{{ page.title }}</h1> | ||
<h5 class="byline">{{ page.date | date: "%d %B %Y" }}</h5> | ||
{{ content }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module CanonicalFilter | ||
|
||
def canonical_url(arg) | ||
arg.gsub("/index.html","") | ||
end | ||
end | ||
|
||
Liquid::Template.register_filter(CanonicalFilter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
layout: post | ||
title: Blog Post 2010 | ||
permalink: /blog-post-2010/ | ||
category: blog | ||
date: 2010-04-06 14:26:14 | ||
published: true | ||
--- | ||
|
||
This is a blog post. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
layout: post | ||
title: Blog Post 2011 | ||
permalink: /blog-post-2011/ | ||
category: blog | ||
date: 2011-04-06 14:26:14 | ||
published: true | ||
--- | ||
|
||
This is a blog post. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
layout: post | ||
title: Blog Post 2012 | ||
permalink: /blog-post-2012/ | ||
category: blog | ||
date: 2012-04-06 14:26:14 | ||
published: true | ||
--- | ||
|
||
This is a blog post. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
<title>About</title> | ||
<meta name="author" content="Author" /> | ||
<meta name="description" content="Description" /> | ||
<meta name="keywords" content="Keyword" /> | ||
<link rel="canonical" href="//about/" /> | ||
<meta name="robots" content="noodp, noydir" /> | ||
<link href="//feed/" rel="alternate" title="RSS Title" type="application/atom+xml" /> | ||
<link rel="stylesheet" href="/css/style.css" type="text/css" media="screen, projection" /> | ||
</head> | ||
<body> | ||
<div id="topbar"> | ||
Put a call-to-action here! <a href="#" target="_blank">Read more...</a> | ||
</div> | ||
<div class="site"> | ||
<div class="title"> | ||
<a href="/">Title</a> | ||
<a class="extra" href="/about/">about</a> | ||
<a class="extra" href="/contact/">contact</a> | ||
<a class="cta" href="/blog/">blog</a> | ||
<a class="extra" href="/feed/"><img src="/images/rss.png" border="0" align="right"></a> | ||
</div> | ||
<div class="wrapper"> | ||
<div id="content"> | ||
<div id="post"> | ||
<h1>About</h1> | ||
<h5 class="byline">By <a href="/about/">Author</a></h5> | ||
<p>This is the about page.</p> | ||
|
||
</div> | ||
</div> | ||
<div id="sidebar"> | ||
<div id="sidebar"> | ||
<h2>This is the sidebar.</h2> | ||
<p>Add some text!</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div id="footer"> | ||
<center> | ||
<p>Copyright © 20XX, Author. All Rights Reserved. <br/><a href="/privacy/">Privacy Policy</a>. <a href="/disclosures/">Disclosures</a>. <a href="/sitemap.xml">Sitemap</a>. <a href="/contact/">Contact</a>.</p> | ||
</center> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- Insert jQuery CSS classes --> | ||
<script type="text/javascript"> | ||
/* <![CDATA[ */ | ||
$(document).ready(function() { | ||
$('.external').attr('target', '_blank'); | ||
$('#booklist ul').addClass('post-list'); | ||
}); | ||
/* ]]> */ | ||
</script> | ||
|
||
<!-- Add analytics scripts here... --> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.