Commit Graph

414 Commits

Author SHA1 Message Date
David Karlsson 6aced2fc9d build(deps): remove refactor nodejs dependencies
Separate dev dependencies like prettier to prevent them from being
installed to build the site, unnecessarily.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-02-01 09:44:56 +01:00
David Karlsson a1102d1a35 build(deps): use prebuilt hugo binary, add gcompat
Fetching the prebuilt hugo binary is faster than `go install`.
Also switching to the extended version.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-01-31 22:23:30 +01:00
David Karlsson 6da0b60ccc build(deps): upgrade markdownlint-cli2 to v0.12.1
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-01-31 22:06:55 +01:00
David Karlsson 55daaf94a6 build(deps): upgrade hugo to v0.122.0
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-01-31 22:01:23 +01:00
Sebastiaan van Stijn 6728abcd38
Dockerfile: fix duplicate WORKDIR, and source COPY for update-modules stage
I noticed that building the "vendor" target was copying the source twice;
once in the "build-base" stage, and once in the "update-modules" stage:

    docker buildx bake --set vendor.args.MODULE=github.com/docker/cli vendor
    ...
    => [build-base 1/3] COPY --from=hugo /go/bin/hugo /bin/hugo                 0.2s
    => [build-base 2/3] COPY --from=node /src/node_modules /src/node_modules    1.6s
    => [build-base 3/3] COPY . .                                                3.1s
    => [update-modules 1/4] WORKDIR /src                                        0.0s
    => [update-modules 2/4] COPY . .                                            5.0s
    => [update-modules 3/4] RUN hugo mod get -u                                14.1s
    => [update-modules 4/4] RUN hugo mod vendor                                17.3s

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-11 22:46:07 +01:00
David Karlsson 1fdb2e77d4 fix: broken glob path for lint job
Linting was only running on a subset of our Markdown files in `content`.
This change fixes the glob path, and adds appropriate exclude paths.
Because the glob pattern was incorrect before, we had lots of files that
didn't comply with the linting rules. This commit also fixes those
issues.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-11-04 10:50:02 +01:00
David Karlsson 18cdb02ece lint: pin markdownlint-cli2 version to v0.10.0
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-11-04 10:50:02 +01:00
David Karlsson ae5350af10 ci: fix validate-upstream workflow
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-10-16 17:25:10 +02:00
David Karlsson b758af9775 lint: add check for missing link definitions
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-09-16 21:41:48 +02:00
David Karlsson 1b8a23cfdd
Merge pull request #18008 from dvdksn/modules-vendor-bake
chore: add vendor target for bake
2023-08-23 20:25:59 +02:00
David Karlsson 9543cd0db5 chore: add vendor target for bake
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-08-23 16:23:00 +02:00
David Karlsson c379bec61b contribute: update to use compose watch
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-08-23 15:42:54 +02:00
David Karlsson 0609289f6e release: dont use absolute path to hugo binary
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-08-22 21:51:03 +02:00
David Karlsson f0eed66f76 release: force npm cache clean
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-08-22 21:50:37 +02:00
David Karlsson a0d21ade2f migrate to hugo
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-08-22 09:41:02 +02:00
Guillaume Lours b92ebe5fbf
Replace docker-compose calls (#17881)
* use 'docker compose' instead of 'docker-compose' in Swarm documentation

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>

* replace old usages of 'docker-compose' by 'docker compose'

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>

---------

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-08-08 10:05:39 +01:00
David Karlsson 2d44be0fc0 ci: replace htmlproofer with wjdp/htmltest
Signed-off-by: David Karlsson <david.karlsson@docker.com>
2023-04-12 15:38:51 +02:00
CrazyMax 27f7130024
Dockerfile: remove htmlproofer workaround for buildx_build
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-13 15:25:37 +01:00
Sebastiaan van Stijn a7b9985e00
engine: update reference docs (yaml), and fix anchor links
The updated version uses new anchors for flags, so updates are needed
elsewhere to update those anchors.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-09 10:29:43 +01:00
Sebastiaan van Stijn e19b56d856
htmlproofer: temporarily exclude engine/commandline/cli
This page will be updated once the associated PR in docker/cli is merged.
Excluding it until then.

    Running ["LinkCheck", "ImageCheck", "ScriptCheck"] on ["./_site"] on *.html...

    Ran on 2173 files!

    - ./_site/engine/reference/commandline/cli/index.html
      *  linking to internal hash #format-the-output that does not exist (line 314)
         <a href="/engine/reference/commandline/config_ls/#format-the-output"><strong>format the output</strong> section in the  documentation</a>
      *  linking to internal hash #format-the-output that does not exist (line 318)
         <a href="/engine/reference/commandline/images/#format-the-output"><strong>format the output</strong> section in the  documentation</a>
      *  linking to internal hash #format-the-output that does not exist (line 334)
         <a href="/engine/reference/commandline/secret_ls/#format-the-output"><strong>format the output</strong> section in the  documentation</a>
      *  linking to internal hash #formatting that does not exist (line 326)
         <a href="/engine/reference/commandline/plugin_ls/#formatting"><strong>formatting</strong> section in the  documentation</a>
      *  linking to internal hash #formatting that does not exist (line 322)
         <a href="/engine/reference/commandline/node_ls/#formatting"><strong>formatting</strong> section in the  documentation</a>
      *  linking to internal hash #formatting that does not exist (line 330)
         <a href="/engine/reference/commandline/ps/#formatting"><strong>formatting</strong> section in the  documentation</a>
      *  linking to internal hash #formatting that does not exist (line 338)
         <a href="/engine/reference/commandline/service_inspect/#formatting"><strong>formatting</strong> section in the  documentation</a>
      *  linking to internal hash #formatting that does not exist (line 342)
         <a href="/engine/reference/commandline/service_ls/#formatting"><strong>formatting</strong> section in the  documentation</a>
      *  linking to internal hash #formatting that does not exist (line 346)
         <a href="/engine/reference/commandline/stats/#formatting"><strong>formatting</strong> section in the  documentation</a>

    HTML-Proofer found 9 failures!

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-07 13:41:19 +01:00
Sebastiaan van Stijn 1af8b42db8
htmlproofer: temporarily exclude buildx build
The buildx build docs refers to anchors that are being updated,
but are maintained in a separate repository; exclude that page
from the validator until the anchor changes are live and the
buildx docs updated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-07 13:41:16 +01:00
CrazyMax df4abc6472
jekyll: enforce ruby platform to compile gems with native extensions from source
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-11-04 19:16:13 +01:00
CrazyMax 4544982b55
jekyll(last_modified_at): fix for remote resources and data files (#15998)
* Dockerfile: add option to enforce git log history for local dev

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>

* jekyll(last_modified_at): do not override if already set with frontmatter

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>

* jekyll(last_modified_at): use data files for commands reference instead of stub file

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>

* fix broken links

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-31 09:01:42 +01:00
CrazyMax 0001d960fa
Merge pull request #15267 from crazy-max/fix-sitemap-lastmod
jekyll: fix sitemap lastmod
2022-10-26 19:55:23 +02:00
CrazyMax 06908b36f5
jekyll: use git to fetch remote resources
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-26 06:12:36 +02:00
Craig Osterhout 2551e2481a
Update Dockerfile
Attempt to fix deploy issue
2022-10-25 15:25:44 -07:00
CrazyMax 897e77c647
add hotjar for staging environment
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-25 20:21:47 +02:00
David Karlsson 8f77e55567 rename master -> main 2022-10-19 15:52:14 +02:00
CrazyMax 561118ec5b
rename docs repository
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-09-29 11:07:53 +02:00
Justin Chadwell ebd4a33866 Add linting information to CONTRIBUTING.md
This adds information on how the docs use linting, and more detailed
instructions on how to enable it in an IDE, using VSCode as a concrete
and widespread example.

Additionally, to do this, we add a duplicate style config for
markdownlint in JSON format for the Node.js implementation of
markdownlint that is used by various editor plugins. These both
implement the same core set of warnings, and appear to function
identically.
2022-08-03 09:58:01 +01:00
Justin Chadwell 0fb1ca91e6 ci: add annotations for mdl and htmlproofer
Add GitHub Actions annotations that will appear in the CI checks - this
should make it easier to see the reasons for the linting failures,
without needing to deep dive into the logs.
2022-08-03 09:58:01 +01:00
Usha Mandya dfa7fc3b8e
Merge pull request #15227 from jedevc/linting-fixup
Fix linting 🎉
2022-08-02 17:35:10 +01:00
CrazyMax d2fca0eb8e
jekyll: move relative URLs fix from Dockerfile to Jekyll plugin
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-28 21:17:02 +02:00
CrazyMax 614c4a7000
jekyll: enable sitemap and local search for dev environment
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-28 19:30:46 +02:00
CrazyMax 01a9362d76
jekyll: fix not expanded DOMAIN env
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-28 15:37:04 +02:00
Justin Chadwell 82c7362754 lint: fix linting to base state 2022-07-28 11:27:10 +01:00
CrazyMax 9c296afa3e
switch to ruby markdownlint and add ci validation
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-25 12:17:09 +02:00
CrazyMax 76ab23f915
Bump ruby from 2.6.10 to 2.7.6
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-25 01:03:35 +02:00
CrazyMax 2120bd105d
jekyll: create plugin to update api toc
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-18 18:20:31 +02:00
CrazyMax b65866f2a6
jekyll: create plugin to fetch remote resources
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-18 18:20:31 +02:00
CrazyMax 8da7d9445d
dockerfile: containerized htmlproofer
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-13 22:07:58 +02:00
CrazyMax ebd36f7081
dockerfile: enhanced to match netlify pipeline
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-13 22:07:57 +02:00
Guillaume Tardif 82f77a9064
Include extensions-sdk docs from upstream repo (#14658)
* First inclusion of extensions-sdk docs from upstream repo

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>

* Mark extension as Beta, not Preview

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2022-05-04 12:44:44 +01:00
Sebastiaan van Stijn 688134003d
Use 20.10 release branch for upstream engine resources
The 20.10 release branch now exists, and "master" will be used for
Docker Engine 21.xx development.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-25 12:54:54 +01:00
Guillaume Tardif cd5bc70940 Include ACI/ECS reference docs from compose-cli and make them easier to find for docker users
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-04 16:16:12 +01:00
Sebastiaan van Stijn 3ed7250644
Update engine reference for 20.10 release
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-12-09 00:50:04 +01:00
Sebastiaan van Stijn 332ce64398
Disable search auto-complete in development environment
As we don't generate a metadata.json, auto-complete is non-functional,
so disabling the script for previews.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-23 15:22:55 +02:00
Sebastiaan van Stijn 9b79a27ab4
Dockerfile: output Jekyll profile information
Also skip updating sitemap.xml for the development environment.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-23 13:35:12 +02:00
Sebastiaan van Stijn 5a1ae8310f
Separate "development" and "production" configurations
This patch updates the default configuration to match a "development"
situation, and introduces build-options to produce a "production"
build.

By default (dev environment):

- Google Analytics / GTM and PollDaddy are disabled
- SASS builds non-minified stylesheets (for easier readabililty)
- Excludes "enterprise" stubs

Building a "production" build locally is still possible by overriding
the `JEKYLL_ENV` build-arg;

    JEKYLL_ENV=production docker-compose  up --build

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-22 15:41:15 +02:00
Sebastiaan van Stijn cafd5a9943
Use full URLs for canonical links
Canonical links are expected to be full URLs, not relative.

For this to work, the Dockerfile had to be updated, because we're stripping
the domain-name from links ("<a href..."), but the script currently also included
"<link rel='canonical' .." tags.

With the change, canonical links are left alone;

These hrefs will be replaced

    echo '<a class=foo href="https://docs.docker.com/foo">hello</a>' | sed -e 's#\(<a[^>]* href="\)https://docs.docker.com/#\1/#g'
    # <a class=foo href="/foo">hello</a>
    echo '<a href="https://docs.docker.com/foo">hello</a>' | sed -e 's#\(<a[^>]* href="\)https://docs.docker.com/#\1/#g'
    # <a href="/foo">hello</a>

But, for example, this one is left alone

    echo '<link rel="canonical" href="https://docs.docker.com/foo/bar" />' | sed -e 's#\(<a[^>]* href="?\)https://docs.docker.com/#\1/#g'
    # <link rel="canonical" href="https://docs.docker.com/foo/bar" />

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-12 13:09:32 +02:00