Commit Graph

26 Commits

Author SHA1 Message Date
Sebastiaan van Stijn 64a3fb82dc
docs: fix typos and version for cli-docs-tool scripts
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-17 15:25:37 +02:00
David Karlsson 8549d250f6 docs: update cli-docs-tool (v0.8.0)
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-07-04 10:28:53 +02:00
Sebastiaan van Stijn 00b0eb7781
update go-md2man to v2.0.4
full diff: https://github.com/cpuguy83/go-md2man/compare/v2.0.4...v2.0.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-18 21:47:47 +02:00
Sebastiaan van Stijn f2e98f9a93
docs: regenerate markdown
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-02-21 10:40:13 +01:00
David Karlsson e244044944 deps: update cli-docs-tool version (v0.7.0)
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-02-20 08:31:53 +01:00
David Karlsson d633890f91 docs: move base command to docker.md
CLI reference for the base command was generated to cli.md

Changed it to docker.md to handle broken links.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-01-19 14:44:35 +01:00
Sebastiaan van Stijn 3f1195e4ec
update go-md2man to v2.0.3
full diff: https://github.com/cpuguy83/go-md2man/compare/v2.0.1...v2.0.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-11 18:26:14 +02:00
Sebastiaan van Stijn 17f4c8259b
update cli-docs-tool to v0.6.0
release notes: https://github.com/docker/cli-docs-tool/releases/tag/v0.6.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-28 01:58:58 +02:00
Sebastiaan van Stijn 37f234fbe7
scripts/docs/generate-md.sh: fix location of generate code
Commit 1e3622c50c moved the generator code
to a subdirectory, but forgot to update the markdown version of this script.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-09 13:35:55 +02:00
David Karlsson 1e3622c50c docs: move doc generation scripts to subdir
Signed-off-by: David Karlsson <david.karlsson@docker.com>
2023-01-31 06:33:23 +01:00
Kevin Alvarez 79c9e527a3
docs: generate markdown
Keep frontmatter for docker, dockerd and index markdown files.
Also needs to move cli.md > docker.md before generation and
then move it back because cli.md is needed for yaml generation on docs
website: https://github.com/docker/cli/pull/3924#discussion_r1059986605

Signed-off-by: Kevin Alvarez <crazy-max@users.noreply.github.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-06 22:36:47 +01:00
Kevin Alvarez c49f1ccb49
update cli-docs-tool to v0.5.1
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-06 19:15:34 +01:00
Sebastiaan van Stijn f2566760a8
Update AUTHORS header to indicate it's generated
Using both @generated, and using Go's format for generated files,
to match the format we now use on moby/moby.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-01 10:05:22 +01:00
Sebastiaan van Stijn 6eec719d39
update cli-docs-tool to v0.5.0
release notes: https://github.com/docker/cli-docs-tool/releases/tag/v0.5.0

full diff: https://github.com/docker/cli-docs-tool/compare/v0.3.1...v0.5.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-17 16:56:44 +02:00
CrazyMax 7dc35c03fc
validate manpages target
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-25 17:11:17 +01:00
CrazyMax a650f4ddd0
switch to cli-docs-tool for yaml docs generation
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
switch to cli-docs-tool and validate yamldocs

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-25 17:11:16 +01:00
CrazyMax bea6c0d242
validate authors target
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-25 17:03:25 +01:00
Sebastiaan van Stijn c509ef7104
yamldocs: various improvements
- make sure the target directory is created if missing
- add support for custom ID's in headings through `<a>` tags (e.g.
  `<a name=heading2></a>`). This allows use of custom anchors that
  work both on GitHub (GFM doesn't support extended MarkDown), and
  in Jekyll (which does).
- add code to cleanup markdown for use in our docs:
    - remove absolute URLs to https://docs.docker.com
    - remove tabs in MarkDown, and convert them to 4 spaces. This
      prevents the YAML conversion from switching between "short"
      and "long" syntax. Tabs in code examples also don't always
      work well, so using spaces doesn't hurt for that.
- refactor some code for readability, and to be less "hacky" (still
  lots to be improved though)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-30 20:43:22 +02:00
Arnaud Rebillout 6e2607c6a6 Rename bin/md2man to bin/go-md2man
In the recent PR !2877, some code was added to check if md2man is
already installed in the build environment. This is to cater to the
needs of Linux distributions.

However it turns out that Linux distributions install md2man as
bin/go-md2man instead of bin/md2man, hence the PR !2877 doesn't help
much.

This commit fixes it by settling on using the binary name go-md2man.

For reference, here the file list of the package go-md2man in several
distributions:

- Debian: <https://packages.debian.org/sid/amd64/go-md2man/filelist>
- Ubuntu: <https://packages.ubuntu.com/hirsute/amd64/go-md2man/filelist>
- Fedora: <https://fedora.pkgs.org/31/fedora-x86_64/golang-github-cpuguy83-md2man-2.0.0-0.4.20190624gitf79a8a8.fc31.x86_64.rpm.html>
- ArchLinux: <https://www.archlinux.org/packages/community/x86_64/go-md2man/>

Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>
2020-12-16 10:20:00 +07:00
Morten Linderud 29bd82ba14
generate-man.sh: Only build md2man if it's not installed
Distributions uses generate-man.sh to create man pages, however it only
assumes a container environment and attempts to build binaries towards
`/go` which might be an illegal path in `fakeroot`.

This patch ensures we only build `md2man` from the vendored sources if
the command is not present. This allows distributions to supply thier
packaged `md2man`.

Signed-off-by: Morten Linderud <morten@linderud.pw>
2020-12-09 23:06:18 +01:00
Sebastiaan van Stijn df5cedfc81
vendor: spf13/cobra v1.0.0, go-md2man v2.0.0, blackfriday v2.0.1
full diff: https://github.com/spf13/cobra/compare/v0.0.3...v1.0.0

Notable Changes

- Fish completion (including support for Go custom completion)
- API (urgent): Rename BashCompDirectives to ShellCompDirectives
- Remove/replace SetOutput on Command - deprecated
- Custom completions coded in Go (instead of Bash)
- Partial Revert of 922
- Correct documentation for InOrStdin
- Apply formatting to templates
- Revert change so help is printed on stdout again
- Update md2man to v2.0.0
- update viper to v1.4.0
- Update cmd/root.go example in README.md

vendor: update cpuguy83/go-md2man v2.0.0

full diff: https://github.com/cpuguy83/go-md2man/compare/v1.0.8...v2.0.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-04 17:00:46 +02:00
Sebastiaan van Stijn 02e7b18fde
Add AUTHORS file and script
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-01-02 17:00:22 +01:00
Jean-Pierre Huynh 24c06c1723 Add scripts folder to shellcheck
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
2017-07-19 16:33:58 +01:00
Daniel Nephin 343d836a95 Run docs and man generation in CI
Also cleanup the scripts a bit to be more consistent, and fail on errors.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-14 14:59:48 -07:00
Tibor Vass dc81def89c fix manpages script
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-06 05:00:10 +00:00
Tibor Vass ff615dbc4d Add scripts and targets for manpages and yamldocs
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-05 19:10:44 +00:00