From 22c7b30cc37b20095b9f5b90d5e68e921be05ee6 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Mon, 21 Oct 2024 18:03:04 +0200 Subject: [PATCH 1/6] ci: upgrade hugo to v0.136.3 https://github.com/gohugoio/hugo/releases/tag/v0.136.3 Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- .dockerignore | 1 + Dockerfile | 22 ++++++++++------------ netlify.toml | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.dockerignore b/.dockerignore index 6584adec5f53..24fffe8d3b34 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,6 +2,7 @@ .github .gitignore .idea +.hugo_build.lock _releaser CONTRIBUTING.md Dockerfile diff --git a/Dockerfile b/Dockerfile index 199c5e414305..0489b3ef6498 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,11 +8,10 @@ ARG GO_VERSION=1.23 # HTMLTEST_VERSION sets the wjdp/htmltest version for HTML testing ARG HTMLTEST_VERSION=0.17.0 # HUGO_VERSION sets the version of Hugo to build the site with -ARG HUGO_VERSION=0.136.2 +ARG HUGO_VERSION=0.136.3 # build-base is the base stage used for building the site FROM ghcr.io/gohugoio/hugo:v${HUGO_VERSION} AS build-base -USER root ENV NODE_ENV="production" RUN --mount=source=package.json,target=package.json \ --mount=source=package-lock.json,target=package-lock.json \ @@ -26,8 +25,7 @@ FROM build-base AS build ARG HUGO_ENV="development" # DOCS_URL sets the base URL for the site ARG DOCS_URL="https://docs.docker.com" -RUN --mount=type=cache,target=/cache \ - hugo --gc --minify -d /out -e $HUGO_ENV -b $DOCS_URL +RUN hugo --gc --minify -e $HUGO_ENV -b $DOCS_URL # lint lints markdown files FROM davidanson/markdownlint-cli2:v0.14.0 AS lint @@ -41,7 +39,7 @@ RUN --mount=type=bind,target=. \ # test validates HTML output and checks for broken links FROM wjdp/htmltest:v${HTMLTEST_VERSION} AS test WORKDIR /test -COPY --from=build /out ./public +COPY --from=build /project/public ./public ADD .htmltest.yml .htmltest.yml RUN htmltest @@ -76,12 +74,12 @@ ARG UPSTREAM_REPO ARG UPSTREAM_COMMIT # HUGO_MODULE_REPLACEMENTS is the replacement module for the upstream project ENV HUGO_MODULE_REPLACEMENTS="github.com/${UPSTREAM_MODULE_NAME} -> github.com/${UPSTREAM_REPO} ${UPSTREAM_COMMIT}" -RUN hugo --ignoreVendorPaths "github.com/${UPSTREAM_MODULE_NAME}" -d /out +RUN hugo --ignoreVendorPaths "github.com/${UPSTREAM_MODULE_NAME}" # validate-upstream validates HTML output for upstream builds FROM wjdp/htmltest:v${HTMLTEST_VERSION} AS validate-upstream WORKDIR /test -COPY --from=build-upstream /out ./public +COPY --from=build-upstream /project/public ./public ADD .htmltest.yml .htmltest.yml RUN htmltest @@ -96,9 +94,9 @@ EOT # path-warnings checks for duplicate target paths FROM build-base AS path-warnings -RUN hugo --printPathWarnings > /path-warnings.txt +RUN hugo --printPathWarnings > ./path-warnings.txt RUN < Date: Mon, 28 Oct 2024 15:55:48 +0100 Subject: [PATCH 2/6] site: move theme switch to footer Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- hugo_stats.json | 3 ++- layouts/partials/footer.html | 25 ++++++++++++++++++++++++- layouts/partials/header.html | 9 --------- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/hugo_stats.json b/hugo_stats.json index 6e834ec7466c..2b84aceb2c49 100644 --- a/hugo_stats.json +++ b/hugo_stats.json @@ -41,6 +41,7 @@ "Docker-Compose", "Docker-Desktop", "Docker-Hub", + "Docker-Scout-Dashboard", "Download", "Editor-or-IDE", "Entra-ID", @@ -86,6 +87,7 @@ "Node", "Non-compliant", "Okta", + "Okta-SAML", "Old-Dockerfile", "PHP", "PowerShell", @@ -479,7 +481,6 @@ "space-y-4", "sticky", "svg-container", - "svg-icon", "syntax-light", "systemd-networkd", "text-2xl", diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 575f88242b1f..7591a1738f84 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -62,10 +62,33 @@ >Legal -
+
+
+ Theme: + +
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 3d8e1bec5333..fa19c18ca1f1 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -37,15 +37,6 @@ Ask AI AI Stars - - From 93f816efbb5b149604b0792572942bccd21ab80c Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:04:40 +0100 Subject: [PATCH 3/6] site: use condensed header logo on small screens Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- assets/images/docker-docs-white-condensed.svg | 4 ++++ hugo_stats.json | 1 + layouts/partials/header.html | 5 ++++- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 assets/images/docker-docs-white-condensed.svg diff --git a/assets/images/docker-docs-white-condensed.svg b/assets/images/docker-docs-white-condensed.svg new file mode 100644 index 000000000000..db5206c25d8b --- /dev/null +++ b/assets/images/docker-docs-white-condensed.svg @@ -0,0 +1,4 @@ + + + + diff --git a/hugo_stats.json b/hugo_stats.json index 2b84aceb2c49..e72886d318fe 100644 --- a/hugo_stats.json +++ b/hugo_stats.json @@ -471,6 +471,7 @@ "self-start", "shadow", "shadow-lg", + "sm:block", "sm:flex", "sm:flex-row", "sm:hidden", diff --git a/layouts/partials/header.html b/layouts/partials/header.html index fa19c18ca1f1..dbe0283041d2 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -10,9 +10,12 @@
{{/* main logo */}} -
+ +
+ {{- (resources.Get "images/docker-docs-white-condensed.svg").Content | safe.HTML -}} +