We use analytics and cookies to understand site traffic. Information about your use of our site is shared with Google for that purpose. Learn more.
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:
Shortcode:{
{< readfile file="./hack/reference-docs-gen-config.json" code=“true” lang=“json” >}
}
Example:{ "hideMemberFields": [ "TypeMeta" ], "hideTypePatterns": [ "ParseError$", "List$" ], "externalPackages": [ { "typeMatchPrefix": "^k8s\\.io/apimachinery/pkg/apis/meta/v1\\.Duration$", "docsURLTemplate": "https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration" }, { "typeMatchPrefix": "^k8s\\.io/(api|apimachinery/pkg/apis)/", "docsURLTemplate": "https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}" }, { "typeMatchPrefix": "^knative\\.dev/pkg/apis/duck", "docsURLTemplate": "https://pkg.go.dev/knative.dev/pkg/apis/duck/{{arrIndex .PackageSegments -1}}#{{.TypeIdentifier}}" }, { "typeMatchPrefix": "^knative\\.dev/pkg/apis\\.URL$", "docsURLTemplate": "https://pkg.go.dev/knative.dev/pkg/apis#URL" }, { "typeMatchPrefix": "^knative\\.dev/networking/pkg/apis/networking", "docsURLTemplate": "https://pkg.go.dev/knative.dev/networking/pkg/apis/networking#{{.TypeIdentifier}}" }, { "typeMatchPrefix": "^time\\.Duration$", "docsURLTemplate": "https://golang.org/pkg/time/#Duration" } ], "typeDisplayNamePrefixOverrides": { "k8s.io/api/": "Kubernetes ", "k8s.io/apimachinery/pkg/apis/": "Kubernetes " }, "markdownDisabled": false }
- This should be the third bullet (3.).
- More nested code:
Shortcode:{
{< readfile file=“Gopkg.toml” code=“true” lang=“toml” >}
}
Example:Something's not right. The
Gopkg.toml
file was not found. - Another nested ordered list item (2.)
- More nested code:
- A nested list item.
Code samples
The following use the
readfile
shortcode
Shortcode: {
renders as:
{< readfile file="./hack/reference-docs-gen-config.json" code=“true” lang=“json” >}
}
{
"hideMemberFields": [
"TypeMeta"
],
"hideTypePatterns": [
"ParseError$",
"List$"
],
"externalPackages": [
{
"typeMatchPrefix": "^k8s\\.io/apimachinery/pkg/apis/meta/v1\\.Duration$",
"docsURLTemplate": "https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"
},
{
"typeMatchPrefix": "^k8s\\.io/(api|apimachinery/pkg/apis)/",
"docsURLTemplate": "https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}"
},
{
"typeMatchPrefix": "^knative\\.dev/pkg/apis/duck",
"docsURLTemplate": "https://pkg.go.dev/knative.dev/pkg/apis/duck/{{arrIndex .PackageSegments -1}}#{{.TypeIdentifier}}"
},
{
"typeMatchPrefix": "^knative\\.dev/pkg/apis\\.URL$",
"docsURLTemplate": "https://pkg.go.dev/knative.dev/pkg/apis#URL"
},
{
"typeMatchPrefix": "^knative\\.dev/networking/pkg/apis/networking",
"docsURLTemplate": "https://pkg.go.dev/knative.dev/networking/pkg/apis/networking#{{.TypeIdentifier}}"
},
{
"typeMatchPrefix": "^time\\.Duration$",
"docsURLTemplate": "https://golang.org/pkg/time/#Duration"
}
],
"typeDisplayNamePrefixOverrides": {
"k8s.io/api/": "Kubernetes ",
"k8s.io/apimachinery/pkg/apis/": "Kubernetes "
},
"markdownDisabled": false
}
Shortcode: {
renders as:
{< readfile file="./docs/serving/samples/cloudevents/cloudevents-nodejs/service.yaml" code=“true” lang=“yaml” >}
}
# Copyright 2020 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: cloudevents-nodejs
namespace: default
spec:
template:
spec:
containers:
- image: <registry/repository/image:tag>
# Uncomment this to send events somewhere.
# env:
# - name: K_SINK
# value: http://default-broker.default.svc.cluster.local
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: Archives.0{< version >}
}Example:
kubectl apply version/Archives.0/is-the-latest/docs-version.yaml
-
Shortcode:
{
renders as: v0.2.2{< version override=“v0.2.2” >}
}Example:
kubectl apply the-version-override/v0.2.2/is-manually-specified.yaml
-
Shortcode:
{
renders as: Archives.20{< version patch=".20" >}
}Example:
kubectl apply this-is-a-point-release/Archives.20/filename.yaml
-
Shortcode:
{
renders as:{< branch >}
}Example:
git clone -b "" https://github.com/knative/docs knative-docs
-
Shortcode:
{
renders as: release-0.NEXT{< branch override=“release-0.NEXT” >}
}Example:
git clone -b "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.
# Copyright 2020 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: multi-container
namespace: default
spec:
template:
spec:
containers:
- image: docker.io/savita3020/servingcontainer
ports:
- containerPort: 8881
- image: docker.io/savita3020/sidecarcontainer