diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a77a80dba0..67e06543ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,6 +56,8 @@ jobs: - test - unused-media - test-go-redirects + - dockerfile-lint + - path-warnings steps: - name: Checkout diff --git a/Dockerfile b/Dockerfile index 7ede5d3832..9a13c04f58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ # syntax=docker/dockerfile-upstream:master +# check=skip=InvalidBaseImagePlatform # ALPINE_VERSION sets the Alpine Linux version for all Alpine stages ARG ALPINE_VERSION=3.20 @@ -20,7 +21,7 @@ RUN npm install # hugo downloads and extracts the Hugo binary FROM base AS hugo -ARG HUGO_VERSION=0.127.0 +ARG HUGO_VERSION=0.132.0 ARG TARGETARCH WORKDIR /tmp/hugo RUN wget -O "hugo.tar.gz" "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${TARGETARCH}.tar.gz" @@ -44,7 +45,7 @@ ARG DOCS_URL RUN hugo --gc --minify -d /out -e $HUGO_ENV -b $DOCS_URL # lint lints markdown files -FROM davidanson/markdownlint-cli2:v0.12.1 AS lint +FROM davidanson/markdownlint-cli2:v0.13.0 AS lint USER root RUN --mount=type=bind,target=. \ /usr/local/bin/markdownlint-cli2 \ @@ -108,6 +109,18 @@ set -ex ./scripts/test_unused_media.sh EOT +# path-warnings checks for duplicate target paths +FROM build-base AS path-warnings +RUN hugo --printPathWarnings > /path-warnings.txt +RUN < This means that your users must use SSO to sign in, instead of a username and password. > When you enforce sign-in and enforce SSO, your users must sign in and must use SSO to do so. > See [Enforce SSO](/security/for-admins/single-sign-on/connect#optional-enforce-sso) for details on how to enable this for your SSO connection. -{ .tip } \ No newline at end of file +{ .tip } diff --git a/docker-bake.hcl b/docker-bake.hcl index e6a2bad99e..8a556ea2aa 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -32,7 +32,7 @@ target "release" { } group "validate" { - targets = ["lint", "test", "unused-media", "test-go-redirects"] + targets = ["lint", "test", "unused-media", "test-go-redirects", "dockerfile-lint", "path-warnings"] } target "test" { @@ -59,6 +59,15 @@ target "test-go-redirects" { provenance = false } +target "dockerfile-lint" { + call = "check" +} + +target "path-warnings" { + target = "path-warnings" + output = ["type=cacheonly"] +} + # # releaser targets are defined in _releaser/Dockerfile # and are used for AWS S3 deployment diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7805db93e0..4c94986643 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -12,7 +12,7 @@ {{ partial "guides-stepper.html" . }} {{ end }}
- {{ partial "pagemeta.html" . }} + {{ partialCached "pagemeta.html" . . }}
{{ .Content }} diff --git a/layouts/partials/aside.html b/layouts/partials/aside.html index c08cc49436..839f549679 100644 --- a/layouts/partials/aside.html +++ b/layouts/partials/aside.html @@ -1,6 +1,6 @@ diff --git a/layouts/shortcodes/build-feature-state.html b/layouts/shortcodes/build-feature-state.html deleted file mode 100644 index 886e90fa04..0000000000 --- a/layouts/shortcodes/build-feature-state.html +++ /dev/null @@ -1,2 +0,0 @@ -> This feature is supported in BuildKit version `{{ .Get "buildkit_v" }}` -> and Buildx version `{{ .Get "buildx_v" }}`. diff --git a/layouts/shortcodes/introduced.html b/layouts/shortcodes/introduced.html index 60b62dcfe4..3ae8298be4 100644 --- a/layouts/shortcodes/introduced.html +++ b/layouts/shortcodes/introduced.html @@ -41,18 +41,16 @@ Depends on site.Params.min_version_thresholds and i18n strings for component IDs {{ end }} {{ end }} {{- if $versionAboveThreshold }} -
- {{ partial "icon.html" "chevron_right" }} - Introduced in {{ T $component }} version - {{- if $link }} - {{ page.RenderString (fmt.Printf `[%s](%s)` $v $link) }} - {{- else }} - {{ $v }} - {{- end }} - -
- {{- else }} - {{ warnf "[introduced] version below threshold: %s %s %v" $component $v $pos }} +
+ {{ partialCached "icon.html" "chevron_right" "chevron_right" }} + Introduced in {{ T $component }} version + {{- if $link }} + {{ page.RenderString (fmt.Printf `[%s](%s)` $v $link) }} + {{- else }} + {{ $v }} + {{- end }} + +
{{- end }} {{- else }} {{ errorf "[introduced] invalid component: %s %v" $component $pos }} diff --git a/layouts/shortcodes/siblings.html b/layouts/shortcodes/siblings.html deleted file mode 100644 index 619f97f3e3..0000000000 --- a/layouts/shortcodes/siblings.html +++ /dev/null @@ -1,13 +0,0 @@ -{{/* Links to pages in the same section that also contain this shortcode */}} -