-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add kn client commands to the docs #4430
Comments
This is a good point. It would make sense to at least provide a link to this info in the reference section. |
The client repo already has a tool to generate reference documentation as already committed in https://github.com/knative/client/tree/main/docs/cmd and has also an option to add some frontmatter to the generated markdown (as it would have been needed for Hugo). I'm not sure which format is required for mkdocs, but the general flow to pick up the reference documentation should be triggered by the build process via the following steps:
The generated frontmatter is very rudimentary but we can customize this easily. |
I played around with this a bit today, here's my local preview: Steps that we'll need to do:
if [ "$BUILD_VERSIONS" == "no" ]; then
# Build client docs
git clone --depth 1 https://github.com/knative/client client-latest
cd client-latest
mkdir -p out/docs/cmd
go run hack/generate-docs.go out true
mv out/docs/cmd ../docs/client
cd -
# HEAD to /docs if we're not doing versioning.
mkdocs build -f mkdocs.yml -d site/docs
else That skips versioning and also doesn't play very nicely on local, since I have to keep deleting the |
@psschwei thanks a ton, looks great! If the frontmatter is not needed (as it was with Hugo), we can totally remove that part from |
Thanks for working on this @psschwei! Would you like to assign yourself to this issue? |
Thoughts on maybe combining the kn docs into a single page? Right now there's roughly 80 pages, which makes updating the navigation sidebar just a bit tricky. |
A single page might be a bit huge in size and slow to load and render ? Would it be possible to automate updating the sidebar, too ? Like using a template that is filled in by parsing the md file names ? |
I think that should be doable, although for simplicity's sake probably with the pages in alphabetical order, i.e. this
rather than in a hierarchy, as I had tried to do by hand:
|
Isn't the second list the alphabetical order ? afair, |
At least in my terminal, the sort was the former rather than the latter $ ls -1 | head
kn_broker_create.md
kn_broker_delete.md
kn_broker_describe.md
kn_broker_list.md
kn_broker.md
kn_channel_create.md
kn_channel_delete.md
kn_channel_describe.md
kn_channel_list.md
kn_channel_list-types.md |
I wouldn't rely on the sorting algo of
|
This came up in Slack today -- essentially, it'd be good to get the kn commands (i.e. this info ) into the docs.
Probably related to #2810
The text was updated successfully, but these errors were encountered: