Skip to content
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

Update docs/api.md and automatically update it #612

Merged
merged 3 commits into from
Oct 14, 2024
Merged

Update docs/api.md and automatically update it #612

merged 3 commits into from
Oct 14, 2024

Conversation

frouioui
Copy link
Member

@frouioui frouioui commented Oct 9, 2024

Each time we change the CRDs we do update part of our documentation in ./docs/api/index.html, but this document is hardly readable for anyone and does not render well on the GitHub UI either. The better way of showing this documentation is by just changing the file extension to Markdown and GitHub will know how to render it. We do have the Markdown version of ./docs/api/index.html, which is located in ./docs/api.md. However, we have not updated this file in several years despite the many changes to vitess-operator.

This is an issue as ./docs/api.md is supposed to be the only very-up-to-date documentation we have for vitess-operator.

This PR fixes this issue by adding a phase to make generate that will copy the newly generated ./docs/api/index.html into ./docs/api.md and remove the first two line of the file (which contain HTML headers that do not render well in Markdown).

Adding this as part of make generate will ensure that the documentation will always be consistent as we have a CI checks that makes sure make generate has been run on any new commit.

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Copy link
Collaborator

@GuptaManan100 GuptaManan100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@frouioui frouioui merged commit 5545c3d into main Oct 14, 2024
11 checks passed
@frouioui frouioui deleted the better-docs branch October 14, 2024 19:41
@stankevich
Copy link
Contributor

I believe this closes #354. Cross-linking #288 and #3 for completeness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants