From 66fe31037b14c489cd36c5f471a50b9d34aed394 Mon Sep 17 00:00:00 2001 From: Nic Cope Date: Wed, 1 Nov 2023 10:33:22 -0700 Subject: [PATCH] Link to latest docs This seems like the most future-proof option for this guide, which lives outside of any version. Signed-off-by: Nic Cope --- .../guides/write-a-composition-function-in-go.md | 16 ++++++++-------- utils/htmltest/.htmltest.yml | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/content/knowledge-base/guides/write-a-composition-function-in-go.md b/content/knowledge-base/guides/write-a-composition-function-in-go.md index 4521885d3..df60d7a3d 100644 --- a/content/knowledge-base/guides/write-a-composition-function-in-go.md +++ b/content/knowledge-base/guides/write-a-composition-function-in-go.md @@ -11,7 +11,7 @@ Composition functions (or just functions, for short) are custom programs that template Crossplane resources. Crossplane calls composition functions to determine what resources it should create when you create a composite resource (XR). Read the -[concepts]({{}}) +[concepts](/latest/concepts/composition-functions) page to learn more about composition functions. You can write a function to template resources using a general purpose @@ -22,7 +22,7 @@ conditionals. This guide explains how to write a composition function in {{< hint "important" >}} It helps to be familiar with -[how composition functions work]({{}}) +[how composition functions work](/latest/concepts/composition-functions#how-composition-functions-work) before following this guide. {{< /hint >}} @@ -69,8 +69,8 @@ To write a function in Go you need: * [Go](https://go.dev/dl/) 1.21 or newer. The guide uses Go 1.21. * [Docker Engine](https://docs.docker.com/engine/). This guide uses Engine v24. -* The [Crossplane CLI](https://github.com/crossplane/docs/pull/584) v1.14 or - newer. This guide uses Crossplane CLI v1.14. +* The [Crossplane CLI](/latest/cli) v1.14 or newer. This guide uses Crossplane + CLI v1.14. You don't need access to a Kubernetes cluster or a Crossplane control plane to build or test a composition function. @@ -132,7 +132,7 @@ should delete the `input` and `package/input` directories. The `input` directory defines a Go struct that a function can use to take input, using the `input` field from a Composition. The -[composition functions]({{}}) +[composition functions](/latest/concepts/composition-functions) documentation explains how to pass an input to a composition function. The `package/input` directory contains an OpenAPI schema generated from the @@ -732,7 +732,7 @@ spec: {{}} Read the composition functions documentation to learn more about -[testing composition functions]({{}}). +[testing composition functions](/latest/composition-functions#test-a-composition-that-uses-functions). {{}} ## Build and push the function to a package registry @@ -749,7 +749,7 @@ then pushing all the packages to a single tag in the registry. Pushing your function to a registry allows you to use your function in a Crossplane control plane. See the -[composition functions documentation]({{}}). +[composition functions documentation](/latest/concepts/composition-functions). to learn how to use a function in a control plane. Use Docker to build a runtime for each platform. @@ -800,7 +800,7 @@ crossplane xpkg build \ {{}} Crossplane packages are special OCI images. Read more about packages in the -[packages documentation]({{}}). +[packages documentation](/latest/concepts/packages). {{}} Push both package files to a registry. Pushing both files to one tag in the diff --git a/utils/htmltest/.htmltest.yml b/utils/htmltest/.htmltest.yml index 5fa2bf1ec..a9cc967f8 100644 --- a/utils/htmltest/.htmltest.yml +++ b/utils/htmltest/.htmltest.yml @@ -8,3 +8,4 @@ IgnoreURLs: - "www.googletagmanager.com/*" # Ignore google tag manager - "twitter.com/*" # Ignore twitter links since they send to login page - "https://releases.crossplane.io/stable/current/bin" # S3 bucket listing always returns 404 status even with directory listing + - "docs.crossplane.io/latest/*" # Allow links to the latest release (e.g. from knowledge-base)