diff --git a/.gitignore b/.gitignore index f944301cd7b..4ad0499548b 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,7 @@ docs/v3/node_modules docs/v3/node_modules/**/* docs/v3/source/version docs/v3/.rakeTasks +docs/v3/.sass-cache # YARD artifacts docs/v3/.yardoc diff --git a/docs/v3/Gemfile b/docs/v3/Gemfile index 1a81fc08064..0fda8cf550e 100644 --- a/docs/v3/Gemfile +++ b/docs/v3/Gemfile @@ -1,13 +1,15 @@ source 'http://rubygems.org' gem 'json', '>= 2.3.0' -gem 'middleman', '>= 3.4.1' -gem 'middleman-autoprefixer', '>= 2.6.1' +gem 'middleman', '~> 4.3' +gem 'middleman-syntax', '~> 3.2' +gem 'middleman-autoprefixer', '~> 2.7' +gem 'middleman-sprockets', '~> 4.1' gem 'middleman-gh-pages', '>= 0.0.3' gem 'middleman-livereload', '>= 3.4.6' -gem 'middleman-syntax', '>= 2.0.0' gem 'mini_racer' -gem 'nokogiri' +gem 'nokogiri', '~> 1.10.8' gem 'rake', '>= 12.3.3' -gem 'redcarpet' -gem 'rouge' +gem 'redcarpet', '~> 3.5.0' +gem 'rouge', '~> 3.21' +gem 'sass' diff --git a/docs/v3/Gemfile.lock b/docs/v3/Gemfile.lock index 8c319773238..40b46cf67e1 100644 --- a/docs/v3/Gemfile.lock +++ b/docs/v3/Gemfile.lock @@ -1,163 +1,156 @@ GEM remote: http://rubygems.org/ specs: - activesupport (4.2.11.1) - i18n (~> 0.7) + activesupport (5.2.4.4) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - autoprefixer-rails (9.7.4) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + autoprefixer-rails (9.8.6.5) execjs - 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.11) + backports (3.18.2) coffee-script (2.4.1) coffee-script-source execjs coffee-script-source (1.12.2) - 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) - em-websocket (0.5.1) + concurrent-ruby (1.1.7) + contracts (0.13.0) + dotenv (2.7.6) + em-websocket (0.5.2) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) erubis (2.7.0) eventmachine (1.2.7) execjs (2.7.0) - ffi (1.12.2) - haml (5.1.2) + fast_blank (1.0.0) + fastimage (2.2.0) + ffi (1.13.1) + haml (5.2.0) temple (>= 0.8.0) tilt - hike (1.2.3) - hooks (0.4.1) - uber (~> 0.0.14) + hamster (3.0.0) + concurrent-ruby (~> 1.0) + hashie (3.6.0) http_parser.rb (0.6.0) - i18n (0.7.0) + i18n (0.9.5) + concurrent-ruby (~> 1.0) json (2.3.1) - kramdown (1.17.0) + kramdown (2.3.0) + rexml libv8 (8.4.255.0) listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - middleman (3.4.1) + memoist (0.16.2) + middleman (4.3.11) 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) + kramdown (>= 2.3.0) + middleman-cli (= 4.3.11) + middleman-core (= 4.3.11) middleman-autoprefixer (2.10.1) autoprefixer-rails (~> 9.1) middleman-core (>= 3.3.3) - middleman-core (3.4.1) - activesupport (~> 4.1) - bundler (~> 1.1) - capybara (~> 2.4.4) + middleman-cli (4.3.11) + thor (>= 0.17.0, < 2.0) + middleman-core (4.3.11) + activesupport (>= 4.2, < 6.0) + addressable (~> 2.3) + backports (~> 3.6) + bundler + contracts (~> 0.13.0) + dotenv 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) + execjs (~> 2.0) + fast_blank + fastimage (~> 2.0) + hamster (~> 3.0) + hashie (~> 3.4) + i18n (~> 0.9.0) + listen (~> 3.0.0) + memoist (~> 0.14) + padrino-helpers (~> 0.13.0) + parallel + rack (>= 1.4.5, < 3) + sassc (~> 2.0) + servolux + tilt (~> 2.0.9) + uglifier (~> 3.0) middleman-gh-pages (0.4.1) rake (> 0.9.3) middleman-livereload (3.4.6) em-websocket (~> 0.5.1) middleman-core (>= 3.3) rack-livereload (~> 0.3.15) - middleman-sprockets (3.5.0) - middleman-core (>= 3.3) - sprockets (~> 2.12.1) - sprockets-helpers (~> 1.1.0) - sprockets-sass (~> 1.3.0) - middleman-syntax (2.0.0) - middleman-core (~> 3.2) - rouge (~> 1.0) - mime-types (3.3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2019.1009) + middleman-sprockets (4.1.1) + middleman-core (~> 4.0) + sprockets (>= 3.0) + middleman-syntax (3.2.0) + middleman-core (>= 3.2) + rouge (~> 3.2) mini_portile2 (2.4.0) mini_racer (0.3.1) libv8 (~> 8.4.255) - minitest (5.14.0) - multi_json (1.14.1) + minitest (5.14.2) nokogiri (1.10.10) mini_portile2 (~> 2.4.0) - padrino-helpers (0.12.9) + padrino-helpers (0.13.3.4) i18n (~> 0.6, >= 0.6.7) - padrino-support (= 0.12.9) + padrino-support (= 0.13.3.4) tilt (>= 1.4.1, < 3) - padrino-support (0.12.9) + padrino-support (0.13.3.4) activesupport (>= 3.1) - rack (1.6.13) + parallel (1.19.2) + public_suffix (4.0.6) + rack (2.2.3) rack-livereload (0.3.17) rack - rack-test (1.1.0) - rack (>= 1.0, < 3) rake (13.0.1) - rb-fsevent (0.10.3) + rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) redcarpet (3.5.0) - rouge (1.11.1) - sass (3.4.25) - sprockets (2.12.5) - 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) + rexml (3.2.4) + rouge (3.24.0) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sassc (2.4.0) + ffi (~> 1.9) + servolux (0.13.0) + sprockets (3.7.2) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) temple (0.8.2) thor (1.0.1) thread_safe (0.3.6) - tilt (1.4.1) - tzinfo (1.2.6) + tilt (2.0.10) + tzinfo (1.2.7) thread_safe (~> 0.1) - uber (0.0.15) - uglifier (2.7.2) - execjs (>= 0.3.0) - json (>= 1.8.0) - xpath (2.1.0) - nokogiri (~> 1.3) + uglifier (3.2.0) + execjs (>= 0.3.0, < 3) PLATFORMS ruby DEPENDENCIES json (>= 2.3.0) - middleman (>= 3.4.1) - middleman-autoprefixer (>= 2.6.1) + middleman (~> 4.3) + middleman-autoprefixer (~> 2.7) middleman-gh-pages (>= 0.0.3) middleman-livereload (>= 3.4.6) - middleman-syntax (>= 2.0.0) + middleman-sprockets (~> 4.1) + middleman-syntax (~> 3.2) mini_racer - nokogiri + nokogiri (~> 1.10.8) rake (>= 12.3.3) - redcarpet - rouge + redcarpet (~> 3.5.0) + rouge (~> 3.21) + sass BUNDLED WITH 1.17.3 diff --git a/docs/v3/config.rb b/docs/v3/config.rb index 4a9c702d77a..6ca7f265c52 100644 --- a/docs/v3/config.rb +++ b/docs/v3/config.rb @@ -15,21 +15,25 @@ set :images_dir, 'images' set :fonts_dir, 'fonts' +ignore 'includes/api_resources/examples/*.json' + # Activate the syntax highlighter activate :syntax +activate :sprockets + +activate :autoprefixer do |config| + config.browsers = ['last 2 version', 'Firefox ESR'] + config.cascade = false + config.inline = true +end + # Github pages require relative links activate :relative_assets set :relative_links, true # Build Configuration configure :build do - activate :autoprefixer do |config| - config.browsers = ['last 2 version', 'Firefox ESR'] - config.cascade = false - config.inline = true - end - activate :minify_css activate :minify_javascript # activate :relative_assets diff --git a/docs/v3/source/includes/api_resources/_security_groups.erb b/docs/v3/source/includes/api_resources/_security_groups.erb index 92c83343f40..a4a7b388e13 100644 --- a/docs/v3/source/includes/api_resources/_security_groups.erb +++ b/docs/v3/source/includes/api_resources/_security_groups.erb @@ -41,12 +41,12 @@ } <% end %> -<% content_for :paginated_security_group, File.read(__dir__ + '/examples/security_group_paginated.json') %> +<% content_for :paginated_security_group, File.read('source/includes/api_resources/examples/security_group_paginated.json') %> -<% content_for :paginated_running_space_security_group, File.read(__dir__ + '/examples/space_running_security_group_paginated.json') %> +<% content_for :paginated_running_space_security_group, File.read('source/includes/api_resources/examples/space_running_security_group_paginated.json') %> -<% content_for :paginated_staging_space_security_group, File.read(__dir__ + '/examples/space_staging_security_group_paginated.json') %> +<% content_for :paginated_staging_space_security_group, File.read('source/includes/api_resources/examples/space_staging_security_group_paginated.json') %> -<% content_for :running_security_group_spaces, File.read(__dir__ + '/examples/running_security_group_spaces.json') %> +<% content_for :running_security_group_spaces, File.read('source/includes/api_resources/examples/running_security_group_spaces.json') %> -<% content_for :staging_security_group_spaces, File.read(__dir__ + '/examples/staging_security_group_spaces.json') %> +<% content_for :staging_security_group_spaces, File.read('source/includes/api_resources/examples/staging_security_group_spaces.json') %> diff --git a/docs/v3/source/index.md b/docs/v3/source/index.html.md similarity index 100% rename from docs/v3/source/index.md rename to docs/v3/source/index.html.md diff --git a/docs/v3/source/layouts/layout.erb b/docs/v3/source/layouts/layout.erb index 5435ab65c81..8cccc4c97ca 100644 --- a/docs/v3/source/layouts/layout.erb +++ b/docs/v3/source/layouts/layout.erb @@ -33,6 +33,9 @@ table_of_contents = extract_table_of_contents(html) <%= stylesheet_link_tag :screen, media: :screen %> <%= stylesheet_link_tag :print, media: :print %> + <%= javascript_include_tag "all" %> diff --git a/docs/v3/source/stylesheets/_normalize.css b/docs/v3/source/stylesheets/_normalize.scss similarity index 100% rename from docs/v3/source/stylesheets/_normalize.css rename to docs/v3/source/stylesheets/_normalize.scss diff --git a/docs/v3/source/stylesheets/_syntax.scss.erb b/docs/v3/source/stylesheets/_syntax.scss.erb deleted file mode 100644 index 5a32614de03..00000000000 --- a/docs/v3/source/stylesheets/_syntax.scss.erb +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2008-2013 Concur Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may -not use this file except in compliance with the License. You may obtain -a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -License for the specific language governing permissions and limitations -under the License. -*/ - -@import 'variables'; - -<%= Rouge::Themes::Base16::Monokai.render(:scope => '.highlight') %> - -.highlight .c, .highlight .cm, .highlight .c1, .highlight .cs { - color: #909090; -} - -.highlight, .highlight .w { - background-color: $code-background-color; -} diff --git a/docs/v3/source/stylesheets/print.css.scss b/docs/v3/source/stylesheets/print.css.scss index 4cb99485022..140789a38e5 100644 --- a/docs/v3/source/stylesheets/print.css.scss +++ b/docs/v3/source/stylesheets/print.css.scss @@ -1,6 +1,5 @@ @charset "utf-8"; @import 'normalize'; -@import 'compass'; @import 'variables'; @import 'icon-font'; diff --git a/docs/v3/source/stylesheets/screen.css.scss b/docs/v3/source/stylesheets/screen.css.scss index 5c8b4c646f9..ef93b360cda 100644 --- a/docs/v3/source/stylesheets/screen.css.scss +++ b/docs/v3/source/stylesheets/screen.css.scss @@ -1,8 +1,6 @@ @charset "utf-8"; @import 'normalize'; -@import 'compass'; @import 'variables'; -@import 'syntax'; @import 'icon-font'; @import 'version-dropdown'; @@ -602,3 +600,11 @@ nav { margin-top: $main-padding; } } + +.highlight .c, .highlight .cm, .highlight .c1, .highlight .cs { + color: #909090; +} + +.highlight, .highlight .w { + background-color: $code-background-color; +}