Hidden smoketest page¶
Use this page to test your changes and ensure that there are not any issues, unwanted behaviors, or regression that are caused by your changes.
Below are a set of site elements that have causes issues in the past.
Lists¶
- Top level:
- A nested list item.
- another level lower
- Nested code sample:
Syntax:{{< readfile file="../community/samples/serving/helloworld-java-quarkus/service.yaml" code="true" lang="yaml" >}}
Example: {{< readfile file="../community/samples/serving/helloworld-java-quarkus/service.yaml" code="true" lang="yaml" >}} - This should be the third bullet (3.).
- More nested code:
Shortcode:{{< readfile file="/serving/samples/hello-world/helloworld-go/Dockerfile" code="true" lang="go" >}}
Example: {{< readfile file="./serving/samples/hello-world/helloworld-go/Dockerfile" code="true" lang="go" >}} - Another nested ordered list item (2.)
- More nested code:
Code samples¶
The following use the
readfile shortcode
Shortcode: {
renders as:
{{< readfile file="../hack/reference-docs-gen-config.json" code="true" lang="json" >}}{< readfile file="../hack/reference-docs-gen-config.json" code="true" lang="json" >}}
Shortcode: {
renders as:
{{< readfile file="./serving/samples/cloudevents/cloudevents-nodejs/service.yaml" code="true" lang="yaml" >}}{< readfile file="./serving/samples/cloudevents/cloudevents-nodejs/service.yaml" code="true" lang="yaml" >}}
Install version numbers and Clone branch commands¶
Examples of how the manual and dynamic version number or branch name can be
added in-line with the
version shortcode
(uses the define values from
config/_default/params.toml)
- Shortcode:
{renders as: {{< version >}}{< version >}}
Example:
kubectl apply version/{{< version >}}/is-the-latest/docs-version.yaml
- Shortcode:
{renders as: {{< version override="v0.2.2" >}}{< version override="v0.2.2" >}}
Example:
kubectl apply the-version-override/{{< version override="v0.2.2" >}}/is-manually-specified.yaml
- Shortcode:
{renders as: {{< version patch=".20" >}}{< version patch=".20" >}}
Example:
kubectl apply this-is-a-point-release/{{< version patch=".20" >}}/filename.yaml
- Shortcode:
{renders as: {{ branch }}{< branch >}}
Example:
git clone -b "{{ branch }}" https://github.com/knative/docs knative-docs
- Shortcode:
{renders as: {{< branch override="release-0.NEXT" >}}{< branch override="release-0.NEXT" >}}
Example:
git clone -b "{{< branch override="release-0.NEXT" >}}" https://github.com/knative/docs knative-docs
Tabs¶
How to include tabbed content in your page. Note that you can set a default tab.
{{< tab name="Regular example" >}}
This is a regular example tab.
{{< tab name="Include example" >}}
{{% readfile file="./serving/samples/multi-container/service.yaml" code="true" lang="yaml" %}}