From ad99f86c357b45ceeb2e9eb6e82ab3a0d8c72dc3 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Tue, 13 Dec 2016 13:54:28 -0500 Subject: [PATCH 01/10] Use the GitHub Pages Gem The GitHub Pages Gem (https://github.com/github/pages-gem) is a meta-gem that does two things: 1. It locks dependencies to the same version used by GitHub Pages ensuring that when you build the site locally, you're using the same version of plugins and other dependencies used in production. 2. When loaded as part of the :jekyll_plugins group, it allows the Gem to set certain configuration defaults and overrides (such as activating default plugins) to ensure, once again that your local preview replicates the production version as closely as possible. --- Gemfile | 19 +--------- Gemfile.lock | 104 ++++++++++++++++++++++++++++++++------------------- 2 files changed, 66 insertions(+), 57 deletions(-) diff --git a/Gemfile b/Gemfile index e29e26cdc8..0c8671cdee 100644 --- a/Gemfile +++ b/Gemfile @@ -1,20 +1,3 @@ source "https://rubygems.org" -gem "jekyll", "3.2.1" -gem "jekyll-sass-converter", "1.3.0" -gem "minima", "1.1.0" -gem "kramdown", "1.11.1" -gem "liquid", "3.0.6" -gem "rouge", "1.11.1" -gem "jemoji", "0.7.0" -gem "jekyll-mentions", "1.2.0" -gem "jekyll-redirect-from", "0.11.0" -gem "jekyll-sitemap", "0.10.0" -gem "jekyll-feed", "0.5.1" -gem "jekyll-gist", "1.4.0" -gem "jekyll-paginate", "1.1.0" -gem "jekyll-coffeescript", "1.0.1" -gem "jekyll-seo-tag", "2.0.0" -gem "jekyll-github-metadata", "2.0.2" -gem "listen", "3.0.6" -gem "activesupport", "4.2.7" +gem "github-pages", group: :jekyll_plugins diff --git a/Gemfile.lock b/Gemfile.lock index ee385b958b..c6f7150060 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,19 +11,52 @@ GEM coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.10.0) + coffee-script-source (1.11.1) colorator (1.1.0) + ethon (0.10.1) + ffi (>= 1.3.0) execjs (2.7.0) - faraday (0.9.2) + faraday (0.10.0) multipart-post (>= 1.2, < 3) ffi (1.9.14) forwardable-extended (2.6.0) gemoji (2.1.0) + github-pages (104) + activesupport (= 4.2.7) + github-pages-health-check (= 1.2.0) + jekyll (= 3.3.0) + jekyll-avatar (= 0.4.2) + jekyll-coffeescript (= 1.0.1) + jekyll-feed (= 0.8.0) + jekyll-gist (= 1.4.0) + jekyll-github-metadata (= 2.2.0) + jekyll-mentions (= 1.2.0) + jekyll-paginate (= 1.1.0) + jekyll-redirect-from (= 0.11.0) + jekyll-sass-converter (= 1.3.0) + jekyll-seo-tag (= 2.1.0) + jekyll-sitemap (= 0.12.0) + jekyll-swiss (= 0.4.0) + jemoji (= 0.7.0) + kramdown (= 1.11.1) + liquid (= 3.0.6) + listen (= 3.0.6) + mercenary (~> 0.3) + minima (= 2.0.0) + rouge (= 1.11.1) + terminal-table (~> 1.4) + github-pages-health-check (1.2.0) + addressable (~> 2.3) + net-dns (~> 0.8) + octokit (~> 4.0) + public_suffix (~> 1.4) + typhoeus (~> 0.7) html-pipeline (2.4.2) activesupport (>= 2) nokogiri (>= 1.4) i18n (0.7.0) - jekyll (3.2.1) + jekyll (3.3.0) + addressable (~> 2.4) colorator (~> 1.0) jekyll-sass-converter (~> 1.0) jekyll-watch (~> 1.1) @@ -33,14 +66,17 @@ GEM pathutil (~> 0.9) rouge (~> 1.7) safe_yaml (~> 1.0) + jekyll-avatar (0.4.2) + jekyll (~> 3.0) jekyll-coffeescript (1.0.1) coffee-script (~> 2.2) - jekyll-feed (0.5.1) + jekyll-feed (0.8.0) + jekyll (~> 3.3) jekyll-gist (1.4.0) octokit (~> 4.2) - jekyll-github-metadata (2.0.2) + jekyll-github-metadata (2.2.0) jekyll (~> 3.1) - octokit (~> 4.0) + octokit (~> 4.0, != 4.4.0) jekyll-mentions (1.2.0) activesupport (~> 4.0) html-pipeline (~> 2.3) @@ -50,9 +86,11 @@ GEM jekyll (>= 2.0) jekyll-sass-converter (1.3.0) sass (~> 3.2) - jekyll-seo-tag (2.0.0) - jekyll (~> 3.1) - jekyll-sitemap (0.10.0) + jekyll-seo-tag (2.1.0) + jekyll (~> 3.3) + jekyll-sitemap (0.12.0) + jekyll (~> 3.3) + jekyll-swiss (0.4.0) jekyll-watch (1.5.0) listen (~> 3.0, < 3.1) jemoji (0.7.0) @@ -68,52 +106,40 @@ GEM rb-inotify (>= 0.9.7) mercenary (0.3.6) mini_portile2 (2.1.0) - minima (1.1.0) - minitest (5.9.0) + minima (2.0.0) + minitest (5.10.1) multipart-post (2.0.0) - nokogiri (1.6.8) + net-dns (0.8.0) + nokogiri (1.6.8.1) mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - octokit (4.3.0) - sawyer (~> 0.7.0, >= 0.5.3) + octokit (4.6.2) + sawyer (~> 0.8.0, >= 0.5.3) pathutil (0.14.0) forwardable-extended (~> 2.6) - pkg-config (1.1.7) - rb-fsevent (0.9.7) + public_suffix (1.5.3) + rb-fsevent (0.9.8) rb-inotify (0.9.7) ffi (>= 0.5.0) rouge (1.11.1) safe_yaml (1.0.4) sass (3.4.22) - sawyer (0.7.0) - addressable (>= 2.3.5, < 2.5) - faraday (~> 0.8, < 0.10) + sawyer (0.8.1) + addressable (>= 2.3.5, < 2.6) + faraday (~> 0.8, < 1.0) + terminal-table (1.7.3) + unicode-display_width (~> 1.1.1) thread_safe (0.3.5) + typhoeus (0.8.0) + ethon (>= 0.8.0) tzinfo (1.2.2) thread_safe (~> 0.1) + unicode-display_width (1.1.2) PLATFORMS ruby DEPENDENCIES - activesupport (= 4.2.7) - jekyll (= 3.2.1) - jekyll-coffeescript (= 1.0.1) - jekyll-feed (= 0.5.1) - jekyll-gist (= 1.4.0) - jekyll-github-metadata (= 2.0.2) - jekyll-mentions (= 1.2.0) - jekyll-paginate (= 1.1.0) - jekyll-redirect-from (= 0.11.0) - jekyll-sass-converter (= 1.3.0) - jekyll-seo-tag (= 2.0.0) - jekyll-sitemap (= 0.10.0) - jemoji (= 0.7.0) - kramdown (= 1.11.1) - liquid (= 3.0.6) - listen (= 3.0.6) - minima (= 1.1.0) - rouge (= 1.11.1) + github-pages BUNDLED WITH - 1.11.2 + 1.13.6 From f08e807226c86204a2e448d3c90a4c9380f5c08b Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Tue, 13 Dec 2016 13:56:49 -0500 Subject: [PATCH 02/10] Use Jekyll Feed to generate the Atom feed. Jekyll Feed (https://github.com/jekyll/jekyll-feed) is an official Jekyll plugin which should replicate the existing feed nearly identically, but with a shared, battle-tested template that accounts for all sorts of edge cases like relative links in feed entries. It should be a drop in replacement and "just work" without any additional configuration. --- _config.yml | 1 + feed.xml | 29 ----------------------------- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 feed.xml diff --git a/_config.yml b/_config.yml index 5b7f442fd8..ea24a1bfc0 100644 --- a/_config.yml +++ b/_config.yml @@ -30,3 +30,4 @@ permalink: pretty gems: - jekyll-redirect-from + - jekyll-feed diff --git a/feed.xml b/feed.xml deleted file mode 100644 index ae253f98b5..0000000000 --- a/feed.xml +++ /dev/null @@ -1,29 +0,0 @@ ---- ---- - - - - {{ site.title | xml_escape }} - {{ site.description | xml_escape }} - {{ site.url }}{{ site.baseurl }}/ - - {{ site.time | date_to_rfc822 }} - {{ site.time | date_to_rfc822 }} - Jekyll v{{ jekyll.version }} - {% for post in site.posts limit:10 %} - - {{ post.title | xml_escape }} - {{ post.content | xml_escape }} - {{ post.date | date_to_rfc822 }} - {{ post.url | prepend: site.baseurl | prepend: site.url }} - {{ post.url | prepend: site.baseurl | prepend: site.url }} - {% for tag in post.tags %} - {{ tag | xml_escape }} - {% endfor %} - {% for cat in post.categories %} - {{ cat | xml_escape }} - {% endfor %} - - {% endfor %} - - From 8f1f8d47bbb2f8b3233c525fbafe35dc5a1b137b Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Tue, 13 Dec 2016 13:58:48 -0500 Subject: [PATCH 03/10] Use Jekyll Sitemap to generate the sitemap. Jekyll Sitemap (https://github.com/jekyll/jekyll-sitemap) is an official Jekyll plugin, which should serve as a drop-in replacement for the existing sitemap.xml. The resulting sitemap should be largely similar to the existing sitemap, but with a shared, battle-tested template that accounts for all sorts of edge cases, handles collections and static files, etc. --- _config.yml | 1 + sitemap.xml | 18 ------------------ 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 sitemap.xml diff --git a/_config.yml b/_config.yml index ea24a1bfc0..2c3c51a83b 100644 --- a/_config.yml +++ b/_config.yml @@ -31,3 +31,4 @@ permalink: pretty gems: - jekyll-redirect-from - jekyll-feed + - jekyll-sitemap diff --git a/sitemap.xml b/sitemap.xml deleted file mode 100644 index ff1dd0d398..0000000000 --- a/sitemap.xml +++ /dev/null @@ -1,18 +0,0 @@ ---- ---- - - - - - http://kubernetes.io/ - {{ site.time | date_to_xmlschema }} - -{% for page in site.pages %}{% if page.url != "/404.html" and page.url != "/sitemap.xml" and page.url != "/css/styles.css" %} - http://kubernetes.io{{ page.url }} - {% if page.date %}{{ page.date | date_to_xmlschema }}{% else %}{{ site.time | date_to_xmlschema }}{% endif %} -{% endif %}{% endfor %} - From cb9c9dccfd81dec094a43a2123f8fcdef2394ff3 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Tue, 13 Dec 2016 14:03:11 -0500 Subject: [PATCH 04/10] Add title and description to _config.yml Although the title already has a "name" entry, this commit replicates the name as "title", and adds a "description" entry, both of which are shared across common, official Jekyll plugins like jekyll-feed and jekyll-sitemap. This allows the feed and sitemap to properly output the title and description in various places. --- _config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_config.yml b/_config.yml index 2c3c51a83b..c95c693508 100644 --- a/_config.yml +++ b/_config.yml @@ -1,4 +1,6 @@ name: Kubernetes +title: Kubernetes +description: Production-Grade Container Orchestration markdown: kramdown kramdown: input: GFM From 69a6958209c5887ca4d6a88dc2fca4aed0db7a3d Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Tue, 13 Dec 2016 14:04:51 -0500 Subject: [PATCH 05/10] Remove "baseurl" from _config.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove baseurl from the config for three reasons: 1. It's not used anyplace within the site 2. The site’s base URL is only to be used when the resulting site lives at a subpath of the domain. Otherwise, the subpath should be nil, not /. 3. When the Pages Gem is loaded as part of the :jekyll_plugins group, baseurl and url are set automatically. --- _config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/_config.yml b/_config.yml index c95c693508..b5c1134b21 100644 --- a/_config.yml +++ b/_config.yml @@ -7,7 +7,6 @@ kramdown: html_to_native: true hard_wrap: false syntax_highlighter: rouge -baseurl: / incremental: true safe: false From 91634d19c0a12266d3fff01a30ea3a70fe93720e Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Tue, 13 Dec 2016 14:07:53 -0500 Subject: [PATCH 06/10] Use absolute_url to generate the cannonical URL Starting with Jekyll v3.3, Jekyll ships with `relative_url` and `absolute_url` filters. Rather than manual concatenating strings, we can rely on Jekyll to handle the logic in Ruby land, which takes into account the site's URL (locally and in production), and handles things like double "/"s. --- _includes/head-header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/head-header.html b/_includes/head-header.html index 17a83fa31e..28cec80a84 100644 --- a/_includes/head-header.html +++ b/_includes/head-header.html @@ -2,7 +2,7 @@ - {% if !page.no_canonical %}{% endif %} + {% if !page.no_canonical %}{% endif %} From 731f5bac1aea36e1b3fa937552f27b3d503cf83a Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Tue, 13 Dec 2016 14:16:54 -0500 Subject: [PATCH 07/10] Use Jekyll SEO Tag to generate the search engine HEAD meta. This commit moves the site to use the official Jekyll SEO Tag plugin (https://github.com/jekyll/jekyll-seo-tag) to generate the search-engine meta in the HEAD of each page. The title and canonical URL output should be largely the same as before, but with additional metadata, such as JSON-LD (for richer indexing), Twitter card metadat, etc. Like the other plugins, this should largely work out-of-the-box, with no additional day-to-day configuration, but is customizable where desired. --- _config.yml | 6 ++++++ _includes/head-header.html | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/_config.yml b/_config.yml index b5c1134b21..8b131eb433 100644 --- a/_config.yml +++ b/_config.yml @@ -33,3 +33,9 @@ gems: - jekyll-redirect-from - jekyll-feed - jekyll-sitemap + - jekyll-seo-tag + +# SEO +logo: /images/favicon.png +twitter: + username: kubernetesio diff --git a/_includes/head-header.html b/_includes/head-header.html index 28cec80a84..e2b18fa6ee 100644 --- a/_includes/head-header.html +++ b/_includes/head-header.html @@ -2,7 +2,6 @@ - {% if !page.no_canonical %}{% endif %} @@ -14,7 +13,7 @@ - Kubernetes - {{ title }} + {% seo %}
From 5de11038b15670f28a4362f6f13afbc8f774d447 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Tue, 13 Dec 2016 14:21:22 -0500 Subject: [PATCH 08/10] Exclude 404.html from the sitemap. See https://github.com/jekyll/jekyll-sitemap/issues/113#issuecomment-266834805 for making this the default behavior. --- 404.md | 1 + 1 file changed, 1 insertion(+) diff --git a/404.md b/404.md index 3d32e81bcf..8354c87820 100644 --- a/404.md +++ b/404.md @@ -3,6 +3,7 @@ layout: docwithnav title: 404 Error! permalink: /404.html no_canonical: true +sitemap: false --- From e66750603f5a627c6ecbb5dda6698d045b219696 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Tue, 13 Dec 2016 14:39:22 -0500 Subject: [PATCH 09/10] Don't use the site description as the index title --- index.html | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index a603025150..728100db84 100644 --- a/index.html +++ b/index.html @@ -1,9 +1,8 @@ --- -title: Production-Grade Container Orchestration --- - + {% include head-header.html %} @@ -22,7 +21,7 @@ title: Production-Grade Container Orchestration - + @@ -110,7 +109,7 @@ title: Production-Grade Container Orchestration exposing secrets in your stack configuration.

- +

Storage orchestration

@@ -198,9 +197,8 @@ title: Production-Grade Container Orchestration ga('create', 'UA-36037335-10', 'auto'); ga('send', 'pageview'); - - From e971f9cb627135e0a5b19740e856343eab705328 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Tue, 13 Dec 2016 14:42:51 -0500 Subject: [PATCH 10/10] bump github pages gem to v109 to get workflow improvements --- Gemfile.lock | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c6f7150060..4d72be803d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,7 +7,8 @@ GEM minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.4.0) + addressable (2.5.0) + public_suffix (~> 2.0, >= 2.0.2) coffee-script (2.4.1) coffee-script-source execjs @@ -21,22 +22,28 @@ GEM ffi (1.9.14) forwardable-extended (2.6.0) gemoji (2.1.0) - github-pages (104) + github-pages (109) activesupport (= 4.2.7) - github-pages-health-check (= 1.2.0) - jekyll (= 3.3.0) + github-pages-health-check (= 1.3.0) + jekyll (= 3.3.1) jekyll-avatar (= 0.4.2) jekyll-coffeescript (= 1.0.1) + jekyll-default-layout (= 0.1.4) jekyll-feed (= 0.8.0) jekyll-gist (= 1.4.0) jekyll-github-metadata (= 2.2.0) jekyll-mentions (= 1.2.0) + jekyll-optional-front-matter (= 0.1.2) jekyll-paginate (= 1.1.0) + jekyll-readme-index (= 0.0.3) jekyll-redirect-from (= 0.11.0) + jekyll-relative-links (= 0.2.1) jekyll-sass-converter (= 1.3.0) jekyll-seo-tag (= 2.1.0) jekyll-sitemap (= 0.12.0) jekyll-swiss (= 0.4.0) + jekyll-theme-primer (= 0.1.1) + jekyll-titles-from-headings (= 0.1.2) jemoji (= 0.7.0) kramdown (= 1.11.1) liquid (= 3.0.6) @@ -45,17 +52,17 @@ GEM minima (= 2.0.0) rouge (= 1.11.1) terminal-table (~> 1.4) - github-pages-health-check (1.2.0) + github-pages-health-check (1.3.0) addressable (~> 2.3) net-dns (~> 0.8) octokit (~> 4.0) - public_suffix (~> 1.4) + public_suffix (~> 2.0) typhoeus (~> 0.7) html-pipeline (2.4.2) activesupport (>= 2) nokogiri (>= 1.4) i18n (0.7.0) - jekyll (3.3.0) + jekyll (3.3.1) addressable (~> 2.4) colorator (~> 1.0) jekyll-sass-converter (~> 1.0) @@ -70,6 +77,8 @@ GEM jekyll (~> 3.0) jekyll-coffeescript (1.0.1) coffee-script (~> 2.2) + jekyll-default-layout (0.1.4) + jekyll (~> 3.0) jekyll-feed (0.8.0) jekyll (~> 3.3) jekyll-gist (1.4.0) @@ -81,9 +90,15 @@ GEM activesupport (~> 4.0) html-pipeline (~> 2.3) jekyll (~> 3.0) + jekyll-optional-front-matter (0.1.2) + jekyll (~> 3.0) jekyll-paginate (1.1.0) + jekyll-readme-index (0.0.3) + jekyll (~> 3.0) jekyll-redirect-from (0.11.0) jekyll (>= 2.0) + jekyll-relative-links (0.2.1) + jekyll (~> 3.3) jekyll-sass-converter (1.3.0) sass (~> 3.2) jekyll-seo-tag (2.1.0) @@ -91,6 +106,10 @@ GEM jekyll-sitemap (0.12.0) jekyll (~> 3.3) jekyll-swiss (0.4.0) + jekyll-theme-primer (0.1.1) + jekyll (~> 3.3) + jekyll-titles-from-headings (0.1.2) + jekyll (~> 3.3) jekyll-watch (1.5.0) listen (~> 3.0, < 3.1) jemoji (0.7.0) @@ -116,7 +135,7 @@ GEM sawyer (~> 0.8.0, >= 0.5.3) pathutil (0.14.0) forwardable-extended (~> 2.6) - public_suffix (1.5.3) + public_suffix (2.0.4) rb-fsevent (0.9.8) rb-inotify (0.9.7) ffi (>= 0.5.0)