Skip to content

Commit

Permalink
Initial website commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Jun 8, 2013
1 parent 8641215 commit 90b057c
Show file tree
Hide file tree
Showing 13 changed files with 341 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/bin
/local
/website/build
packerrc
13 changes: 13 additions & 0 deletions website/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
source 'https://rubygems.org'

gem "less", "~> 2.2.2"
gem "middleman", "~> 3.0.6"
gem "middleman-minify-html", "~> 3.0.0"
gem "rack-contrib", "~> 1.1.0"
gem "redcarpet", "~> 2.2.2"
gem "therubyracer", "~> 0.10.2"
gem "thin", "~> 1.5.0"

group :development do
gem "highline", "~> 1.6.15"
end
138 changes: 138 additions & 0 deletions website/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
GEM
remote: https://rubygems.org/
specs:
POpen4 (0.1.4)
Platform (>= 0.4.0)
open4
Platform (0.4.0)
activesupport (3.2.9)
i18n (~> 0.6)
multi_json (~> 1.0)
chunky_png (1.2.6)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.3.3)
commonjs (0.2.6)
compass (0.12.2)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.1)
daemons (1.1.9)
eventmachine (1.0.0)
execjs (1.4.0)
multi_json (~> 1.0)
ffi (1.2.0)
fssm (0.2.9)
haml (3.1.7)
highline (1.6.15)
hike (1.2.1)
htmlcompressor (0.0.3)
yui-compressor (~> 0.9.6)
http_router (0.10.2)
rack (>= 1.0.0)
url_mount (~> 0.2.1)
i18n (0.6.1)
less (2.2.2)
commonjs (~> 0.2.6)
libv8 (3.3.10.4)
listen (0.5.3)
maruku (0.6.1)
syntax (>= 1.0.0)
middleman (3.0.6)
middleman-core (= 3.0.6)
middleman-more (= 3.0.6)
middleman-sprockets (~> 3.0.2)
middleman-core (3.0.6)
activesupport (~> 3.2.6)
bundler (~> 1.1)
listen (~> 0.5.2)
rack (~> 1.4.1)
rack-test (~> 0.6.1)
rb-fsevent (~> 0.9.1)
rb-inotify (~> 0.8.8)
thor (~> 0.15.4)
tilt (~> 1.3.1)
middleman-minify-html (3.0.0)
htmlcompressor
middleman-core (~> 3.0.0)
middleman-more (3.0.6)
coffee-script (~> 2.2.0)
coffee-script-source (~> 1.3.3)
compass (>= 0.12.2)
execjs (~> 1.4.0)
haml (>= 3.1.6)
i18n (~> 0.6.0)
maruku (~> 0.6.0)
middleman-core (= 3.0.6)
padrino-helpers (= 0.10.7)
sass (>= 3.1.20)
uglifier (~> 1.2.6)
middleman-sprockets (3.0.4)
middleman-more (~> 3.0.1)
sprockets (~> 2.1, < 2.5)
sprockets-sass (~> 0.8.0)
multi_json (1.4.0)
open4 (1.3.0)
padrino-core (0.10.7)
activesupport (~> 3.2.0)
http_router (~> 0.10.2)
sinatra (~> 1.3.1)
thor (~> 0.15.2)
tilt (~> 1.3.0)
padrino-helpers (0.10.7)
i18n (~> 0.6)
padrino-core (= 0.10.7)
rack (1.4.1)
rack-contrib (1.1.0)
rack (>= 0.9.1)
rack-protection (1.2.0)
rack
rack-test (0.6.2)
rack (>= 1.0)
rb-fsevent (0.9.2)
rb-inotify (0.8.8)
ffi (>= 0.5.0)
redcarpet (2.2.2)
sass (3.2.3)
sinatra (1.3.3)
rack (~> 1.3, >= 1.3.6)
rack-protection (~> 1.2)
tilt (~> 1.3, >= 1.3.3)
sprockets (2.4.5)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-sass (0.8.0)
sprockets (~> 2.0)
tilt (~> 1.1)
syntax (1.0.0)
therubyracer (0.10.2)
libv8 (~> 3.3.10)
thin (1.5.0)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.15.4)
tilt (1.3.3)
uglifier (1.2.7)
execjs (>= 0.3.0)
multi_json (~> 1.3)
url_mount (0.2.1)
rack
yui-compressor (0.9.6)
POpen4 (>= 0.1.4)

PLATFORMS
ruby

DEPENDENCIES
highline (~> 1.6.15)
less (~> 2.2.2)
middleman (~> 3.0.6)
middleman-minify-html (~> 3.0.0)
rack-contrib (~> 1.1.0)
redcarpet (~> 2.2.2)
therubyracer (~> 0.10.2)
thin (~> 1.5.0)
1 change: 1 addition & 0 deletions website/Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: bundle exec thin start -p $PORT
25 changes: 25 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Packer Website

This subdirectory contains the entire source for the [Packer website](http://www.packer.io).
T
This is a [Middleman](http://middlemanapp.com) project, which builds a static
site from these source files.

## Contributions Welcome!

If you find a typo or you feel like you can improve the HTML, CSS, or
JavaScript, we welcome contributions. Feel free to open issues or pull
requests like any normal GitHub project, and we'll merge it in.

## Running the Site Locally

Running the site locally is simple. Clone this repo and run the following
commands:

```
$ bundle
$ bundle exec middleman server
```

Then open up `localhost:4567`. Note that some URLs you may need to append
".html" to make them work (in the navigation and such).
15 changes: 15 additions & 0 deletions website/config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
set :css_dir, 'stylesheets'
set :js_dir, 'javascripts'
set :images_dir, 'images'

# Use the RedCarpet Markdown engine
set :markdown_engine, :redcarpet
set :markdown, :fenced_code_blocks => true

# Build-specific configuration
configure :build do
activate :asset_hash
activate :minify_css
activate :minify_html
activate :minify_javascript
end
30 changes: 30 additions & 0 deletions website/config.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
require "rack"
require "rack/contrib/not_found"
require "rack/contrib/response_headers"
require "rack/contrib/static_cache"
require "rack/contrib/try_static"

# Properly compress the output if the client can handle it.
use Rack::Deflater

# Redirect the legacy URLs that point to www.vagrantup.com
use HashiCorp::Rack::LegacyRedirect

# Set the "forever expire" cache headers for these static assets. Since
# we hash the contents of the assets to determine filenames, this is safe
# to do.
use Rack::StaticCache,
:root => "build",
:urls => ["/images", "/javascripts", "/stylesheets"],
:duration => 2,
:versioning => false

# Try to find a static file that matches our request, since Middleman
# statically generates everything.
use Rack::TryStatic,
:root => "build",
:urls => ["/"],
:try => [".html", "index.html", "/index.html"]

# 404 if we reached this point. Sad times.
run Rack::NotFound.new(File.expand_path("../build/404.html", __FILE__))
5 changes: 5 additions & 0 deletions website/source/404.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: "inner"
---

<h2>Page Not Found</h2>
5 changes: 5 additions & 0 deletions website/source/docs/index.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: "docs"
---

# Hello
3 changes: 3 additions & 0 deletions website/source/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<h1>Packer</h1>

Coming soon. <a href="/docs">Docs</a>
59 changes: 59 additions & 0 deletions website/source/layouts/docs.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Packer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

<!-- Le styles -->
<%= stylesheet_link_tag "bootstrap.min" %>
<style type="text/css">
body {
padding-top: 20px;
padding-bottom: 40px;
}
</style>
</head>

<body>

<div class="container">
<div class="row">
<div class="span3">
<div class="well sidebar-nav" style="padding: 8px 0;">
<ul class="nav nav-list">
<li class="nav-header">Sidebar</li>
<li class="active"><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li class="nav-header">Sidebar</li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li class="nav-header">Sidebar</li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</div><!--/.well -->
</div><!--/span-->
<div class="span9">
<%= yield %>
</div><!--/span-->
</div><!--/row-->

<hr>

<footer>
<p>&copy; Mitchell Hashimoto 2013</p>
</footer>
</div><!--/.fluid-container-->
</body>
</html>

37 changes: 37 additions & 0 deletions website/source/layouts/layout.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Packer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">

<!-- Le styles -->
<%= stylesheet_link_tag "bootstrap.min" %>
<style type="text/css">
body {
padding-top: 20px;
padding-bottom: 40px;
}
</style>
</head>

<body>

<div class="container">
<div class="row">
<div class="span12">
<%= yield %>
</div><!--/span-->
</div><!--/row-->

<hr>

<footer>
<p>&copy; Mitchell Hashimoto 2013</p>
</footer>
</div><!--/.fluid-container-->
</body>
</html>

9 changes: 9 additions & 0 deletions website/source/stylesheets/bootstrap.min.css

Large diffs are not rendered by default.

0 comments on commit 90b057c

Please sign in to comment.