Skip to content

Commit

Permalink
Docs cleanup
Browse files Browse the repository at this point in the history
- Reformat .html / .erb files
- Remove extra </div> in index.html.erb
- Add htmlbeautifier gem
- Add middleman-breadcrumbs
- Add make format (calls htmlbeautifier)
  • Loading branch information
cbednarski committed Jul 23, 2015
1 parent a0547ea commit 823e9e7
Show file tree
Hide file tree
Showing 13 changed files with 358 additions and 338 deletions.
2 changes: 2 additions & 0 deletions website/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ source "https://rubygems.org"
ruby "2.2.2"

gem "middleman-hashicorp", github: "hashicorp/middleman-hashicorp"
gem "middleman-breadcrumbs"
gem "htmlbeautifier"
5 changes: 5 additions & 0 deletions website/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ GEM
hitimes (1.2.2)
hooks (0.4.0)
uber (~> 0.0.4)
htmlbeautifier (1.1.0)
htmlcompressor (0.2.0)
http_parser.rb (0.6.0)
i18n (0.7.0)
Expand All @@ -92,6 +93,8 @@ GEM
middleman-sprockets (>= 3.1.2)
sass (>= 3.4.0, < 4.0)
uglifier (~> 2.5)
middleman-breadcrumbs (0.1.0)
middleman (>= 3.3.5)
middleman-core (3.3.12)
activesupport (~> 4.1.0)
bundler (~> 1.1)
Expand Down Expand Up @@ -179,4 +182,6 @@ PLATFORMS
ruby

DEPENDENCIES
htmlbeautifier
middleman-breadcrumbs
middleman-hashicorp!
4 changes: 4 additions & 0 deletions website/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ dev: init

build: init
PACKER_DISABLE_DOWNLOAD_FETCH=true PACKER_VERSION=1.0 bundle exec middleman build

format:
bundle exec htmlbeautifier -t 2 source/*.erb
bundle exec htmlbeautifier -t 2 source/layouts/*.erb
10 changes: 10 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,13 @@ make dev

Then open up `localhost:4567`. Note that some URLs you may need to append
".html" to make them work (in the navigation and such).

## Keeping Tidy

To keep the source code nicely formatted, there is a `make format` target. This
runs `htmlbeautify` and `pandoc` to reformat the source code so it's nicely formatted.

make format

Note that you will need to install pandoc yourself. `make format` will skip it
if you don't have it installed.
2 changes: 2 additions & 0 deletions website/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

set :base_url, "https://www.packer.io/"

activate :breadcrumbs

activate :hashicorp do |h|
h.version = ENV["PACKER_VERSION"]
h.bintray_enabled = ENV["BINTRAY_ENABLED"]
Expand Down
84 changes: 43 additions & 41 deletions website/source/downloads.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,49 @@ page_title: "Downloads"
---

<header class="dark-background">
<div class="container header text-center">
<h1 class="text-green">Downloads</h1>
<span class="text-green">Latest version: <%= latest_version %></span>
</div>
<div class="container header text-center">
<h1 class="text-green">Downloads</h1>
<span class="text-green">Latest version: <%= latest_version %></span>
</div>
</header>

<section class="downloads">
<div class="container">
<div class="description row">
<div class="col-md-8 col-md-offset-2">
<p>
Below are all available downloads for the latest version of Packer
(<%= latest_version %>). Please download the proper package for your
operating system and architecture. You can find SHA256 checksums
for packages <a href="https://dl.bintray.com/mitchellh/packer/packer_<%= latest_version %>_SHA256SUMS?direct">here</a>.
</p>
</div>
</div>
<% product_versions.each do |os, versions| %>
<div class="row">
<div class="col-md-8 col-md-offset-2 download">
<div class="icon pull-left"><%= system_icon(os) %></div>
<div class="details">
<h2 class="os-name"><%= os %></h2>
<ul>
<% versions.each do |url| %>
<li><a href="<%= url %>"><%= arch_for_filename(url) %></a></li>
<% end %>
</ul>
<div class="clearfix"></div>
</div>
</div>
</div>
<% end %>

<div class="row">
<div class="col-md-8 col-md-offset-2 poweredby">
<a href='http://www.bintray.com'>
<img src='https://www.bintray.com/docs/images/poweredByBintray_ColorTransparent.png'>
</a>
</div>
</div>
</div>
<div class="container">
<div class="description row">
<div class="col-md-8 col-md-offset-2">
<p>
Below are all available downloads for the latest version of Packer (
<%= latest_version %>). Please download the proper package for your operating system and architecture. You can find SHA256 checksums for packages <a href="https://dl.bintray.com/mitchellh/packer/packer_<%= latest_version %>_SHA256SUMS?direct">here</a>.
</p>
</div>
</div>
<% product_versions.each do |os, versions| %>
<div class="row">
<div class="col-md-8 col-md-offset-2 download">
<div class="icon pull-left">
<%= system_icon(os) %>
</div>
<div class="details">
<h2 class="os-name"><%= os %></h2>
<ul>
<% versions.each do |url| %>
<li>
<a href="<%= url %>">
<%= arch_for_filename(url) %>
</a>
</li>
<% end %>
</ul>
<div class="clearfix"></div>
</div>
</div>
</div>
<% end %>
<div class="row">
<div class="col-md-8 col-md-offset-2 poweredby">
<a href='http://www.bintray.com'>
<img src='https://www.bintray.com/docs/images/poweredByBintray_ColorTransparent.png'>
</a>
</div>
</div>
</div>
</section>
125 changes: 54 additions & 71 deletions website/source/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,75 +1,58 @@
---
description: |-
Packer is a free and open source tool for creating golden images for multiple platforms from a single source configuration.
description: Packer is a free and open source tool for creating golden images
for multiple platforms from a single source configuration.
---

<div class="home">

<header class="dark-background">
<div class="container hero">
<div class="row">
<div class="col-md-4 col-md-offset-1">
<h2>
<span class="text-green">Packer</span> is a tool for creating machine and container images for multiple platforms from a single source configuration.
</h2>
</div>
</div>
</div>
</header>

<section class="belt download">
<div class="container">
<div class="row download-row">
<div class="download-container">
<h2 class="uppercase"><a href="/downloads.html">Download v<%= latest_version %></a></h2>
</div>
</div>
</div>
</div>
</section>

<section class="marketting padded-lg">
<div class="container">
<div class="row">
<div class="col-md-6">
<%= image_tag 'screenshots/vmware_and_virtualbox.png', class: 'img-responsive' %>
</div>

<div class="col-md-6">
<h2 class="text-green text-center">Modern, Automated</h2>
<p>
Packer is easy to use and automates the creation of any type
of machine image. It embraces modern configuration management by
encouraging you to use automated scripts to install and
configure the software within your Packer-made images.

Packer brings machine images into the modern age, unlocking
untapped potential and opening new opportunities.
</p>
</div>
</div>
</div>
</section>

<section class="marketting padded-lg">
<div class="container">
<div class="row">
<div class="col-md-6">
<h2 class="text-green text-center">Works Great With</h2>
<p>
Out of the box Packer comes with support to build images for
Amazon EC2, DigitalOcean, Docker, Google Compute Engine, QEMU,
VirtualBox, VMware, and more. Support for
more platforms is on the way, and anyone can add new platforms
via plugins.
</p>
</div>

<div class="col-md-6">
<%= image_tag 'screenshots/works_with.png', class: 'img-responsive' %>
</div>
</div>
</div>
</section>

</div> <!-- /.home -->
<header class="dark-background">
<div class="container hero">
<div class="row">
<div class="col-md-4 col-md-offset-1">
<h2>
<span class="text-green">Packer</span> is a tool for creating machine and container images for multiple platforms from a single source configuration.
</h2>
</div>
</div>
</div>
</header>
<section class="belt download">
<div class="container">
<div class="row download-row">
<div class="download-container">
<h2 class="uppercase"><a href="/downloads.html">Download v<%= latest_version %></a></h2>
</div>
</div>
</div>
</section>
<section class="marketting padded-lg">
<div class="container">
<div class="row">
<div class="col-md-6">
<%= image_tag 'screenshots/vmware_and_virtualbox.png', class: 'img-responsive' %>
</div>
<div class="col-md-6">
<h2 class="text-green text-center">Modern, Automated</h2>
<p>
Packer is easy to use and automates the creation of any type of machine image. It embraces modern configuration management by encouraging you to use automated scripts to install and configure the software within your Packer-made images. Packer brings machine images into the modern age, unlocking untapped potential and opening new opportunities.
</p>
</div>
</div>
</div>
</section>
<section class="marketting padded-lg">
<div class="container">
<div class="row">
<div class="col-md-6">
<h2 class="text-green text-center">Works Great With</h2>
<p>
Out of the box Packer comes with support to build images for Amazon EC2, DigitalOcean, Docker, Google Compute Engine, QEMU, VirtualBox, VMware, and more. Support for more platforms is on the way, and anyone can add new platforms via plugins.
</p>
</div>
<div class="col-md-6">
<%= image_tag 'screenshots/works_with.png', class: 'img-responsive' %>
</div>
</div>
</div>
</section>
</div>
<!-- /.home -->
8 changes: 4 additions & 4 deletions website/source/layouts/community.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% wrap_layout :inner do %>
<% content_for :sidebar do %>
<h2></h2>
<% end %>
<%= yield %>
<% content_for :sidebar do %>
<h2></h2>
<% end %>
<%= yield %>
<% end %>
Loading

0 comments on commit 823e9e7

Please sign in to comment.