-
Notifications
You must be signed in to change notification settings - Fork 204
Infrastructure for building unversioned pages from the stable version. #1107
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
Conversation
The only file changed in the move is the root `docs.json` file. Instead a `v2.json` file was added.
A live preview of this PR will be available at the URL(s) below. https://pr1107-132a32c---lit-dev-5ftespv5na-uc.a.run.app/ |
f46efaf
to
43a8f18
Compare
This copies over and adds the correct permalinks to the selected version content. Currently moving `v2` -> `unversioned`.
43a8f18
to
19a07fb
Compare
cb5bcd5
to
e56c92b
Compare
Unversioned links will be generated automatically by the generated unversioned pages.
This works by piping all the content through a function that will fix cross links on unversioned pages.
The versioned URL is stripped for unversioned URLs by our tooling. Add a test to confirm this behavior.
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.
Great work! I only have very minor comments.
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.
Amazing! I was able to build locally and navigate the site. Manually going to docs/v2/ worked great with cross links too.
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.
Awesome work!
- Replaced sync fs with async fs. - Made lightweight YAML parser more robust using regex.
Issue with design and background: #1108
Testing
This was extensively manually tested. E.g., any
/docs/v2
links were checked for the presence of arel=canonical
link.v1
or unversioned pages do not have rel=canonical.Similarly cross links were checked on
docs/v2/api
anddocs/api
.Also added some integration tests as smoke testing for the features added.