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

Version the documentation for all tools #339

Merged
merged 19 commits into from
Jan 28, 2022
Merged

Version the documentation for all tools #339

merged 19 commits into from
Jan 28, 2022

Conversation

joaopapereira
Copy link
Member

@joaopapereira joaopapereira commented Jan 21, 2022

Implements: https://github.com/vmware-tanzu/carvel/tree/develop/proposals/carvel/001-maintain-documentation

In this PR:

  • Script to easily release a new version of the documentation
  • Version the documentation
    • kapp
    • kapp-controller
    • imgpkg
    • kbld
    • ytt
    • vendir
  • Github action that will run and fail when documentation for a version is updated
  • Prepare the website for versioning

Not included on this PR:

  • Update our release process to generate the documentation
  • Update the Checklist list for the release to ensure the new documentation is generated
  • Algolia setup

@pivotaljohn
Copy link
Contributor

We're hashing out the pros and cons of having the latest reference baked into the URL vs. having a specific version.

latest in the URL means:

  • that links between tools remain valid even as one tool's (e.g. kapp-controller) documentation references another tool's docs (e.g. ytt);
  • links from outside-of-Carvel documentation/bookmarks will break when pages within the docs move in subsequent versions.

Moving into "draft" until we work that out.

@pivotaljohn pivotaljohn marked this pull request as draft January 24, 2022 18:43
@joaopapereira joaopapereira force-pushed the add-versions branch 4 times, most recently from 7fd66b7 to 32bee62 Compare January 25, 2022 21:52
@@ -0,0 +1,4 @@
{{ $latest := site.Params.latest }}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you might need to identify the multiple projects here.
Can you try changing this to something like:

 {{ $latest-ytt   := site.Params.ytt.version_latest }}
 {{ $latest-imgpkg   := site.Params.imgpkg.version_latest }}

/ytt/docs/         /ytt/docs/{{ $latest-ytt }}
/imgpkgdocs/         /ytt/docs/{{ $latest-ytt }}

@joaopapereira joaopapereira force-pushed the add-versions branch 2 times, most recently from d6292d1 to c4bb3f4 Compare January 26, 2022 17:26
@joaopapereira joaopapereira marked this pull request as ready for review January 26, 2022 21:45
Copy link
Contributor

@pivotaljohn pivotaljohn left a comment

Choose a reason for hiding this comment

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

This is fantastic!
Bonus points for providing the workflow hook that detects changes in "frozen" docs!! 👍🏻

There are multiple incompatible versions of yq. The release-docs.sh script fails with the version of yq that wraps jq.

Suggestions below to avoid any such problems by using ytt to pluck values from a YAML.

site/hack/release-docs.sh Outdated Show resolved Hide resolved
site/hack/release-docs.sh Outdated Show resolved Hide resolved
@gcheadle-vmware
Copy link
Contributor

Since the version drop down list is located at the top of the table of contents, it would be nice to keep that left sidebar fixed, and have it scroll independently from the documentation. There is an issue https://github.com/vmware-tanzu/carvel/issues/324, if we would like to prioritize that work.

@joaopapereira joaopapereira force-pushed the add-versions branch 2 times, most recently from d2b54fd to 6f6cfa6 Compare January 27, 2022 17:58
Copy link
Member

@praveenrewar praveenrewar left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines 95 to 96
- [@ytt:yaml module](../../../ytt/docs/latest/lang-ref-ytt.md#yaml) No newline at end of file
- [@ytt:yaml module](../../../ytt/docs/latest/lang-ref-ytt.md#yaml)
Copy link
Member

Choose a reason for hiding this comment

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

I wonder why git thinks these 2 lines are different 🤔

Copy link
Contributor

@pivotaljohn pivotaljohn left a comment

Choose a reason for hiding this comment

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

Thanks for pulling this together, @joaopapereira. It's not just another PR, it's the equivalent of sweeping up a whole section of the workshop and making it ship-shape. 🙏🏻

@joaopapereira joaopapereira merged commit d5fb68e into develop Jan 28, 2022
@joaopapereira joaopapereira deleted the add-versions branch January 28, 2022 20:13
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.

6 participants