Commit Graph

49 Commits

Author SHA1 Message Date
David Karlsson 083ffc0a6b cli: remove redundant links to parent/child/related commands
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-07-04 14:24:22 +02:00
CrazyMax 27d07224de
cli-ref: don't show hidden commands
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-06-27 19:23:32 +02:00
Sebastiaan van Stijn 43db4d8e01
reference: prevent options/flags column from wrapping
Make sure that options (flags) are not wrapped in the table.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-22 23:23:14 +02:00
CrazyMax b254efff56
cli reference: do not display hidden flags
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-02-19 01:25:59 +01:00
CrazyMax efbed96404
_includes/cli.md: do not escape flag descriptions
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-02-03 02:30:27 +01:00
Sebastiaan van Stijn f2e6257350
cli reference: remove handling of kubernetes orchestrator
Support for "docker stack deploy" using kubernetes as orchestrator has
been deprecated and removed, so removing this part of the template.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-02-01 20:24:59 +01:00
CrazyMax a9981de12f
include(cli): fix liquid syntax error
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-31 08:20:45 +01:00
CrazyMax 09c9f51bcf
remove most of absolute urls
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-08-03 11:50:33 +02:00
Sebastiaan van Stijn b02580bd21
reference: update description for experimental cli features
Experimental CLI features are enabled by default since docker 20.10, so the
instructions for enabling the features were no longer needed. Also tweaked the
description a bit to align how we describe experimental features elsewhere.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-02 11:24:39 +02:00
Sebastiaan van Stijn d468e10c68
reference: hide "minimum API version" badges for old versions
The reference pages show badges for commands and options (flags) that require
a minimum API version. While this information can be useful if an option was
added in a recent version of the Docker Engine (and API), these badges are no
longer relevant to most users if the minimum required version is quite "old".

We assume users reading these pages to be on the current version, or at most
on the version before that (which is already "unsupported"). Users running
older versions have bigger problems on their hand, so we're not accounting for
those.

So, to reduce unnecessary clutter on the page, we only show the minimum required
API version if it requires a relatively recent version of the Engine.

A new "min_api_threshold" option was added in the `_config.yml`, which specifies
the minimum required API version for which we show a badge (currently: API v1.40,
or "Docker 19.03").

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-30 19:10:05 +02:00
Sebastiaan van Stijn 27355f688d
reference: omit "parent command" section for "docker"
The "parent command" can be useful if the page describes a subcommand,
but generally having a link to `docker` may not provide much value.

This patch omits the "parent command" section if the parent command
is the `docker` command itself.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-30 17:16:57 +02:00
Sebastiaan van Stijn a984ba10af
reference: re-format markdown table in source
Should make no change in the rendered output, but my IDE didn't like
it not being well-formed :D

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-30 17:10:46 +02:00
Sebastiaan van Stijn 0ea7f3de72
reference: fix title on API version badges
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-30 17:08:22 +02:00
Sebastiaan van Stijn 144c8b1f8f
reference: remove "description" header, and use it for "extended description"
The "description" header included the short description of each command. In most
cases, this description was very short ("run a container"), and adding the extra
header before it only was adding extra noise.

This patch:

- removes the top "description" header
- renames the existing "extended description" header to "description" (a hidden
  "extended-description" anchor is added for backward compatibility)

As the extended description can be long (hopefully!), there may be a long distance
between the `Usage` section and the `Options` section. To help users navigate
to the list of available options, an extra line is printed if an extended
description is available for the command, including a link to the corresponding
section:

> Refer to the options section for an overview of available OPTIONS for this command.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-30 17:05:46 +02:00
Sebastiaan van Stijn 67f15b4e19
reference: remove "enterprise_only" condition
This metadata condition was used for features that were only available
on Docker Enterprise Edition ("Docker EE"), and is no longer used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-30 16:08:57 +02:00
Usha Mandya 6047b8f8bd Remove Docker App docs
Signed-off-by: Usha Mandya <usha.mandya@docker.com>
2021-06-03 00:16:18 +01:00
Sebastiaan van Stijn 68f77423a1
_includes/cli.md: add support for per-flag detail URLs or anchors
The YAML files now support a new "details_url" property for flags, which
can be set if there's an anchor on the same page, or an URL where to
find a detailed description of the flag (Currently only anchors are used).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-07 16:07:27 +02:00
Sebastiaan van Stijn 61b3d930d8
reference: prefix usage output with a prompt to allow copying
Although the usage example is not directly "runnable", it doesn't hurt
to allow copying them.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-26 15:41:21 +01:00
Sebastiaan van Stijn ac396880ec
_includes/cli.md: fix flag descriptions with < and >
Some flag descriptions contain point-brackets to indicate required
options, e.g.:

    --ssh stringArray   SSH agent socket or keys to expose to the build (format: default|<id>[=<socket>|<key>[,<key>]])

When rendering those options as HTML, those options were not visible as
they were rendered as a HTML element.

Given that flag-descriptions are not expected to have MarkDown or HTML
formatting, we can HTML-escape them to prevent this.

This patch escapes the flag-descriptions using liquid's `esacape` command.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-01-13 10:45:30 +01:00
Sebastiaan van Stijn 393d3f6566
Add rel="noopener" to external links
See https://web.dev/external-anchors-use-rel-noopener/

Using noopener, as that addresses the security issue. "noreferer" blocks
the REFERER header, which may still be useful for some target URLs.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-12 13:09:30 +02:00
Sebastiaan van Stijn 9cab4195c0
Replace JavaScript link fix with custom plugin
This replaces the JavaScript link fix script with a custom plugin,
based on the jekyll-relative-link plugin, and modified so that it
can be used as Liquid "filter".

While it borrows from the jekyll-relative-links plugin, it takes some shortcuts;

- We use the code from jekyll-relative-links plugin to find/extract
  links on the page
- Relative links are converted to absolute links, using the path of
  the markdown source file that's passed as argument
- After conversion to an absolute link, we strip the ".md" extension;
  no attempt is made to resolve the file that's linked to. This is
  different from the jekyll-relative-links plugin, which _does_ resolve
  the linked file. This functionality could be added in future by
  someone who has more experience with Ruby.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-28 11:20:51 +02:00
Sebastiaan van Stijn 80c6d185e3
Only fix links on reference pages
The JavaScript "link fix" looks to be only needed for pages
where Markdown is included, and which contain relative links.

Now that we modified all local includes to use absolute links,
the only location where links are not properly generated, is
in the reference documentation.

If broken links are found elsewhere in the website, those links
are legitimately broken, and should be fixed in the markdown
source, not fixed-up afterwards.

This patch moves the javascript to the cli.md include, so that
the script is only run on the reference pages instead of on every
page.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-23 10:27:57 +02:00
Sebastiaan van Stijn f39a74da3d
_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 <github@gone.nl>
2020-04-23 10:00:48 +02:00
Sebastiaan van Stijn f48a3adc2d
_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 <github@gone.nl>
2020-04-23 10:00:46 +02:00
Sebastiaan van Stijn 3ad5c44957
_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 <github@gone.nl>
2020-04-23 10:00:44 +02:00
Sebastiaan van Stijn 66d0e68df6
_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 <github@gone.nl>
2020-04-23 10:00:42 +02:00
Sebastiaan van Stijn c48c971d93
_includes/cli.md: remove special case for base command
The base command didn't have a description in the YAML file.
Instead of fixing that up in the template, this was fixed upstream.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-20 15:38:52 +02:00
Ashwin Maroli 02d087c63a
Stash computed data in a Liquid variable (#10462)
* Stash computed data in a variable

To avoid computing `site.data[include.datafolder][include.datafile]` multiple times for the same context.

* Revert change to hard-tab whitespace
2020-03-20 13:08:19 +00:00
Sebastiaan van Stijn e6a8b7e5e4
Reference: add anchor-link to examples section
Some commands provide a long list of options, which may
"hide" the examples section. To help discoverability, add
an anchor-link to the examples section (if present).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-16 13:13:51 +01:00
Sebastiaan van Stijn 252db13907
Reference: move "extended description" above "options"
The extended description usually provides a good introduction to
the command, which likely is useful to read before heading to
more detailed information (such as "which options does this command
have")

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-16 13:09:27 +01:00
Sebastiaan van Stijn a76cbe68a7
Reference: move "parent", "child", and "related" commands to bottom
For some commands, the list of "related" commands is lenghty, therefore
hiding the extended description and examples below the fold, which is
not ideal.

This patch moves the "parent command", "child commands", and "related
commands" sections to the bottom of the page.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-16 13:06:48 +01:00
Sebastiaan van Stijn 8b53965237 Commandline reference: add note to "enterprise only" subcommands (#10008)
* Update CLI template for "enterprise-only" commands/plugins

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

* reference: mark "assemble" subcommands as enterprise-only

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

* reference: mark "cluster" subcommands as enterprise-only

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

* reference: mark "registry" subcommands as enterprise-only

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

* reference: mark "template" subcommands as enterprise-only

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-12-11 15:48:32 +00:00
Adrian Plata e7360acc79
Pointing to new experimental information section (#9569)
Signed-off-by: Adrian Plata <adrian.plata@docker.com>
2019-10-03 13:08:12 -07:00
Adrian Plata fc4d3872c4 Emphasizing no production environments for experimental features
Signed-off-by: Adrian Plata <adrian.plata@docker.com>
2019-09-27 10:50:22 -07:00
Adrian Plata 972d1929bd simply the experimental box
Signed-off-by: Adrian Plata <adrian.plata@docker.com>
2019-09-18 14:35:33 -07:00
Adrian Plata f2f0dca20c
Fixing broken sidebar (#9425)
Signed-off-by: Adrian Plata <adrian.plata@docker.com>
2019-09-10 13:24:40 -07:00
Maria Bermudez 9d7f9646d9
Add experimental note on Registry CLI reference pages (#1132) 2019-06-10 13:50:06 -07:00
Misty Stanley-Jones f688179d86
Add features to CLI ref template (#5736)
* Add features to CLI ref template

- Differentiate CLI experimental from daemon experimental
- When the whole command is experimental, point to docs for
  how to get it to show up
- Make badges links where possible
- Add tooltips to badges for more context
- Document in the test.md how to make badges into links and how to use tooltips
2018-01-16 12:02:10 -08:00
Misty Stanley-Jones 95d7ea7418 Update CLI template to add badges for orchestrator and experimentalcli 2018-01-11 16:39:12 -08:00
John Mulhausen 024ae953ba Fixes #4041 2017-10-13 15:16:11 -07:00
Misty Stanley-Jones acda699725 Don't print defaults from the YAML in cases where the meaning is really 'default to unset' (#4813) 2017-10-05 16:02:49 -07:00
Misty Stanley-Jones 7c800e7054 Tweak formatting of options tables (#4730) 2017-09-29 17:38:46 -07:00
Misty Stanley-Jones 0975a5c5ab Add info about deprecated and experimental options to CLI template (#4711) 2017-09-26 20:49:43 -07:00
Misty Stanley-Jones 10be60a80f Go back to small /edge (#2736)
* Go back to small /edge

* Update site front page

Add info about Editions
Reorganize components
Update headings

* Move logic of fetching content to a script

* Add v1.28 API

* Add info about versioned API
2017-04-13 18:58:56 -07:00
Misty Stanley-Jones b3ca1d6120 Add 17.04 CLI refs
Also adjust CLI stub pages and cli.md to look in a different
data folder for edge releases
2017-04-05 17:45:44 -07:00
Misty Stanley-Jones 77701141a0 Fix the template not to include Related Commands section for dockerd (#2287) 2017-03-13 14:55:57 -07:00
French Ben ff0e184ef3 Added examples parsing to liquid template
Signed-off-by: French Ben <frenchben@docker.com>
2017-02-14 14:47:44 -08:00
John Mulhausen 232ab64c09 Support for related commands in CLI 2017-01-31 18:52:24 -08:00
John Mulhausen 35898701eb YAML-sourced CLI refdocs 2017-01-19 11:12:55 -08:00