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

[doc-links] Ensure correct doc links from main branch #116652

Merged
merged 1 commit into from
Oct 29, 2021

Conversation

gtback
Copy link
Member

@gtback gtback commented Oct 28, 2021

Summary

Until all repos are switched over to using a "main" branch, all the doc
URLs are still published as the "master" version. This also gives us a
single place to change once we start publishing them as "main".

For maintainers

Until all repos are switched over to using a "main" branch, all the doc
URLs are still published as the "master" version. This also gives us a
single place to change once we start publishing them as "main".
@gtback gtback added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting labels Oct 28, 2021
@gtback gtback requested review from tylersmalley and lcawl October 28, 2021 14:26
@gtback gtback requested a review from a team as a code owner October 28, 2021 14:26
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-docs (Team:Docs)

@gtback
Copy link
Member Author

gtback commented Oct 28, 2021

This should effectively be a no-op for as long as the branch is called "master", so I'm not sure how (if?) to test this.

This should be removed when elastic/docs#2264 is addressed.

Copy link
Contributor

@lcawl lcawl left a comment

Choose a reason for hiding this comment

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

Thanks, Greg!

const DOC_LINK_VERSION = injectedMetadata.getKibanaBranch();
const kibanaBranch = injectedMetadata.getKibanaBranch();
// Documentation for `main` branches is still published at a `master` URL.
const DOC_LINK_VERSION = kibanaBranch === 'main' ? 'master' : kibanaBranch;
Copy link
Member Author

Choose a reason for hiding this comment

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

Theoretically, we could just hard-code DOC_LINK_VERSION to "main", since we're not going to backport this change, and should ideally remove it before new versions get branched off of this.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 307.1KB 307.1KB +24.0B

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@tylersmalley tylersmalley merged commit 535a7b3 into elastic:main Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Docs v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants