From 01e5be5a01532b88ac05b9b3e4a30203b379e950 Mon Sep 17 00:00:00 2001 From: Misty Stanley-Jones Date: Thu, 2 Feb 2017 22:56:02 -0800 Subject: [PATCH] Various Jekyll optimizations (#1487) Add `tree: true|false` front-matter key (default to true) to disable the left-hand nav tree on a per-page basis Disabling the tree also disables reading time Disabled tree on search, sorry, thank-you-subscribing-docker-weekly Use null layout for allpagelinks.md and limit it to pages that have a title (which leaves out redirects, which are not real pages) Add site-generation date and time to footer, in a tiny unobtrusive font --- _config.yml | 1 + _layouts/docs.html | 16 +++++++++++----- allpagelinks.md | 9 ++++++++- css/documentation.css | 6 ++++++ search.md | 3 ++- sorry.md | 2 ++ thank-you-subscribing-docker-weekly.md | 3 ++- 7 files changed, 32 insertions(+), 8 deletions(-) diff --git a/_config.yml b/_config.yml index 3b5c44841c..ca2e5713d8 100644 --- a/_config.yml +++ b/_config.yml @@ -32,6 +32,7 @@ defaults: enginebranch: 1.13.x toc_min: 2 toc_max: 3 + tree: true - scope: path: "compose" values: diff --git a/_layouts/docs.html b/_layouts/docs.html index c02685a0e4..72e6b51cb4 100644 --- a/_layouts/docs.html +++ b/_layouts/docs.html @@ -195,17 +195,22 @@ ng\:form {
-
+
+ {% if page.tree == false %} + + {% else %} + + {% endif %}
{% if page.title %}

{{ page.title }}

{% endif %} {% if page.advisory %}
{{ site.data.advisories.texts[page.advisory] | markdownify }}
{% endif %} - {% include read_time.html %} + {% unless page.tree == false %}{% include read_time.html %}{% endunless %} {{ content }} {% if page.noratings != true %}
@@ -391,6 +396,7 @@ background-image: linear-gradient(to bottom, #75ae4c, #99c47c);
diff --git a/allpagelinks.md b/allpagelinks.md index 31962b4d68..8677a9fe15 100644 --- a/allpagelinks.md +++ b/allpagelinks.md @@ -1,9 +1,16 @@ --- title: All Page Links hide_from_sitemap: true +layout: null --- +# All site links for `docs.docker.com` + {% assign pages = site.pages | sort:"path" %} {% for page in pages %} -- [{{page.url}}]({{page.url}}) - {{ page.title }} + {% unless page.layout == null %} + {% unless page.title == nil %} +- [{{page.title}}]({{page.url}}) + {% endunless %} + {% endunless %} {% endfor %} diff --git a/css/documentation.css b/css/documentation.css index f1ca1a3ba9..7c61e72ec6 100644 --- a/css/documentation.css +++ b/css/documentation.css @@ -457,3 +457,9 @@ img.with-border { color: #155A74; padding-bottom: 5px; } + +#site-generation { + font-size: 9px; + color: #999; + font-style: italic; +} diff --git a/search.md b/search.md index 627d0799d4..c32c082c3e 100644 --- a/search.md +++ b/search.md @@ -4,6 +4,7 @@ keywords: Search, Docker, documentation, manual, guide, reference, api noratings: true notoc: true title: Search results +tree: false ---