-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Report for my GSoD'20 project: Update how the Kubernetes website serves API references #25404
Conversation
Update how the Kubernetes website serves API references
/assign @zacharysarah |
✔️ Deploy preview for kubernetes-io-master-staging ready! 🔨 Explore the source changes: 4b8e1d0 🔍 Inspect the deploy logs: https://app.netlify.com/sites/kubernetes-io-master-staging/deploys/5fcaeffdaf61220008cbc960 😎 Browse the preview: https://deploy-preview-25404--kubernetes-io-master-staging.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some quick feedback
@feloy my review here was a bit rushed, so please check these suggestions with more scrutiny that than you otherwise might use.
content/en/blog/_posts/2020-12-04-gsod-2020-improving-api-reference-experience.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2020-12-04-gsod-2020-improving-api-reference-experience.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2020-12-04-gsod-2020-improving-api-reference-experience.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2020-12-04-gsod-2020-improving-api-reference-experience.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2020-12-04-gsod-2020-improving-api-reference-experience.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2020-12-04-gsod-2020-improving-api-reference-experience.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2020-12-04-gsod-2020-improving-api-reference-experience.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2020-12-04-gsod-2020-improving-api-reference-experience.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2020-12-04-gsod-2020-improving-api-reference-experience.md
Outdated
Show resolved
Hide resolved
content/en/blog/_posts/2020-12-04-gsod-2020-improving-api-reference-experience.md
Outdated
Show resolved
Hide resolved
Thanks for this review |
preview LGTM |
LGTM label has been added. Git tree hash: 74434bdf819e2ca7b88c1a3de2a65419fd8451d6
|
content/en/blog/_posts/2020-12-04-gsod-2020-improving-api-reference-experience.md
Show resolved
Hide resolved
content/en/blog/_posts/2020-12-04-gsod-2020-improving-api-reference-experience.md
Outdated
Show resolved
Hide resolved
|
||
The [Kubernetes documentation website](https://kubernetes.io/docs/home/) is built with Hugo from documentation written in Markdown format in the [website repository](https://github.com/kubernetes/website), using the [Docsy Hugo theme](https://www.docsy.dev/about/). | ||
|
||
The existing API reference documentation is a large HTML file generated from the Swagger specifications of the API, added to the content of the website. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be fair, it may be nice to say that you worked with [started working with] the current API reference.
Instead of focusing on "drawbacks", how about focusing on what you wanted to achieve [your goals].
Something like:
- build individual Markdown pages for the main Kubernetes resources
- reuse the website's assets and theme to build, integrate, and display the reference pages
- create reference pages that are more mobile friendly and accessible to search engines
- create reusable reference content
|
||
The [Kubernetes documentation website](https://kubernetes.io/docs/home/) is built with Hugo from documentation written in Markdown format in the [website repository](https://github.com/kubernetes/website), using the [Docsy Hugo theme](https://www.docsy.dev/about/). | ||
|
||
The existing API reference documentation is a large HTML file generated from the Swagger specifications of the API, added to the content of the website. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: The existing API reference documentation is a large HTML file generated from the Kubernetes OpenAPI specification.
- `apiVersion` and `kind` display the value, not the `string` type | ||
- on top of the page, the Go import necessary to use these resources from a Go program is displayed | ||
|
||
When the work is integrated, the API reference will be available at https://kubernetes.io/docs/reference/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there room to add a section about "Lessons learned" or "future work"?
- the resources are categorized, in the categories Workloads, Services, Config & Storage, Authentication, Authorization, Policies, Extend, Cluster. This structure is configurable with a simple [`toc.yaml` file](https://github.com/kubernetes-sigs/reference-docs/blob/master/gen-resourcesdocs/config/v1.20/toc.yaml) | ||
- each page displays associated resources at the first level ; for example: Pod, PodSpec, PodStatus, PodList | ||
- most resource pages inline relevant definitions ; the exceptions are when those definitions are common to several resources, or are too complex to be displayed inline. With the old approach, you had to follow a hyperlink to read each extra detail. | ||
- some widely used definitions are documented in a specific page (ex ObjectMeta) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possible edit: some widely used definitions such as ObjectMeta
are documented as an individual page?
Happy to give this another |
LGTM label has been added. Git tree hash: 5c71b64898508f6c54d8593f3d4de84f7149ce8d
|
I was selected by the CNCF organization to work on the Kubernetes documentation, specifically on the subject of making the API Reference documentation more accessible. | ||
|
||
I'm a software developer, with a great interest in documentation systems. At the end of the 90's, I wanted to invest my time in the Linux community and started translating Linux-HOWTO documents. From one thing to another, I learned about documentation systems and finally wrote a Linux-HOWTO, to help document writers learn the language used at this time for writing documents, LinuxDoc/SGML. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Putting a hold specifically so I can review and add an editor's note! /hold |
/approve @zacharysarah feel free to unhold when ready |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sftim The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@feloy Some grammatical and formatting feedback, otherwise a great summary. 🌟
|
||
## Introduction | ||
|
||
[Google Season of Docs](https://developers.google.com/season-of-docs) brings open source organizations and technical writers together, to spend three months working closely on a specific documentation project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best practice not to begin a line with a link.
Also, some GSoD projects run longer than 3 months.
[Google Season of Docs](https://developers.google.com/season-of-docs) brings open source organizations and technical writers together, to spend three months working closely on a specific documentation project. | |
The [Google Season of Docs](https://developers.google.com/season-of-docs) project brings open source organizations and technical writers together to work closely on a specific documentation project. |
|
||
[Google Season of Docs](https://developers.google.com/season-of-docs) brings open source organizations and technical writers together, to spend three months working closely on a specific documentation project. | ||
|
||
I was selected by the CNCF organization to work on the Kubernetes documentation, specifically on the subject of making the API Reference documentation more accessible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was selected by the CNCF organization to work on the Kubernetes documentation, specifically on the subject of making the API Reference documentation more accessible. | |
I was selected by the CNCF to work on Kubernetes documentation, specifically to make the API Reference documentation more accessible. |
|
||
I was selected by the CNCF organization to work on the Kubernetes documentation, specifically on the subject of making the API Reference documentation more accessible. | ||
|
||
I'm a software developer, with a great interest in documentation systems. At the end of the 90's, I wanted to invest my time in the Linux community and started translating Linux-HOWTO documents. From one thing to another, I learned about documentation systems and finally wrote a Linux-HOWTO, to help document writers learn the language used at this time for writing documents, LinuxDoc/SGML. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm presuming French, please correct if wrong.
I'm a software developer, with a great interest in documentation systems. At the end of the 90's, I wanted to invest my time in the Linux community and started translating Linux-HOWTO documents. From one thing to another, I learned about documentation systems and finally wrote a Linux-HOWTO, to help document writers learn the language used at this time for writing documents, LinuxDoc/SGML. | |
I'm a software developer with a great interest in documentation systems. In the late 90's I started translating Linux-HOWTO documents into French. From one thing to another, I learned about documentation systems. Eventually, I wrote a Linux-HOWTO to help documentarians learn the language used at that time for writing documents, LinuxDoc/SGML. |
|
||
I'm a software developer, with a great interest in documentation systems. At the end of the 90's, I wanted to invest my time in the Linux community and started translating Linux-HOWTO documents. From one thing to another, I learned about documentation systems and finally wrote a Linux-HOWTO, to help document writers learn the language used at this time for writing documents, LinuxDoc/SGML. | ||
|
||
Shortly after, the DocBook language was adopted to write the Linux Documentation. I helped some writers rewrite their documents in this format, for example the Advanced Bash-Scripting Guide. I also worked on the GNU `makeinfo` program to add the DocBook output, making possible to transform *GNU Info* documentation into Docbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use active voice.
Shortly after, the DocBook language was adopted to write the Linux Documentation. I helped some writers rewrite their documents in this format, for example the Advanced Bash-Scripting Guide. I also worked on the GNU `makeinfo` program to add the DocBook output, making possible to transform *GNU Info* documentation into Docbook. | |
Shortly afterward, Linux documentation adopted the DocBook language. I helped some writers rewrite their documents in this format; for example, the Advanced Bash-Scripting Guide. I also worked on the GNU `makeinfo` program to add DocBook output, making it possible to transform *GNU Info* documentation into Docbook format. |
|
||
## Background | ||
|
||
The [Kubernetes documentation website](https://kubernetes.io/docs/home/) is built with Hugo from documentation written in Markdown format in the [website repository](https://github.com/kubernetes/website), using the [Docsy Hugo theme](https://www.docsy.dev/about/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The [Kubernetes documentation website](https://kubernetes.io/docs/home/) is built with Hugo from documentation written in Markdown format in the [website repository](https://github.com/kubernetes/website), using the [Docsy Hugo theme](https://www.docsy.dev/about/). | |
The [Kubernetes website](https://kubernetes.io/docs/home/) is built with Hugo from documentation written in Markdown format in the [website repository](https://github.com/kubernetes/website), using the [Docsy Hugo theme](https://www.docsy.dev/about/). |
- `map` fields are indicated. For example the `.spec.nodeSelector` for a `Pod` is `map[string]string`, instead of `object`, using the value of `x-kubernetes-list-type` | ||
- patch strategies are indicated | ||
- `apiVersion` and `kind` display the value, not the `string` type | ||
- on top of the page, the Go import necessary to use these resources from a Go program is displayed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- on top of the page, the Go import necessary to use these resources from a Go program is displayed | |
- At the top of a reference page, the page displays the Go import necessary to use these resources from a Go program. |
- `apiVersion` and `kind` display the value, not the `string` type | ||
- on top of the page, the Go import necessary to use these resources from a Go program is displayed | ||
|
||
When the work is integrated, the API reference will be available at https://kubernetes.io/docs/reference/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the work is integrated, the API reference will be available at https://kubernetes.io/docs/reference/ | |
The work is currently on hold pending the 1.20 release. When the release finishes and the work is integrated, the API reference will be available at https://kubernetes.io/docs/reference/. |
|
||
There are points to improve, particularly: | ||
|
||
- some Kubernetes resources are deeply nested. Inlining the definition of these resources makes them difficult to understand |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- some Kubernetes resources are deeply nested. Inlining the definition of these resources makes them difficult to understand | |
- Some Kubernetes resources are deeply nested. Inlining the definition of these resources makes them difficult to understand. |
There are points to improve, particularly: | ||
|
||
- some Kubernetes resources are deeply nested. Inlining the definition of these resources makes them difficult to understand | ||
- the created `shortcode` uses the URL of the page to reference a Resource page. It would be easier for the technical writers if they could reference a Resource by its group and name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- the created `shortcode` uses the URL of the page to reference a Resource page. It would be easier for the technical writers if they could reference a Resource by its group and name | |
- The created `shortcode` uses the URL of the page to reference a Resource page. It would be easier for documentarians if they could reference a Resource by its group and name. |
|
||
**Author**: [Philippe Martin](https://github.com/feloy) | ||
|
||
## Introduction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Introduction | |
_Editor's note: Better API references have been my goal since I joined Kubernetes docs three and a half years ago. Philippe has succeeded fantastically. More than a better API reference, though, Philippe embodied the best of the Kubernetes community in this project: excellence through collaboration, and a process that made the community itself better. Thanks, Google Season of Docs, for making Philippe's work possible. —Zach Corleissen_ | |
## Introduction |
@zacharysarah Thanks for the review, and the Editor's note :) |
/hold cancel |
LGTM label has been added. Git tree hash: c11c36eff7594d0ff9b047ddf8a6f0fbc595c80c
|
Initial description of the GSoD project: https://developers.google.com/season-of-docs/docs/participants/project-cncf-feloy