Skip to content

Commit

Permalink
Deployed 1daec10 to master with MkDocs 1.5.2 and mike 1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 14, 2023
1 parent 45070f1 commit f12dff0
Show file tree
Hide file tree
Showing 8 changed files with 2,137 additions and 196 deletions.
30 changes: 28 additions & 2 deletions master/hack/gen-api-reference-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ REFDOCS_REPO="https://${REFDOCS_PKG}.git"
REFDOCS_VER="v0.3.0"

KSERVE_REPO="github.com/kserve/kserve"
KSERVE_IMPORT_PATH="kserve.io/v1beta1"
KSERVE_IMPORT_PATH="kserve.io/serving"
KSERVE_COMMIT="${KSERVE_COMMIT:?specify the \$KSERVE_COMMIT variable}"
KSERVE_OUT_FILE="api.md"

Expand Down Expand Up @@ -130,7 +130,33 @@ main() {
clone_at_commit "https://${KSERVE_REPO}.git" "${KSERVE_COMMIT}" \
"${kserve_root}"
gen_refdocs "${refdocs_bin}" "${template_dir}" \
"${out_dir}/${KSERVE_OUT_FILE}" "${kserve_root}" "./pkg/apis/serving/v1beta1"
"${out_dir}/v1alpha1.md" "${kserve_root}" "./pkg/apis/serving/v1alpha1"
gen_refdocs "${refdocs_bin}" "${template_dir}" \
"${out_dir}/v1beta1.md" "${kserve_root}" "./pkg/apis/serving/v1beta1"

v1alpha1_doc="${out_dir}/v1alpha1.md"
v1beta1_doc="${out_dir}/v1beta1.md"

# Remove first 6 lines which contains packages list
sed -i '1,6d' "$v1alpha1_doc"
sed -i '1,6d' "$v1beta1_doc"

# Add the modified packages list to output file
cat <<EOF > "${out_dir}/${KSERVE_OUT_FILE}"
<p>Packages:</p>
<ul>
<li>
<a href="#serving.kserve.io/v1alpha1">serving.kserve.io/v1alpha1</a>
</li>
<li>
<a href="#serving.kserve.io/v1beta1">serving.kserve.io/v1beta1</a>
</li>
</ul>
EOF

# Append the v1alpha and v1beta1 docs to the output file
cat "${v1alpha1_doc}" >> "${out_dir}/${KSERVE_OUT_FILE}"
cat "${v1beta1_doc}" >> "${out_dir}/${KSERVE_OUT_FILE}"

cp "${out_dir}/${KSERVE_OUT_FILE}" "$SCRIPTDIR/../reference/${KSERVE_OUT_FILE}"
go clean -modcache
Expand Down
16 changes: 14 additions & 2 deletions master/hack/reference-docs-gen-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
"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.22/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}"
"docsURLTemplate": "https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}"
},
{
"typeMatchPrefix": "^knative\\.dev/pkg/apis/duck",
Expand All @@ -19,14 +23,22 @@
"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": "^knative\\.dev/serving/pkg/apis/serving/v1",
"docsURLTemplate": "https://pkg.go.dev/knative.dev/serving/pkg/apis/serving/v1#TrafficTarget"
},
{
"typeMatchPrefix": "^time\\.Duration$",
"docsURLTemplate": "https://golang.org/pkg/time/#Duration"
}
],
"typeDisplayNamePrefixOverrides": {
"k8s.io/api/": "Kubernetes ",
"k8s.io/apimachinery/pkg/apis/": "Kubernetes "
},
"markdownDisabled": false
}
}
Loading

0 comments on commit f12dff0

Please sign in to comment.