add layout for kubectl reference index with search#54996
add layout for kubectl reference index with search#54996Caesarsage wants to merge 2 commits intokubernetes:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
1372af8 to
c9d35db
Compare
lmktfy
left a comment
There was a problem hiding this comment.
If we have a generated page for all subcommands, I expect that we can discover all of the page sections at site build time.
In other words: find all the child pages for some section, analyse them, and render something out based on that analysis.
Hugo would do all the hard work, once we define an algorithm.
How does that sound?
There was a problem hiding this comment.
These are styles for documentation, so the best place for them is in the documentation SCSS.
| weight: 10 | ||
| title: kubectl reference | ||
| layout: kubectl-all-subcommands | ||
| content_type: tool-reference |
There was a problem hiding this comment.
Ideally, this has a weight (maybe it's an input to the generator)
There was a problem hiding this comment.
yes. before it was a manually created file and not auto generated. Will have to revert this and try the hugo build approach
| {{ partial "page-meta-lastmod.html" . }} | ||
| </div> | ||
|
|
||
| <script> |
There was a problem hiding this comment.
Best place for JavaScript is assets/js
| --- | ||
|
|
||
|
|
||
| <!-- |
There was a problem hiding this comment.
I'm wondering - is there a matching PR to update the reference docs generator?
There was a problem hiding this comment.
Yes, I have one locally (used to generate this file). Before raising PR for that, wanted to check if the generated file is okay first
This is okay, we would need to add some more font matter like the description to the generated subcommands files (which will be less code on the reference docs generator) |
…mmand front matter
|
LGTM label has been added. DetailsGit tree hash: a01003c365db4888cf07b59af062fbec76838711 |
Description:
Adds a custom Hugo layout and generated index page that lists all kubectl commands and subcommands in collapsible sections with search and expand/collapse controls. Each entry links to its full reference page.
preview: https://deploy-preview-54996--kubernetes-io-main-staging.netlify.app/docs/reference/kubectl/generated/
The generator code changes (used to generate the kubectl comand) approved here: kubernetes-sigs/reference-docs#425
Closes: #45558