diff --git a/.gitignore b/.gitignore index eedfe7d70..a216d2989 100644 --- a/.gitignore +++ b/.gitignore @@ -9,8 +9,8 @@ acceptance_config.yml boxes/* /.vagrant -/website/docs/.vagrant -/website/www/.vagrant +/website/.vagrant +/website/build /vagrant-spec.config.rb # Bundler/Rubygems @@ -21,6 +21,7 @@ tags /Gemfile.lock test/tmp/ vendor/ +/exec # Documentation _site/* @@ -43,14 +44,3 @@ doc/ .ruby-gemset .ruby-version .rvmrc - -# Website: docs -website/docs/.sass-cache -website/docs/build -website/docs/Rakefile - -# Website: www -website/www/.sass-cache -website/www/build -website/www/Rakefile -exec/ diff --git a/website/Gemfile b/website/Gemfile new file mode 100644 index 000000000..7ef6a8f31 --- /dev/null +++ b/website/Gemfile @@ -0,0 +1,3 @@ +source "https://rubygems.org" + +gem "middleman-hashicorp", github: "hashicorp/middleman-hashicorp" diff --git a/website/Gemfile.lock b/website/Gemfile.lock new file mode 100644 index 000000000..c317c5421 --- /dev/null +++ b/website/Gemfile.lock @@ -0,0 +1,193 @@ +GIT + remote: git://github.com/hashicorp/middleman-hashicorp.git + revision: e30d05d2d3b03ed95d8a09d20c33ec32a0732b62 + specs: + middleman-hashicorp (0.2.0) + bootstrap-sass (~> 3.3) + builder (~> 3.2) + less (~> 2.6) + middleman (~> 3.4) + middleman-livereload (~> 3.4) + middleman-minify-html (~> 3.4) + middleman-syntax (~> 2.0) + rack-contrib (~> 1.2) + rack-protection (~> 1.5) + rack-rewrite (~> 1.5) + rack-ssl-enforcer (~> 0.2) + redcarpet (~> 3.2) + therubyracer (~> 0.12) + thin (~> 1.6) + +GEM + remote: https://rubygems.org/ + specs: + activesupport (4.2.5) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + autoprefixer-rails (6.3.1) + execjs + json + bootstrap-sass (3.3.6) + autoprefixer-rails (>= 5.2.1) + sass (>= 3.3.4) + builder (3.2.2) + capybara (2.4.4) + mime-types (>= 1.16) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (~> 2.0) + chunky_png (1.3.5) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.10.0) + commonjs (0.2.7) + compass (1.0.3) + chunky_png (~> 1.2) + compass-core (~> 1.0.2) + compass-import-once (~> 1.0.5) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + sass (>= 3.3.13, < 3.5) + compass-core (1.0.3) + multi_json (~> 1.0) + sass (>= 3.3.0, < 3.5) + compass-import-once (1.0.5) + sass (>= 3.2, < 3.5) + daemons (1.2.3) + em-websocket (0.5.1) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.6.0) + erubis (2.7.0) + eventmachine (1.0.9.1) + execjs (2.6.0) + ffi (1.9.10) + git-version-bump (0.15.1) + haml (4.0.7) + tilt + hike (1.2.3) + hooks (0.4.1) + uber (~> 0.0.14) + htmlcompressor (0.2.0) + http_parser.rb (0.6.0) + i18n (0.7.0) + json (1.8.3) + kramdown (1.9.0) + less (2.6.0) + commonjs (~> 0.2.7) + libv8 (3.16.14.13) + listen (3.0.5) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + middleman (3.4.1) + coffee-script (~> 2.2) + compass (>= 1.0.0, < 2.0.0) + compass-import-once (= 1.0.5) + execjs (~> 2.0) + haml (>= 4.0.5) + kramdown (~> 1.2) + middleman-core (= 3.4.1) + middleman-sprockets (>= 3.1.2) + sass (>= 3.4.0, < 4.0) + uglifier (~> 2.5) + middleman-core (3.4.1) + activesupport (~> 4.1) + bundler (~> 1.1) + capybara (~> 2.4.4) + erubis + hooks (~> 0.3) + i18n (~> 0.7.0) + listen (~> 3.0.3) + padrino-helpers (~> 0.12.3) + rack (>= 1.4.5, < 2.0) + thor (>= 0.15.2, < 2.0) + tilt (~> 1.4.1, < 2.0) + middleman-livereload (3.4.6) + em-websocket (~> 0.5.1) + middleman-core (>= 3.3) + rack-livereload (~> 0.3.15) + middleman-minify-html (3.4.1) + htmlcompressor (~> 0.2.0) + middleman-core (>= 3.2) + middleman-sprockets (3.4.2) + middleman-core (>= 3.3) + sprockets (~> 2.12.1) + sprockets-helpers (~> 1.1.0) + sprockets-sass (~> 1.3.0) + middleman-syntax (2.1.0) + middleman-core (>= 3.2) + rouge (~> 1.0) + mime-types (3.0) + mime-types-data (~> 3.2015) + mime-types-data (3.2015.1120) + mini_portile2 (2.0.0) + minitest (5.8.3) + multi_json (1.11.2) + nokogiri (1.6.7.1) + mini_portile2 (~> 2.0.0.rc2) + padrino-helpers (0.12.5) + i18n (~> 0.6, >= 0.6.7) + padrino-support (= 0.12.5) + tilt (~> 1.4.1) + padrino-support (0.12.5) + activesupport (>= 3.1) + rack (1.6.4) + rack-contrib (1.4.0) + git-version-bump (~> 0.15) + rack (~> 1.4) + rack-livereload (0.3.16) + rack + rack-protection (1.5.3) + rack + rack-rewrite (1.5.1) + rack-ssl-enforcer (0.2.9) + rack-test (0.6.3) + rack (>= 1.0) + rb-fsevent (0.9.7) + rb-inotify (0.9.5) + ffi (>= 0.5.0) + redcarpet (3.3.4) + ref (2.0.0) + rouge (1.10.1) + sass (3.4.21) + 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-sass (1.3.1) + sprockets (~> 2.0) + tilt (~> 1.1) + therubyracer (0.12.2) + libv8 (~> 3.16.14.0) + ref + thin (1.6.4) + daemons (~> 1.0, >= 1.0.9) + eventmachine (~> 1.0, >= 1.0.4) + rack (~> 1.0) + thor (0.19.1) + thread_safe (0.3.5) + tilt (1.4.1) + tzinfo (1.2.2) + thread_safe (~> 0.1) + uber (0.0.15) + uglifier (2.7.2) + execjs (>= 0.3.0) + json (>= 1.8.0) + xpath (2.0.0) + nokogiri (~> 1.3) + +PLATFORMS + ruby + +DEPENDENCIES + middleman-hashicorp! + +BUNDLED WITH + 1.10.6 diff --git a/website/docs/Makefile b/website/Makefile similarity index 100% rename from website/docs/Makefile rename to website/Makefile diff --git a/website/www/README.md b/website/README.md similarity index 84% rename from website/www/README.md rename to website/README.md index 3645fa52c..08bb0e912 100644 --- a/website/www/README.md +++ b/website/README.md @@ -4,13 +4,13 @@ This is the repository for the [Vagrant website](https://www.vagrantup.com). This is a [Middleman](http://middlemanapp.com) project, which builds a static site from these source files. The site is hosted on [Heroku](http://heroku.com) -and then fronted by [Fastly](http://fastly.com). +and then fronted by [Fastly](https://www.fastly.com). ## 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. +requests like any normal GitHub project, and we will merge it in. ## Running the Site Locally diff --git a/website/www/Vagrantfile b/website/Vagrantfile similarity index 100% rename from website/www/Vagrantfile rename to website/Vagrantfile diff --git a/website/config.rb b/website/config.rb new file mode 100644 index 000000000..122a09add --- /dev/null +++ b/website/config.rb @@ -0,0 +1,59 @@ +set :base_url, "https://www.vagrantup.com/" + +activate :hashicorp do |h| + h.name = "vagrant" + h.version = "1.8.1" + h.github_slug = "mitchellh/vagrant" +end + +helpers do + # This helps by setting the "active" class for sidebar nav elements + # if the YAML frontmatter matches the expected value. + def sidebar_current(expected) + current = current_page.data.sidebar_current || "" + if current.start_with?(expected) + return " class=\"active\"" + else + return "" + end + end + + # This returns the overall section of the documentation we're on. + def sidebar_section + current = current_page.data.sidebar_current + return "" if !current + current.split("-")[0] + end + + def body_classes + classify = ->(s) { s.downcase.gsub(/[^a-zA-Z0-9]/, "-").squeeze("-") } + + classes = [] + + if current_page.data.page_title + classes << "page-#{classify.call(current_page.data.page_title)}" + else + classes << "page-home" + end + + if current_page.data.layout + classes << "layout-#{classify.call(current_page.data.layout)}" + end + + return classes.join(" ") + end + # "home layout-#{current_page.data.layout}" + + # Get the title for the page. + # + # @param [Middleman::Page] page + # + # @return [String] + def title_for(page) + if page && page.data.page_title + return "#{page.data.page_title} - Vagrant by HashiCorp" + end + + "Vagrant by HashiCorp" + end +end diff --git a/website/docs/.buildpacks b/website/docs/.buildpacks deleted file mode 100644 index f85b304c3..000000000 --- a/website/docs/.buildpacks +++ /dev/null @@ -1,2 +0,0 @@ -https://github.com/heroku/heroku-buildpack-ruby.git -https://github.com/hashicorp/heroku-buildpack-middleman.git diff --git a/website/docs/Gemfile b/website/docs/Gemfile deleted file mode 100644 index 45b497f6b..000000000 --- a/website/docs/Gemfile +++ /dev/null @@ -1,17 +0,0 @@ -source "https://rubygems.org" - -ruby "2.2.2" - -gem "less", "~> 2.6.0" -gem "middleman", "~> 3.0.6" -gem "middleman-minify-html", "~> 3.0.0" -gem "rack-contrib", "~> 1.1.0" -gem "redcarpet", "~> 2.2.2" -gem "rb-inotify", "~> 0.9", require: false -gem "therubyracer", "~> 0.12.0" -gem "thin", "~> 1.5.0" -gem "rack-protection", "~> 1.5" - -group :development do - gem "highline", "~> 1.6.15" -end diff --git a/website/docs/Gemfile.lock b/website/docs/Gemfile.lock deleted file mode 100644 index 103f8d809..000000000 --- a/website/docs/Gemfile.lock +++ /dev/null @@ -1,148 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - activesupport (3.2.13) - i18n (= 0.6.1) - multi_json (~> 1.0) - chunky_png (1.3.4) - coffee-script (2.2.0) - coffee-script-source - execjs - coffee-script-source (1.3.3) - commonjs (0.2.7) - compass (1.0.3) - chunky_png (~> 1.2) - compass-core (~> 1.0.2) - compass-import-once (~> 1.0.5) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) - sass (>= 3.3.13, < 3.5) - compass-core (1.0.3) - multi_json (~> 1.0) - sass (>= 3.3.0, < 3.5) - compass-import-once (1.0.5) - sass (>= 3.2, < 3.5) - daemons (1.1.9) - eventmachine (1.0.7) - execjs (1.4.1) - multi_json (~> 1.0) - ffi (1.9.6) - haml (4.0.6) - tilt - highline (1.6.21) - hike (1.2.3) - htmlcompressor (0.1.2) - http_router (0.10.2) - rack (>= 1.0.0) - url_mount (~> 0.2.1) - i18n (0.6.1) - less (2.6.0) - commonjs (~> 0.2.7) - libv8 (3.16.14.7) - listen (0.7.3) - maruku (0.6.1) - syntax (>= 1.0.0) - middleman (3.0.14) - middleman-core (= 3.0.14) - middleman-more (= 3.0.14) - middleman-sprockets (~> 3.1.0) - middleman-core (3.0.14) - activesupport (~> 3.2.6) - bundler (~> 1.1) - listen (~> 0.7.3) - rack (~> 1.4.1) - rack-test (~> 0.6.1) - rb-fsevent (~> 0.9.3) - thor (~> 0.15.4) - tilt (~> 1.3.6) - middleman-minify-html (3.0.0) - htmlcompressor - middleman-core (~> 3.0.0) - middleman-more (3.0.14) - 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, < 0.6.2) - maruku (~> 0.6.0) - middleman-core (= 3.0.14) - padrino-helpers (= 0.10.7) - sass (>= 3.1.20) - uglifier (~> 1.2.6) - middleman-sprockets (3.1.4) - middleman-core (>= 3.0.14) - middleman-more (>= 3.0.14) - sprockets (~> 2.1) - sprockets-helpers (~> 1.0.0) - sprockets-sass (~> 1.0.0) - multi_json (1.10.1) - 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.5) - rack-contrib (1.1.0) - rack (>= 0.9.1) - rack-protection (1.5.3) - rack - rack-test (0.6.3) - rack (>= 1.0) - rb-fsevent (0.9.4) - rb-inotify (0.9.5) - ffi (>= 0.5.0) - redcarpet (2.2.2) - ref (1.0.5) - sass (3.4.13) - sinatra (1.3.6) - rack (~> 1.4) - rack-protection (~> 1.3) - tilt (~> 1.3, >= 1.3.3) - sprockets (2.12.3) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-helpers (1.0.1) - sprockets (~> 2.0) - sprockets-sass (1.0.3) - sprockets (~> 2.0) - tilt (~> 1.1) - syntax (1.2.0) - therubyracer (0.12.1) - libv8 (~> 3.16.14.0) - ref - thin (1.5.1) - daemons (>= 1.0.9) - eventmachine (>= 0.12.6) - rack (>= 1.0.0) - thor (0.15.4) - tilt (1.3.7) - uglifier (1.2.7) - execjs (>= 0.3.0) - multi_json (~> 1.3) - url_mount (0.2.1) - rack - -PLATFORMS - ruby - -DEPENDENCIES - highline (~> 1.6.15) - less (~> 2.6.0) - middleman (~> 3.0.6) - middleman-minify-html (~> 3.0.0) - rack-contrib (~> 1.1.0) - rack-protection (~> 1.5) - rb-inotify (~> 0.9) - redcarpet (~> 2.2.2) - therubyracer (~> 0.12.0) - thin (~> 1.5.0) - -BUNDLED WITH - 1.10.6 diff --git a/website/docs/Procfile b/website/docs/Procfile deleted file mode 100644 index 58361e473..000000000 --- a/website/docs/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: bundle exec thin start -p $PORT diff --git a/website/docs/README.md b/website/docs/README.md deleted file mode 100644 index e9ac25640..000000000 --- a/website/docs/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Vagrant Documentation - -This is the repository for the [Vagrant Documentation website](http://docs.vagrantup.com). - -This is a [Middleman](http://middlemanapp.com) project, which builds a static -site from these source files. The site is hosted on [Heroku](http://heroku.com) -and then fronted by [Fastly](http://fastly.com). - -## 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 `make dev`. - -Then open up `localhost:4567/v2`. Note that some URLs you may need to append -".html" to make them work (in the navigation and such). diff --git a/website/docs/Vagrantfile b/website/docs/Vagrantfile deleted file mode 100644 index 34e232f31..000000000 --- a/website/docs/Vagrantfile +++ /dev/null @@ -1,23 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -$script = < - - -
- -