From 66d0e68df6ef877844fea28b20e7075295d27676 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 8 Apr 2020 15:28:35 +0200 Subject: [PATCH 1/9] _includes: use absolute links instead of links to Markdown files We cannot use relative links in includes, because: - The jekyll-relative-links, is not called on includes, so markdown-links are rendered as-is. - These files are included in various locations on the website; because of that, it's not possible to compose a relative link to other Markdown files, so we're falling back to using absolute URLs, relative to the root of the website. Signed-off-by: Sebastiaan van Stijn --- _includes/cli.md | 12 ++++++------ _includes/content/compose-var-sub.md | 4 ++-- _includes/content/ssh/ssh-overview.md | 2 +- _includes/docker_ee.md | 8 ++++---- _includes/ee-linux-install-reuse.md | 12 ++++++------ _includes/install-script.md | 2 +- _includes/kubernetes-mac-win.md | 2 +- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/_includes/cli.md b/_includes/cli.md index db75bdc9e7e3..ce3690997103 100644 --- a/_includes/cli.md +++ b/_includes/cli.md @@ -19,7 +19,7 @@ your client and daemon API versions. {% if controller_data.deprecated %} -> This command is [deprecated](/engine/deprecated.md){: target="_blank" class="_"}. +> This command is [deprecated](/engine/deprecated/){: target="_blank" class="_"}. > > It may be removed in a future Docker version. {: .warning } @@ -42,7 +42,7 @@ your client and daemon API versions. > This command is experimental on the Docker daemon. It should not be used in > production environments. > To enable experimental features on the Docker daemon, edit the -> [daemon.json](/engine/reference/commandline/dockerd.md#daemon-configuration-file) +> [daemon.json](/engine/reference/commandline/dockerd/#daemon-configuration-file) > and set `experimental` to `true`. > > {% include experimental.md %} @@ -56,7 +56,7 @@ your client and daemon API versions. > **It should not be used in production environments.** > > To enable experimental features in the Docker CLI, edit the -> [config.json](/engine/reference/commandline/cli.md#configuration-files) +> [config.json](/engine/reference/commandline/cli/#configuration-files) > and set `experimental` to `enabled`. You can go [here](https://docs.docker.com/engine/reference/commandline/cli/#experimental-features) > for more information. {: .important } @@ -117,9 +117,9 @@ For example uses of this command, refer to the [examples section](#examples) bel {% for option in alloptions %} - {% capture deprecated-badge %}{% if option.deprecated %}deprecated{% endif %}{% endcapture %} - {% capture experimental-daemon-badge %}{% if option.experimental %}experimental (daemon){% endif %}{% endcapture %} - {% capture experimental-cli-badge %}{% if option.experimentalcli %}experimental (CLI){% endif %}{% endcapture %} + {% capture deprecated-badge %}{% if option.deprecated %}deprecated{% endif %}{% endcapture %} + {% capture experimental-daemon-badge %}{% if option.experimental %}experimental (daemon){% endif %}{% endcapture %} + {% capture experimental-cli-badge %}{% if option.experimentalcli %}experimental (CLI){% endif %}{% endcapture %} {% capture min-api %}{% if option.min_api_version %}API {{ option.min_api_version }}+{% endif %}{%endcapture%} {% capture flag-orchestrator %}{% if option.swarm %}Swarm{% endif %}{% if option.kubernetes %}Kubernetes{% endif %}{% endcapture %} diff --git a/_includes/content/compose-var-sub.md b/_includes/content/compose-var-sub.md index c4606251d3e3..e41d17dd573e 100644 --- a/_includes/content/compose-var-sub.md +++ b/_includes/content/compose-var-sub.md @@ -18,7 +18,7 @@ string. In the example above, if `POSTGRES_VERSION` is not set, the value for the `image` option is `postgres:`. You can set default values for environment variables using a -[`.env` file](../env-file.md), which Compose automatically looks for. Values +[`.env` file](/compose/env-file/), which Compose automatically looks for. Values set in the shell environment override those set in the `.env` file. > Note when using docker stack deploy @@ -28,7 +28,7 @@ set in the shell environment override those set in the `.env` file. {: .important } Both `$VARIABLE` and `${VARIABLE}` syntax are supported. Additionally when using -the [2.1 file format](compose-versioning.md#version-21), it is possible to +the [2.1 file format](/compose/compose-file/compose-versioning/#version-21), it is possible to provide inline default values using typical shell syntax: - `${VARIABLE:-default}` evaluates to `default` if `VARIABLE` is unset or diff --git a/_includes/content/ssh/ssh-overview.md b/_includes/content/ssh/ssh-overview.md index 6dfa2940f523..1358081b2c8b 100644 --- a/_includes/content/ssh/ssh-overview.md +++ b/_includes/content/ssh/ssh-overview.md @@ -1,4 +1,4 @@ -[SSH](/glossary.md#SSH) is a secure protocol for accessing remote machines and applications. It +[SSH](/glossary/#SSH) is a secure protocol for accessing remote machines and applications. It provides authentication and encrypts data communication over insecure networks. These topics describe how to find existing SSH keys or generate new ones, and diff --git a/_includes/docker_ee.md b/_includes/docker_ee.md index 04d97a0daab8..04a32e297917 100644 --- a/_includes/docker_ee.md +++ b/_includes/docker_ee.md @@ -3,7 +3,7 @@ | Capabilities | Docker Engine - Enterprise | Docker Enterprise | |:---------------------------------------------------------------------|:-------------------------:|:----------------------------:| | Container engine and built in orchestration, networking, security | {{green-check}} | {{green-check}} | -| [Certified infrastructure, plugins and ISV containers](../ee/supported-platforms/#docker-enterprise) | {{green-check}} | {{green-check}} | -| [Image management with Docker Trusted Registry security scanning](../ee/dtr/user/manage-images/scan-images-for-vulnerabilities/) | | {{green-check}} | -| [Container app management with Universal Control Plane](../ee/ucp/) | | {{green-check}} | -| [Developer solutions with Docker Desktop Enterprise](../ee/desktop/) | | {{green-check}} | +| [Certified infrastructure, plugins and ISV containers](/ee/supported-platforms/#docker-enterprise) | {{green-check}} | {{green-check}} | +| [Image management with Docker Trusted Registry security scanning](/ee/dtr/user/manage-images/scan-images-for-vulnerabilities/) | | {{green-check}} | +| [Container app management with Universal Control Plane](/ee/ucp/) | | {{green-check}} | +| [Developer solutions with Docker Desktop Enterprise](/desktop/enterprise/) | | {{green-check}} | diff --git a/_includes/ee-linux-install-reuse.md b/_includes/ee-linux-install-reuse.md index 20224c7ff3e3..675534f8c9d0 100644 --- a/_includes/ee-linux-install-reuse.md +++ b/_includes/ee-linux-install-reuse.md @@ -23,7 +23,7 @@ on {{ linux-dist-long }}: Docker Engine - Community is _not_ supported on {{ linux-dist-long }}. {% endif %} {% if linux-dist == "centos" %} -For Docker Community Edition on {{ linux-dist-cap }}, see [Get Docker Engine - Community for CentOS](/engine/install/centos.md). +For Docker Community Edition on {{ linux-dist-cap }}, see [Get Docker Engine - Community for CentOS](/engine/install/centos/). {% endif %} {% elsif section == "find-ee-repo-url" %} @@ -280,7 +280,7 @@ You only need to set up the repository once, after which you can install Docker ``` Docker Engine - Enterprise is installed and running. Use `sudo` to run Docker commands. See - [Linux postinstall](/engine/install/linux-postinstall.md){: target="_blank" class="_" } to allow + [Linux postinstall](/engine/install/linux-postinstall/){: target="_blank" class="_" } to allow non-privileged users to run Docker commands. @@ -351,7 +351,7 @@ To manually install Docker Enterprise, download the `.{{ package-format | downca ``` Docker Engine - Enterprise is installed and running. Use `sudo` to run Docker commands. See - [Linux postinstall](/engine/install/linux-postinstall.md){: target="_blank" class="_" } to allow + [Linux postinstall](/engine/install/linux-postinstall/){: target="_blank" class="_" } to allow non-privileged users to run Docker commands. @@ -394,7 +394,7 @@ To manually install Docker Enterprise, download the `.{{ package-format | downca ``` Docker Engine - Enterprise is installed and running. Use `sudo` to run Docker commands. See - [Linux postinstall](/engine/install/linux-postinstall.md){: target="_blank" class="_" } to allow + [Linux postinstall](/engine/install/linux-postinstall/){: target="_blank" class="_" } to allow non-privileged users to run Docker commands. @@ -444,7 +444,7 @@ To manually install Docker Enterprise, download the `.{{ package-format | downca ``` Docker Engine - Enterprise is installed and running. Use `sudo` to run Docker commands. See - [Linux postinstall](/engine/install/linux-postinstall.md){: target="_blank" class="_" } to allow + [Linux postinstall](/engine/install/linux-postinstall/){: target="_blank" class="_" } to allow non-privileged users to run Docker commands. {% endif %} @@ -485,7 +485,7 @@ You must delete any edited configuration files manually. {% elsif section == "linux-install-nextsteps" %} -- Continue to [Post-installation steps for Linux](/engine/install/linux-postinstall.md){: target="_blank" class="_" } +- Continue to [Post-installation steps for Linux](/engine/install/linux-postinstall/){: target="_blank" class="_" } - Continue with user guides on [Universal Control Plane (UCP)](/ee/ucp/){: target="_blank" class="_" } and [Docker Trusted Registry (DTR)](/ee/dtr/){: target="_blank" class="_" } diff --git a/_includes/install-script.md b/_includes/install-script.md index 645b86e26aa3..91854447250d 100644 --- a/_includes/install-script.md +++ b/_includes/install-script.md @@ -69,7 +69,7 @@ run Docker commands by default. > **Note**: > > To install Docker without root privileges, see -> [Run the Docker daemon as a non-root user (Rootless mode)](/engine/security/rootless.md). +> [Run the Docker daemon as a non-root user (Rootless mode)](/engine/security/rootless/). > > Rootless mode is currently available as an experimental feature. diff --git a/_includes/kubernetes-mac-win.md b/_includes/kubernetes-mac-win.md index 4390e20fca4d..3469dcdc8ba4 100644 --- a/_includes/kubernetes-mac-win.md +++ b/_includes/kubernetes-mac-win.md @@ -55,7 +55,7 @@ your workloads, in parallel, on Kubernetes, Swarm, and as standalone containers. Enabling or disabling the Kubernetes server does not affect your other workloads. -See [{{ product }} > Getting started](/docker-for-{{ platform }}/index.md#kubernetes) to +See [{{ product }} > Getting started](/docker-for-{{ platform }}/#kubernetes) to enable Kubernetes and begin testing the deployment of your workloads on Kubernetes. From 3ad5c449579b1012a04afb8ead8b14bb0aed0f81 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 19 Apr 2020 19:20:39 +0200 Subject: [PATCH 2/9] _includes/cli.md: some small changes in template: - remove some redundant whitespace - use "remove_first" instead of "replace", because the strings to replace should only occur once. Signed-off-by: Sebastiaan van Stijn --- _includes/cli.md | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/_includes/cli.md b/_includes/cli.md index ce3690997103..47add0705422 100644 --- a/_includes/cli.md +++ b/_includes/cli.md @@ -81,8 +81,8 @@ your client and daemon API versions. ## Usage -```none -{{ controller_data.usage | replace: tabChar,"" | strip }}{% if controller_data.cname %} COMMAND{% endif %} +```console +{{ controller_data.usage | replace: tabChar, "" | strip }}{% if controller_data.cname %} COMMAND{% endif %} ``` {% endif %} @@ -116,15 +116,12 @@ For example uses of this command, refer to the [examples section](#examples) bel {% for option in alloptions %} - {% capture deprecated-badge %}{% if option.deprecated %}deprecated{% endif %}{% endcapture %} {% capture experimental-daemon-badge %}{% if option.experimental %}experimental (daemon){% endif %}{% endcapture %} {% capture experimental-cli-badge %}{% if option.experimentalcli %}experimental (CLI){% endif %}{% endcapture %} {% capture min-api %}{% if option.min_api_version %}API {{ option.min_api_version }}+{% endif %}{%endcapture%} {% capture flag-orchestrator %}{% if option.swarm %}Swarm{% endif %}{% if option.kubernetes %}Kubernetes{% endif %}{% endcapture %} - {% capture all-badges %}{{ deprecated-badge }}{{ experimental-daemon-badge }}{{ experimental-cli-badge }}{{ min-api }}{{ flag-orchestrator }}{% endcapture %} - {% assign defaults-to-skip = "[],map[],false,0,0s,default,'',\"\"" | split: ',' %} {% capture option-default %}{% if option.default_value %}{% unless defaults-to-skip contains option.default_value or defaults-to-skip == blank %}`{{ option.default_value }}`{% endunless %}{% endif %}{% endcapture %} @@ -132,11 +129,9 @@ For example uses of this command, refer to the [examples section](#examples) bel {{ option-default }} {% if all-badges != '' %}{{ all-badges | strip }}
{% endif %}{{ option.description | strip }} - {% endfor %} - {% endif %} {% if controller_data.examples %} @@ -157,8 +152,8 @@ The include.datafolder or include.datafile was not set. ## Parent command -{% capture parentfile %}{{ controller_data.plink | replace: ".yaml", "" | replace: "docker_","" }}{% endcapture %} -{% capture parentdatafile %}{{ controller_data.plink | replace: ".yaml", "" }}{% endcapture %} +{% capture parentfile %}{{ controller_data.plink | remove_first: ".yaml" | remove_first: "docker_" }}{% endcapture %} +{% capture parentdatafile %}{{ controller_data.plink | remove_first: ".yaml" }}{% endcapture %} {% capture parentDesc %}{{ site.data[include.datafolder][parentdatafile].short }}{% endcapture %} | Command | Description | @@ -181,9 +176,9 @@ The include.datafolder or include.datafile was not set. {% for command in controller_data.cname %} - {% capture dataFileName %}{{ command | strip | replace: " ","_" }}{% endcapture %} + {% capture dataFileName %}{{ command | strip | replace: " ", "_" }}{% endcapture %} - [{{ command }}]({{ dataFileName | replace: "docker_","" }}/) + [{{ command }}]({{ dataFileName | remove_first: "docker_" }}/) {{ site.data[include.datafolder][dataFileName].short }} {% endfor %} @@ -204,9 +199,9 @@ The include.datafolder or include.datafile was not set. {% for command in site.data[include.datafolder][parentdatafile].cname %} - {% capture dataFileName %}{{ command | strip | replace: " ","_" }}{% endcapture %} + {% capture dataFileName %}{{ command | strip | replace: " ", "_" }}{% endcapture %} - [{{ command }}]({{ dataFileName | replace: "docker_","" }}/) + [{{ command }}]({{ dataFileName | remove_first: "docker_" }}/) {{ site.data[include.datafolder][dataFileName].short }} {% endfor %} From f48a3adc2dd297a10df9b59e58b2002e20a21366 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 19 Apr 2020 19:23:27 +0200 Subject: [PATCH 3/9] _includes/cli.md: remove "validation" for include-file Removing this "check" because it made the template difficult to read, and duilding the docs won't fail if these values are missing. If a page is empty, it's probably fast to find why anyway. Signed-off-by: Sebastiaan van Stijn --- _includes/cli.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/_includes/cli.md b/_includes/cli.md index 47add0705422..5ee15102e217 100644 --- a/_includes/cli.md +++ b/_includes/cli.md @@ -1,6 +1,4 @@ {% capture tabChar %} {% endcapture %} -{% if include.datafolder and include.datafile %} - {% assign controller_data = site.data[include.datafolder][include.datafile] %} ## Description @@ -140,11 +138,6 @@ For example uses of this command, refer to the [examples section](#examples) bel {{ controller_data.examples }} -{% endif %} -{% else %} - -The include.datafolder or include.datafile was not set. - {% endif %} {% if controller_data.pname %} From f39a74da3dd9d762e231ac476025b8ab19bc0ca6 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 19 Apr 2020 20:10:32 +0200 Subject: [PATCH 4/9] _includes/cli.md: fix generated links to other commands When generating HTML pages, Jekyll will generate a directory named after the name of the Markdown file, and generate an index.html file inside that directory. For example, for a markdown file named /foo/bar/mypage.md, Jekyll generates a HTML file named /foo/bar/mypage/index.html. This means that all links relative to mypage.md, and expect those links to be relative to the /foo/bar/ directory, will actually end up being relative to /foo/bar/mypage/. Unfortunately, Jekyll / Liquid does not have a variable that holds the parent directory of the _markdown_ file, so we have to generate it by taking `page.path` (which holds the absolute path of the markdownfile), and remove the filename from that path. After generating that path, we prepend that path to URLs linking to related commands (parent commands and child commands), as all reference files are in the same path. Signed-off-by: Sebastiaan van Stijn --- _includes/cli.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/_includes/cli.md b/_includes/cli.md index 5ee15102e217..d54be3a4db9c 100644 --- a/_includes/cli.md +++ b/_includes/cli.md @@ -1,5 +1,6 @@ {% capture tabChar %} {% endcapture %} {% assign controller_data = site.data[include.datafolder][include.datafile] %} +{% assign parentPath = page.path | prepend: "/" | remove: page.name %} ## Description @@ -151,7 +152,7 @@ For example uses of this command, refer to the [examples section](#examples) bel | Command | Description | | ------- | ----------- | -| [{{ controller_data.pname }}]({{ parentfile }}) | {{ parentDesc }}| +| [{{ controller_data.pname }}]({{parentPath}}{{ parentfile }}/) | {{ parentDesc }}| {% endunless %} {% endif %} @@ -171,7 +172,7 @@ For example uses of this command, refer to the [examples section](#examples) bel {% for command in controller_data.cname %} {% capture dataFileName %}{{ command | strip | replace: " ", "_" }}{% endcapture %} - [{{ command }}]({{ dataFileName | remove_first: "docker_" }}/) + [{{ command }}]({{ parentPath }}{{ dataFileName | remove_first: "docker_" }}/) {{ site.data[include.datafolder][dataFileName].short }} {% endfor %} @@ -194,7 +195,7 @@ For example uses of this command, refer to the [examples section](#examples) bel {% for command in site.data[include.datafolder][parentdatafile].cname %} {% capture dataFileName %}{{ command | strip | replace: " ", "_" }}{% endcapture %} - [{{ command }}]({{ dataFileName | remove_first: "docker_" }}/) + [{{ command }}]({{ parentPath }}{{ dataFileName | remove_first: "docker_" }}/) {{ site.data[include.datafolder][dataFileName].short }} {% endfor %} From 8c3ea575e4ff93b1349079406abc9770791c90d3 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 19 Apr 2020 20:27:30 +0200 Subject: [PATCH 5/9] _layouts/docs.html: some formatting and minor cleanup - remove some stray empty lines - put liquid code that was before the opening HTML inside a HTML comment, to prevent IDE's from marking it as invalid HTML - fix some indentation - fix some minor linting issues Signed-off-by: Sebastiaan van Stijn --- _layouts/docs.html | 119 +++++++++++++++++---------------------------- 1 file changed, 45 insertions(+), 74 deletions(-) diff --git a/_layouts/docs.html b/_layouts/docs.html index 797f267cfb38..34cfff6ad9e1 100755 --- a/_layouts/docs.html +++ b/_layouts/docs.html @@ -1,21 +1,5 @@ - -{% if page.path contains "index.md" %} - {% capture basehref %}{{ page.url }}{% endcapture %} -{% else %} - {% assign crumbs = page.url | split: '/' %} - {% assign stoppingpoint = crumbs | size | minus: 1 %} - {% for crumb in crumbs %} - {% if forloop.index == stoppingpoint %} - {% capture basehref %}{{basehref}}{{ crumb }}/{% endcapture %} - {% break %} - {% else %} - {% capture basehref %}{{basehref}}{{ crumb }}/{% endcapture %} - {% endif %} - {% endfor %} -{% endif %} - - + - - +--> - @@ -92,18 +72,17 @@ {{ page.title }} | Docker Documentation - - - - - - - - + + + + + + + + {% if page.hide_from_sitemap %}{% endif %} - {% if page.noratings != true %} -