From 3c1f93efd20d1b1f832103b6ce1fd5bcb8762e57 Mon Sep 17 00:00:00 2001 From: Baptiste Gelez Date: Sat, 8 Dec 2018 11:55:08 +0100 Subject: [PATCH] Move the docs to a middleman website --- .gitignore | 5 + Gemfile | 6 + Gemfile.lock | 110 ++++++++++++++++++ config.rb | 46 ++++++++ API.md => source/API.md | 0 CLI.md => source/CLI.md | 0 DEVELOPMENT.md => source/DEVELOPMENT.md | 0 ENV-VARS.md => source/ENV-VARS.md | 0 FEDERATION.md => source/FEDERATION.md | 0 INSTALL.md => source/INSTALL.md | 0 .../INTERNATIONALIZATION.md | 0 README.md => source/README.md | 0 UPDATE.md => source/UPDATE.md | 0 api.yaml => source/api.yaml | 0 .../docker-compose.sample.yml | 0 docker.sample.env => source/docker.sample.env | 0 source/images/.keep | 0 source/index.html.erb | 23 ++++ source/javascripts/site.js | 1 + source/layouts/layout.erb | 16 +++ source/stylesheets/site.css.scss | 24 ++++ 21 files changed, 231 insertions(+) create mode 100644 .gitignore create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 config.rb rename API.md => source/API.md (100%) rename CLI.md => source/CLI.md (100%) rename DEVELOPMENT.md => source/DEVELOPMENT.md (100%) rename ENV-VARS.md => source/ENV-VARS.md (100%) rename FEDERATION.md => source/FEDERATION.md (100%) rename INSTALL.md => source/INSTALL.md (100%) rename INTERNATIONALIZATION.md => source/INTERNATIONALIZATION.md (100%) rename README.md => source/README.md (100%) rename UPDATE.md => source/UPDATE.md (100%) rename api.yaml => source/api.yaml (100%) rename docker-compose.sample.yml => source/docker-compose.sample.yml (100%) rename docker.sample.env => source/docker.sample.env (100%) create mode 100644 source/images/.keep create mode 100644 source/index.html.erb create mode 100644 source/javascripts/site.js create mode 100644 source/layouts/layout.erb create mode 100644 source/stylesheets/site.css.scss diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0dcc3ec --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.bundle +.cache +.DS_Store +.sass-cache +build/ diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..180cfa2 --- /dev/null +++ b/Gemfile @@ -0,0 +1,6 @@ +source 'https://rubygems.org' + +gem 'middleman', '~> 4.2' +gem 'middleman-autoprefixer', '~> 2.7' +gem 'tzinfo-data', platforms: [:mswin, :mingw, :jruby] +gem 'wdm', '~> 0.1', platforms: [:mswin, :mingw] diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..fdea7da --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,110 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (5.0.7.1) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) + autoprefixer-rails (8.6.5) + execjs + backports (3.11.4) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.12.2) + compass-import-once (1.0.5) + sass (>= 3.2, < 3.5) + concurrent-ruby (1.1.3) + contracts (0.13.0) + dotenv (2.5.0) + erubis (2.7.0) + execjs (2.7.0) + fast_blank (1.0.0) + fastimage (2.1.5) + ffi (1.9.25) + haml (5.0.4) + temple (>= 0.8.0) + tilt + hamster (3.0.0) + concurrent-ruby (~> 1.0) + hashie (3.6.0) + i18n (0.7.0) + kramdown (1.17.0) + listen (3.0.8) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + memoist (0.16.0) + middleman (4.2.1) + coffee-script (~> 2.2) + compass-import-once (= 1.0.5) + haml (>= 4.0.5) + kramdown (~> 1.2) + middleman-cli (= 4.2.1) + middleman-core (= 4.2.1) + sass (>= 3.4.0, < 4.0) + middleman-autoprefixer (2.9.0) + autoprefixer-rails (~> 8.0) + middleman-core (>= 3.3.3) + middleman-cli (4.2.1) + thor (>= 0.17.0, < 2.0) + middleman-core (4.2.1) + activesupport (>= 4.2, < 5.1) + addressable (~> 2.3) + backports (~> 3.6) + bundler (~> 1.1) + contracts (~> 0.13.0) + dotenv + erubis + execjs (~> 2.0) + fast_blank + fastimage (~> 2.0) + hamster (~> 3.0) + hashie (~> 3.4) + i18n (~> 0.7.0) + listen (~> 3.0.0) + memoist (~> 0.14) + padrino-helpers (~> 0.13.0) + parallel + rack (>= 1.4.5, < 3) + sass (>= 3.4) + servolux + tilt (~> 2.0) + uglifier (~> 3.0) + minitest (5.11.3) + padrino-helpers (0.13.3.4) + i18n (~> 0.6, >= 0.6.7) + padrino-support (= 0.13.3.4) + tilt (>= 1.4.1, < 3) + padrino-support (0.13.3.4) + activesupport (>= 3.1) + parallel (1.12.1) + public_suffix (3.0.3) + rack (2.0.6) + rb-fsevent (0.10.3) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) + sass (3.4.25) + servolux (0.13.0) + temple (0.8.0) + thor (0.20.3) + thread_safe (0.3.6) + tilt (2.0.9) + tzinfo (1.2.5) + thread_safe (~> 0.1) + uglifier (3.2.0) + execjs (>= 0.3.0, < 3) + +PLATFORMS + ruby + +DEPENDENCIES + middleman (~> 4.2) + middleman-autoprefixer (~> 2.7) + tzinfo-data + wdm (~> 0.1) + +BUNDLED WITH + 1.17.1 diff --git a/config.rb b/config.rb new file mode 100644 index 0000000..71ec870 --- /dev/null +++ b/config.rb @@ -0,0 +1,46 @@ +# Activate and configure extensions +# https://middlemanapp.com/advanced/configuration/#configuring-extensions + +activate :autoprefixer do |prefix| + prefix.browsers = "last 2 versions" +end + +# Layouts +# https://middlemanapp.com/basics/layouts/ + +# Per-page layout changes +page '/*.xml', layout: false +page '/*.json', layout: false +page '/*.txt', layout: false + +# With alternative layout +# page '/path/to/file.html', layout: 'other_layout' + +# Proxy pages +# https://middlemanapp.com/advanced/dynamic-pages/ + +# proxy( +# '/this-page-has-no-template.html', +# '/template-file.html', +# locals: { +# which_fake_page: 'Rendering a fake page with a local variable' +# }, +# ) + +# Helpers +# Methods defined in the helpers block are available in templates +# https://middlemanapp.com/basics/helper-methods/ + +# helpers do +# def some_helper +# 'Helping' +# end +# end + +# Build-specific configuration +# https://middlemanapp.com/advanced/configuration/#environment-specific-settings + +# configure :build do +# activate :minify_css +# activate :minify_javascript +# end diff --git a/API.md b/source/API.md similarity index 100% rename from API.md rename to source/API.md diff --git a/CLI.md b/source/CLI.md similarity index 100% rename from CLI.md rename to source/CLI.md diff --git a/DEVELOPMENT.md b/source/DEVELOPMENT.md similarity index 100% rename from DEVELOPMENT.md rename to source/DEVELOPMENT.md diff --git a/ENV-VARS.md b/source/ENV-VARS.md similarity index 100% rename from ENV-VARS.md rename to source/ENV-VARS.md diff --git a/FEDERATION.md b/source/FEDERATION.md similarity index 100% rename from FEDERATION.md rename to source/FEDERATION.md diff --git a/INSTALL.md b/source/INSTALL.md similarity index 100% rename from INSTALL.md rename to source/INSTALL.md diff --git a/INTERNATIONALIZATION.md b/source/INTERNATIONALIZATION.md similarity index 100% rename from INTERNATIONALIZATION.md rename to source/INTERNATIONALIZATION.md diff --git a/README.md b/source/README.md similarity index 100% rename from README.md rename to source/README.md diff --git a/UPDATE.md b/source/UPDATE.md similarity index 100% rename from UPDATE.md rename to source/UPDATE.md diff --git a/api.yaml b/source/api.yaml similarity index 100% rename from api.yaml rename to source/api.yaml diff --git a/docker-compose.sample.yml b/source/docker-compose.sample.yml similarity index 100% rename from docker-compose.sample.yml rename to source/docker-compose.sample.yml diff --git a/docker.sample.env b/source/docker.sample.env similarity index 100% rename from docker.sample.env rename to source/docker.sample.env diff --git a/source/images/.keep b/source/images/.keep new file mode 100644 index 0000000..e69de29 diff --git a/source/index.html.erb b/source/index.html.erb new file mode 100644 index 0000000..7147cc5 --- /dev/null +++ b/source/index.html.erb @@ -0,0 +1,23 @@ +--- +title: Welcome to Middleman +--- + + + +

+ Middleman is Running +

+ +<%= link_to( + "Read Documentation", + "https://middlemanapp.com/basics/templating_language/", + target: "_blank" +) %> diff --git a/source/javascripts/site.js b/source/javascripts/site.js new file mode 100644 index 0000000..9de6ff3 --- /dev/null +++ b/source/javascripts/site.js @@ -0,0 +1 @@ +// This is where it all goes :) diff --git a/source/layouts/layout.erb b/source/layouts/layout.erb new file mode 100644 index 0000000..18f6a22 --- /dev/null +++ b/source/layouts/layout.erb @@ -0,0 +1,16 @@ + + + + + + + + <%= current_page.data.title || "Middleman" %> + <%= stylesheet_link_tag "site" %> + <%= javascript_include_tag "site" %> + + + <%= yield %> + + diff --git a/source/stylesheets/site.css.scss b/source/stylesheets/site.css.scss new file mode 100644 index 0000000..fda2be7 --- /dev/null +++ b/source/stylesheets/site.css.scss @@ -0,0 +1,24 @@ +body { + background-color: #fbc547; + color: #333; + font-family: -apple-system, BlinkMacSystemFont, "Avenir Next", "Avenir", + "Segoe UI", "Lucida Grande", "Helvetica Neue", "Helvetica", "Fira Sans", + "Roboto", "Noto", "Droid Sans", "Cantarell", "Oxygen", "Ubuntu", + "Franklin Gothic Medium", "Century Gothic", "Liberation Sans", sans-serif; + padding: 18vh 1rem; + text-align: center; +} + +a { + color: rgba(#000, 0.7); + + &:focus, + &:hover { + color: rgba(#000, 0.6); + } +} + +.middleman-logo { + margin-bottom: 1rem; + width: 10rem; +}