mirror of https://github.com/knative/docs.git
add client docs to website (#4632)
This commit is contained in:
parent
73fd6a18fb
commit
4ce29a6979
|
|
@ -223,6 +223,7 @@ nav:
|
|||
- API:
|
||||
- Serving: reference/api/serving-api.md
|
||||
- Eventing: reference/api/eventing-api.md
|
||||
- Client: reference/client/README.md
|
||||
- Concepts:
|
||||
- Duck types: reference/concepts/duck-typing.md
|
||||
- "Community":
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Knative Client Reference
|
||||
|
||||
See the [`kn` documentation]({{ clientdocs() }}){target=_blank} in Github.
|
||||
|
|
@ -72,9 +72,7 @@ fi
|
|||
# TODO copy templates, stylesheets, etc. into blog directory
|
||||
cp -r overrides blog/
|
||||
cp -r docs/images docs/stylesheets blog/docs/
|
||||
cd blog/
|
||||
mkdocs build -f mkdocs.yml -d ../site/blog
|
||||
cd -
|
||||
pushd blog; mkdocs build -f mkdocs.yml -d "$SITE/blog"; popd
|
||||
|
||||
# Handle Cookie consent
|
||||
cp -r cookie-consent/js site/
|
||||
|
|
|
|||
|
|
@ -36,3 +36,16 @@ def define_env(env):
|
|||
file=file,
|
||||
version=version,
|
||||
org=org)
|
||||
|
||||
@env.macro
|
||||
def clientdocs():
|
||||
"""Generates a link to the client docs for the current release version.
|
||||
When the version in the KNATIVE_VERSION environment variable is
|
||||
empty this links to the main branch, otherwise it links to the
|
||||
matching release in Github.
|
||||
"""
|
||||
version = os.environ.get("KNATIVE_VERSION")
|
||||
if version is None:
|
||||
return 'https://github.com/knative/client/blob/main/docs/cmd/kn.md'
|
||||
|
||||
return 'https://github.com/knative/client/blob/release-{version}/docs/cmd/kn.md'.format(version=version)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
publish = "site"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.83.1"
|
||||
NODE_VERSION= "14"
|
||||
PYTHON_VERSION = "3.8"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue