Skip to content

Commit

Permalink
1. Added html5 video with flash fallback.
Browse files Browse the repository at this point in the history
2. Added Rack support
3. Disqus support
4. Improved Readme
5. Improved Syntax flexibility and styling
6. Improved blockquote styling
  • Loading branch information
imathis committed Jun 24, 2011
1 parent a128d49 commit ef3ff43
Show file tree
Hide file tree
Showing 56 changed files with 207 additions and 39 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -3,7 +3,6 @@
.sass-cache
_gist_cache
_code_cache
_assets
_deploy
public
source/_stash
Expand Down
1 change: 1 addition & 0 deletions Gemfile
@@ -1,6 +1,7 @@
source "http://rubygems.org"

gem 'rake'
gem 'rack'
gem 'jekyll'
gem 'rdiscount'
gem 'RedCloth'
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Expand Up @@ -21,6 +21,7 @@ GEM
liquid (2.2.2)
maruku (0.6.0)
syntax (>= 1.0.0)
rack (1.3.0)
rake (0.9.0)
rb-fsevent (0.4.0)
rdiscount (1.6.8)
Expand All @@ -36,6 +37,7 @@ DEPENDENCIES
compass (>= 0.11)
haml (>= 3.1)
jekyll
rack
rake
rb-fsevent
rdiscount
Expand Down
7 changes: 2 additions & 5 deletions README.markdown
Expand Up @@ -2,16 +2,14 @@
2. **Code blogging is easy and beautiful.** Embed code (with [Solarized](http://ethanschoonover.com/solarized) styling) in your posts from gists or from your filesystem.
3. **Third party integration is simple** with built-in support for Twitter, Pinboard, Delicious, Disqus Comments, and Google Analytics.
4. **It's easy to use.** A collection of rake tasks simplifies development and makes deploying a cinch.
5. **Get curated plugins.** Plugins are hand selected from the Jekyll community then tested and improved.
5. **Ships with great plugins** some original and others from the Jekyll community — tested and improved.

## Getting Started

[Create a new repository](https://github.com/repositories/new) for your website then
open up a terminal and follow along. If you plan to host your site on [Github Pages](http://pages.github.com) for a user or organization, make sure the
repository is named `your_username.github.com` or `your_organization.github.com`.

### Setting up Git

mkdir my_octopress_site
cd my_octopress_site
git init
Expand All @@ -26,8 +24,7 @@ repository is named `your_username.github.com` or `your_organization.github.com`
git push origin source


### Setting up Octopress
<span>Next</span>, setup an [RVM](http://beginrescueend.com/) and install dependencies.
Next, setup an [RVM](http://beginrescueend.com/) and install dependencies.

rvm rvmrc trust
bundle install
Expand Down
12 changes: 7 additions & 5 deletions _config.yml
Expand Up @@ -4,16 +4,18 @@ destination: public
code_dir: downloads/code
port: 4000

url: http://dev.octopress.org
title: Octopress
url: http://yoursite.com
title: My Octopress Blog
permalink: /blog/:year/:month/:day/:title
subtitle: A blogging framework for hackers.
author: Your Name
subscribe_rss: /atom.xml
subscribe_email:

markdown: rdiscount
pygments: true
posts_per_page: 10
#posts_per_page: 10
paginate: 5
recent_posts: 5
simple_search: http://google.com/search

Expand All @@ -23,15 +25,15 @@ simple_search: http://google.com/search
email:

# Twitter
twitter_user: imathis
twitter_user:
twitter_tweet_count: 4
twitter_show_replies: false
twitter_follow_button: true
twitter_show_follower_count: false
twitter_tweet_button: true

# Pinboard
#pinboard_user: imathis
pinboard_user:
pinboard_count: 3

# Delicious
Expand Down
35 changes: 35 additions & 0 deletions config.ru
@@ -0,0 +1,35 @@
require 'rubygems'
require 'bundler/setup'
require 'rack'

# The project root directory
$root = ::File.dirname(__FILE__)

# Common Rack Middleware
use Rack::ShowStatus # Nice looking 404s and other messages
use Rack::ShowExceptions # Nice looking errors

#
# From Rack::DirectoryIndex:
# https://github.com/craigmarksmith/rack-directory-index/
#
module Rack
class DirectoryIndex
def initialize(app)
@app = app
end
def call(env)
index_path = ::File.join($root, 'public', Rack::Request.new(env).path.split('/'), 'index.html')
if ::File.exists?(index_path)
return [200, {"Content-Type" => "text/html"}, [::File.read(index_path)]]
else
@app.call(env)
end
end
end
end

use Rack::DirectoryIndex

run Rack::Directory.new($root + '/public')

2 changes: 1 addition & 1 deletion themes/classic/_plugins/custom_filters.rb
Expand Up @@ -48,7 +48,7 @@ def ordinal(number)
else
case number.to_i % 10
when 1; "#{number}<span>st</span>"
when 2; "#{number}<span>nd<span>"
when 2; "#{number}<span>nd</span>"
when 3; "#{number}<span>rd</span>"
else "#{number}<span>th</span>"
end
Expand Down
6 changes: 5 additions & 1 deletion themes/classic/sass/core/_layout.scss
@@ -1,8 +1,12 @@
$max-width: 1200px !default;

// Padding used for layout margins
$pad-min: 18px !default;
$pad-narrow: 25px !default;
$pad-medium: 35px !default;
$pad-wide: 55px !default;

// Sidebar widths used in media queries
$sidebar-width-medium: 240px !default;
$sidebar-pad-medium: 15px !default;
$sidebar-pad-wide: 20px !default;
Expand All @@ -15,7 +19,7 @@ body {
max-width: $max-width;
position: relative;
margin: 0 auto;
> header, > nav, > footer, #articles > article {
> header, > nav, > footer, #articles > article, #articles > nav {
@extend .group;
padding-left: $pad-min;
padding-right: $pad-min;
Expand Down
2 changes: 1 addition & 1 deletion themes/classic/sass/core/_typography.scss
Expand Up @@ -53,7 +53,7 @@ h6, section h5, section section h4, section section section h3 {
}
p, blockquote, ul, ol { margin-bottom: 1.5em; }

ul{ list-style-type: disc; }
ul{ list-style-type: circle; }

ol{ list-style-type: decimal; ol { list-style-type: lower-alpha; } }
ul ul, ol ol { margin-left: 1.75em; }
Expand Down
11 changes: 4 additions & 7 deletions themes/classic/sass/partials/_blog.scss
Expand Up @@ -46,7 +46,6 @@ $border: inline-image('dotted-border.png');
background: $border bottom left repeat-x;
p.meta { position: static; }
}

}
h1.feature {
padding-top: .5em;
Expand All @@ -58,12 +57,15 @@ $border: inline-image('dotted-border.png');
}
.entry-content {
img, video { max-width: 100%; height: auto; }
video { display: block; margin-bottom: 1.5em;
video {
width: 100%; display: block; margin-bottom: 1.5em;
padding: .8em; background: #fff; border: 1px solid #eee;
@include box-sizing(border-box);
}
.flash-video {
max-width: 100%;
margin-bottom: 1.5em;
@include box-sizing(border-box);
padding: .8em; background: #fff; border: 1px solid #eee;
> div {
position: relative;
Expand All @@ -82,12 +84,7 @@ $border: inline-image('dotted-border.png');
}
}
}
#disqus_thread { }

iframe.twitter-share-button {
//display: block;
//margin-top: .5em;
//padding: .2em 0;
position: relative;
top: .3em;
padding-left: .5em;
Expand Down
5 changes: 0 additions & 5 deletions themes/classic/sass/partials/_page.scss
Expand Up @@ -2,7 +2,6 @@ html {
background: $page-bg inline-image('line-tile.png') top left;
}
body {
border: 0 0 1px 0 solid darken($page-bg, 5);
> div {
background-color: $sidebar-bg;
border-bottom: 1px solid $page-border-bottom;
Expand All @@ -12,7 +11,3 @@ body {
}
}
}

@media only screen and (min-width: 1400px) {
body { border: 0 1px 0 solid darken($page-bg, 5); }
}
13 changes: 7 additions & 6 deletions themes/classic/sass/partials/_syntax.scss
Expand Up @@ -51,17 +51,20 @@ html .gist .gist-file {
}
}
pre {
background: #fff;
border: 1px solid #ddd;
background: #333;
@include border-radius(.4em);
@extend .mono;
line-height: 1.45em;
font-size: .8em;
margin-bottom: 1.5em;
padding: .8em 1em;
color: #555;
color: #ccc;
overflow: auto;
}
h3.filename {
@extend .code-title;
+ pre { @include border-top-radius(0px); }
}

p code {
@extend .mono;
Expand Down Expand Up @@ -172,16 +175,14 @@ figure {
}
.highlight { margin-bottom: 0; border-bottom: 1px solid darken($base03, 2) !important; }
}
h3.filename { @extend .code-title; }
.code-title {
text-align: center;
font-size: 13px;
line-height: 2em;
text-shadow: #cbcccc 0 1px 0;
color: #474747;
font-style: normal;
font-weight: normal;
margin-bottom: 0;

@include border-top-radius(5px);
font-family: "Helvetica Neue", Arial, "Lucida Grande", "Lucida Sans Unicode", Lucida, sans-serif;
background: #aaaaaa image-url("code_bg.png") top repeat-x;
Expand Down
2 changes: 1 addition & 1 deletion themes/classic/source/_includes/disqus_thread.html
Expand Up @@ -3,7 +3,7 @@
var disqus_shortname = '{{ site.disqus_short_name }}';
var disqus_identifier = '{{ site.url }}{{ page.url }}';
var disqus_url = '{{ site.url }}{{ page.url }}';
var disqus_developer = 1;
//var disqus_developer = 1;
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
Expand Down
2 changes: 1 addition & 1 deletion themes/classic/source/_includes/head.html
Expand Up @@ -26,7 +26,7 @@
<link href="/images/favicon.png" rel="shortcut icon" />
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="/javascripts/ender.js"></script>
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
Expand Down
6 changes: 6 additions & 0 deletions themes/classic/source/_includes/post_author.html
@@ -0,0 +1,6 @@
{% if page.author %}
{% assign author = page.author %}
{% else %}
{% assign author = site.author %}
{% endif %}
{% if author %}<span class="byline author vcard">Posted by <span class="fn">{{ author }}</span></span>{% endif %}
6 changes: 6 additions & 0 deletions themes/classic/source/_includes/post_date.html
@@ -0,0 +1,6 @@
{% if page.date %}
<time datetime="{{ page.date | datetime }}" pubdate {% if page.updated %} updated {% endif %}>{{ page.date | ordinalize }}</time>
{% endif %}
{% if page.updated %}
<time class="updated" datetime="{{ page.updated | datetime }}"></time>
{% endif %}
1 change: 1 addition & 0 deletions themes/classic/source/_includes/sharing.html
@@ -0,0 +1 @@
<a href="http://twitter.com/share" class="twitter-share-button" data-url="{{ site.url }}{{ page.url }}" data-via="{{ site.twitter_user }}" data-counturl="{{ site.url }}{{ page.url }}" >Tweet</a>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ef3ff43

Please sign in to comment.